
On 9/8/21 3:33 PM, Simon Glass wrote:
Add an extern declaration so that it is possible to use this macro in files other than the one that defines it.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Heinrich Schuchardt xypron.glpk@gmx.de
arch/x86/cpu/x86_64/cpu.c | 3 +++ arch/x86/include/asm/global_data.h | 2 ++ 2 files changed, 5 insertions(+)
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 90a766c3c57..e090b1b478a 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -8,6 +8,9 @@ #include <cpu_func.h> #include <debug_uart.h> #include <init.h> +#include <asm/global_data.h>
+DECLARE_GLOBAL_DATA_PTR;
/*
- Global declaration of gd.
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 3e4044593c8..f95fb5a1931 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -133,6 +133,8 @@ struct arch_global_data { #ifndef __ASSEMBLY__ # if defined(CONFIG_EFI_APP) || CONFIG_IS_ENABLED(X86_64)
+extern struct global_data *global_data_ptr;
- /* TODO(sjg@chromium.org): Consider using a fixed register for gd on x86_64 */ #define gd global_data_ptr