]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Declare global_data pointer when it is used
authorSimon Glass <sjg@chromium.org>
Wed, 17 Apr 2013 16:13:33 +0000 (16:13 +0000)
committerSimon Glass <sjg@chromium.org>
Mon, 13 May 2013 20:33:20 +0000 (13:33 -0700)
Several files use the global_data pointer without declaring it. This works
because the declaration is currently a NOP. But still it is better to
fix this so that x86 lines up with other archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/interrupts.c
arch/x86/lib/cmd_boot.c
arch/x86/lib/physmem.c
arch/x86/lib/relocate.c
arch/x86/lib/timer.c

index 6dc74e34c60f81d8ac5d2237a66c93345db852a3..e733bcb30272fa0da847cac08ca318eac4ee61ee 100644 (file)
@@ -37,6 +37,8 @@
 #include <asm/msr.h>
 #include <asm/u-boot-x86.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define DECLARE_INTERRUPT(x) \
        ".globl irq_"#x"\n" \
        ".hidden irq_"#x"\n" \
index a81a9a38a627fbd11d5ab441dabcea197634527d..315be5a60dff6b209d288865bb0f950a951aa304 100644 (file)
@@ -36,6 +36,8 @@
 #include <malloc.h>
 #include <asm/u-boot-x86.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
                         int argc, char * const argv[])
 {
index 18f0e62acd0fa2b1473ca0ff41007f09eebe3c64..59b3fe977d81daf00b4f9cbdeccfb956050b8614 100644 (file)
@@ -12,6 +12,8 @@
 #include <physmem.h>
 #include <linux/compiler.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* Large pages are 2MB. */
 #define LARGE_PAGE_SIZE ((1 << 20) * 2)
 
index f178db9c81ccf4d7d55ec2310e5ecb1f21fbadbd..21982db7a94bc09fc2a4855563e70e9b521b594e 100644 (file)
@@ -39,6 +39,8 @@
 #include <asm/sections.h>
 #include <elf.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 int copy_uboot_to_ram(void)
 {
        size_t len = (size_t)&__data_end - (size_t)&__text_start;
index 1f8ce609e2e4b402b4660619d179c4cc516015cb..fb11bfe88b45aa0c91c2a9fb14b10fbc9e1a5cdb 100644 (file)
@@ -30,6 +30,8 @@
 #include <asm/i8254.h>
 #include <asm/ibmpc.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 struct timer_isr_function {
        struct timer_isr_function *next;
        timer_fnc_t *isr_func;