[PATCH 1/4] powerpc: Don't use relative include for config.h in global_data.h

Matt Merhar mattmerhar at protonmail.com
Sat Jun 5 21:18:58 CEST 2021


On Thu, 03 Jun 2021 09:38:59 -0400
"Tom Rini" <trini at konsulko.com> wrote:

> As there is an arch/powerpc/include/asm/config.h file using "" to get
> config.h here can lead to using that rather than include/config.h.
> This in turn can lead to a mismatch in the size of gd.
> 
> Cc: Matt Merhar <mattmerhar at protonmail.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>  arch/powerpc/include/asm/global_data.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/global_data.h
> b/arch/powerpc/include/asm/global_data.h index
> 192a02d347e7..90bf5a2aea5d 100644 ---
> a/arch/powerpc/include/asm/global_data.h +++
> b/arch/powerpc/include/asm/global_data.h @@ -8,7 +8,7 @@
>  #ifndef	__ASM_GBL_DATA_H
>  #define __ASM_GBL_DATA_H
> 
> -#include "config.h"
> +#include <config.h>
>  #include "asm/types.h"
> 
>  /* Architecture-specific global data */
> --
> 2.17.1
> 

I think this is a better solution, as it also appears to fix another
global_data size mismatch caught by the RFC from Rasmus "global-data.h:
add build-time sanity check of sizeof(struct global_data)".

Tested-by: Matt Merhar <mattmerhar at protonmail.com>



More information about the U-Boot mailing list