From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>,
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
Huan Wang <alison.wang@nxp.com>,
Angelo Dureghello <angelo@sysam.it>,
Rick Chen <rick@andestech.com>
Subject: [PATCH 4/4] global_data: Ensure we have <config.h> when symbols are not in Kconfig yet
Date: Thu, 3 Jun 2021 09:39:02 -0400 [thread overview]
Message-ID: <20210603133902.4192-4-trini@konsulko.com> (raw)
In-Reply-To: <20210603133902.4192-1-trini@konsulko.com>
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 | 2 --
arch/arm/include/asm/global_data.h | 2 ++
arch/m68k/include/asm/global_data.h | 2 ++
arch/nds32/include/asm/global_data.h | 2 ++
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arc/include/asm/global_data.h b/arch/arc/include/asm/global_data.h
index 8f9c83d3c28d..e35a26f1eb14 100644
--- a/arch/arc/include/asm/global_data.h
+++ b/arch/arc/include/asm/global_data.h
@@ -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 {
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 2aff1c467c14..79432f3bbd24 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -9,6 +9,8 @@
#ifndef __ASSEMBLY__
+#include <config.h>
+
#include <asm/types.h>
#include <linux/types.h>
diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h
index 188055e9d314..273e843c4ae6 100644
--- a/arch/m68k/include/asm/global_data.h
+++ b/arch/m68k/include/asm/global_data.h
@@ -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
diff --git a/arch/nds32/include/asm/global_data.h b/arch/nds32/include/asm/global_data.h
index be04a18857a1..297481beaaef 100644
--- a/arch/nds32/include/asm/global_data.h
+++ b/arch/nds32/include/asm/global_data.h
@@ -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 {
};
--
2.17.1
next prev parent reply other threads:[~2021-06-03 13:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 17:32 [PATCH] powerpc: fix regression in arch_initr_trap() Matt Merhar
2021-05-18 5:50 ` Stefan Roese
2021-05-18 7:04 ` Rasmus Villemoes
2021-05-18 9:19 ` [RFC PATCH 0/2] sizeof(gd_t) sanity checking Rasmus Villemoes
2021-05-18 9:19 ` [RFC PATCH 1/2] build_bug.h: add wrapper for _Static_assert Rasmus Villemoes
2021-05-19 15:34 ` Simon Glass
2021-07-01 21:54 ` Tom Rini
2021-05-18 9:19 ` [RFC PATCH 2/2] global-data.h: add build-time sanity check of sizeof(struct global_data) Rasmus Villemoes
2021-05-19 15:34 ` Simon Glass
2021-07-01 21:54 ` Tom Rini
2021-06-03 13:38 ` [PATCH 1/4] powerpc: Don't use relative include for config.h in global_data.h Tom Rini
2021-06-03 13:39 ` [PATCH 2/4] Revert "powerpc: fix regression in arch_initr_trap()" Tom Rini
2021-06-24 13:15 ` Tom Rini
2021-06-03 13:39 ` [PATCH 3/4] socfpga64: Do not define CONFIG_SYS_MEM_RESERVE_SECURE to 0 Tom Rini
2021-06-03 15:07 ` Rasmus Villemoes
2021-06-03 15:14 ` Tom Rini
2021-06-24 13:15 ` Tom Rini
2021-06-03 13:39 ` Tom Rini [this message]
2021-06-24 13:15 ` [PATCH 4/4] global_data: Ensure we have <config.h> when symbols are not in Kconfig yet Tom Rini
2021-06-05 19:18 ` [PATCH 1/4] powerpc: Don't use relative include for config.h in global_data.h Matt Merhar
2021-06-24 13:15 ` Tom Rini
2021-05-27 11:42 ` [PATCH] powerpc: fix regression in arch_initr_trap() Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603133902.4192-4-trini@konsulko.com \
--to=trini@konsulko.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=alexey.brodkin@synopsys.com \
--cc=alison.wang@nxp.com \
--cc=angelo@sysam.it \
--cc=rick@andestech.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox