]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
global_data: Ensure we have <config.h> when symbols are not in Kconfig yet
authorTom Rini <trini@konsulko.com>
Thu, 3 Jun 2021 13:39:02 +0000 (09:39 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 23 Jun 2021 12:45:03 +0000 (08:45 -0400)
All symbols that are defined in Kconfig will always be defined (or not)
prior to preprocessing due to the -include directive while building.
However, symbols which are not yet migrated will only be defined (or
not) once the board config.h is included, via <config.h>.  While the end
goal must be to migrate all symbols, today we have cases where the size
of gd will get mismatched within the build, based on include order.
Mitigate this by making sure that any <asm/global_data.h> that uses
symbols not in Kconfig does start with <config.h>.  Remove this when not
needed.

Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Cc: Huan Wang <alison.wang@nxp.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Cc: Rick Chen <rick@andestech.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arc/include/asm/global_data.h
arch/arm/include/asm/global_data.h
arch/m68k/include/asm/global_data.h
arch/nds32/include/asm/global_data.h

index 8f9c83d3c28d1fc4604648a38a9757615384a021..e35a26f1eb14d220bcb1ad70a13e83b05e4c6fbe 100644 (file)
@@ -6,8 +6,6 @@
 #ifndef        __ASM_ARC_GLOBAL_DATA_H
 #define __ASM_ARC_GLOBAL_DATA_H
 
-#include <config.h>
-
 #ifndef __ASSEMBLY__
 /* Architecture-specific global data */
 struct arch_global_data {
index 2aff1c467c14e37954b5df7a18771babd83b0546..79432f3bbd2415bae548e4d95d3109fd5b14cf68 100644 (file)
@@ -9,6 +9,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <config.h>
+
 #include <asm/types.h>
 #include <linux/types.h>
 
index 188055e9d3142c5cccd308bc0aa1c4d4ce21b8f9..273e843c4ae6c152fbad661431593eab82bbaaa6 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef        __ASM_GBL_DATA_H
 #define __ASM_GBL_DATA_H
 
+#include <config.h>
+
 /* Architecture-specific global data */
 struct arch_global_data {
 #ifdef CONFIG_SYS_I2C_FSL
index be04a18857a14f6c2f387f0f18f85f973004a674..297481beaaef66425f140fae53817dd0303cefd7 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef        __ASM_GBL_DATA_H
 #define __ASM_GBL_DATA_H
 
+#include <config.h>
+
 /* Architecture-specific global data */
 struct arch_global_data {
 };