summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-30 21:38:53 -0600
committerTom Rini <trini@konsulko.com>2021-02-02 15:33:42 -0500
commit401d1c4f5d2d29c4bc4beaec95402ca23eb63295 (patch)
tree0122abb2a3f1ea9837eaccc6150d2dae9570388e /arch/x86/cpu
parentfdcb93e1709ab1a2ebb562455621617c29e2099c (diff)
common: Drop asm/global_data.h from common header
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/apollolake/cpu.c1
-rw-r--r--arch/x86/cpu/apollolake/cpu_spl.c1
-rw-r--r--arch/x86/cpu/apollolake/fsp_s.c1
-rw-r--r--arch/x86/cpu/baytrail/fsp_configs.c1
-rw-r--r--arch/x86/cpu/braswell/fsp_configs.c1
-rw-r--r--arch/x86/cpu/broadwell/cpu.c1
-rw-r--r--arch/x86/cpu/broadwell/cpu_from_spl.c1
-rw-r--r--arch/x86/cpu/broadwell/cpu_full.c1
-rw-r--r--arch/x86/cpu/broadwell/lpc.c1
-rw-r--r--arch/x86/cpu/broadwell/northbridge.c1
-rw-r--r--arch/x86/cpu/broadwell/pch.c1
-rw-r--r--arch/x86/cpu/broadwell/pinctrl_broadwell.c1
-rw-r--r--arch/x86/cpu/broadwell/sata.c1
-rw-r--r--arch/x86/cpu/broadwell/sdram.c1
-rw-r--r--arch/x86/cpu/call32.S1
-rw-r--r--arch/x86/cpu/coreboot/coreboot.c1
-rw-r--r--arch/x86/cpu/coreboot/sdram.c1
-rw-r--r--arch/x86/cpu/coreboot/tables.c1
-rw-r--r--arch/x86/cpu/cpu.c1
-rw-r--r--arch/x86/cpu/cpu_x86.c1
-rw-r--r--arch/x86/cpu/efi/payload.c1
-rw-r--r--arch/x86/cpu/efi/sdram.c1
-rw-r--r--arch/x86/cpu/i386/call64.S1
-rw-r--r--arch/x86/cpu/i386/cpu.c1
-rw-r--r--arch/x86/cpu/i386/interrupt.c1
-rw-r--r--arch/x86/cpu/intel_common/acpi.c1
-rw-r--r--arch/x86/cpu/intel_common/cpu.c1
-rw-r--r--arch/x86/cpu/intel_common/cpu_from_spl.c1
-rw-r--r--arch/x86/cpu/intel_common/itss.c1
-rw-r--r--arch/x86/cpu/intel_common/lpc.c1
-rw-r--r--arch/x86/cpu/intel_common/microcode.c1
-rw-r--r--arch/x86/cpu/intel_common/mrc.c1
-rw-r--r--arch/x86/cpu/irq.c1
-rw-r--r--arch/x86/cpu/ivybridge/bd82x6x.c1
-rw-r--r--arch/x86/cpu/ivybridge/cpu.c1
-rw-r--r--arch/x86/cpu/ivybridge/fsp_configs.c1
-rw-r--r--arch/x86/cpu/ivybridge/lpc.c1
-rw-r--r--arch/x86/cpu/ivybridge/model_206ax.c1
-rw-r--r--arch/x86/cpu/ivybridge/northbridge.c1
-rw-r--r--arch/x86/cpu/ivybridge/sata.c1
-rw-r--r--arch/x86/cpu/ivybridge/sdram_nop.c1
-rw-r--r--arch/x86/cpu/mp_init.c1
-rw-r--r--arch/x86/cpu/mtrr.c1
-rw-r--r--arch/x86/cpu/qemu/dram.c1
-rw-r--r--arch/x86/cpu/qemu/e820.c1
-rw-r--r--arch/x86/cpu/quark/acpi.c1
-rw-r--r--arch/x86/cpu/quark/dram.c1
-rw-r--r--arch/x86/cpu/sipi_vector.S1
-rw-r--r--arch/x86/cpu/slimbootloader/sdram.c1
-rw-r--r--arch/x86/cpu/slimbootloader/serial.c1
-rw-r--r--arch/x86/cpu/slimbootloader/slimbootloader.c1
-rw-r--r--arch/x86/cpu/start.S1
-rw-r--r--arch/x86/cpu/start16.S1
-rw-r--r--arch/x86/cpu/turbo.c1
54 files changed, 49 insertions, 5 deletions
diff --git a/arch/x86/cpu/apollolake/cpu.c b/arch/x86/cpu/apollolake/cpu.c
index 328f79255f8..fbc016d0e0b 100644
--- a/arch/x86/cpu/apollolake/cpu.c
+++ b/arch/x86/cpu/apollolake/cpu.c
@@ -11,6 +11,7 @@
#include <acpi/acpi_table.h>
#include <asm/cpu_common.h>
#include <asm/cpu_x86.h>
+#include <asm/global_data.h>
#include <asm/intel_acpi.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
index fafe4dbc0a0..9a18476b22c 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -18,6 +18,7 @@
#include <asm/cpu_common.h>
#include <asm/cpu_x86.h>
#include <asm/fast_spi.h>
+#include <asm/global_data.h>
#include <asm/intel_pinctrl.h>
#include <asm/intel_regs.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 288188027a4..a9b13c0c704 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -14,6 +14,7 @@
#include <malloc.h>
#include <p2sb.h>
#include <acpi/acpi_s3.h>
+#include <asm/global_data.h>
#include <asm/intel_pinctrl.h>
#include <asm/io.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index 21816ce5b88..fb3f946c45f 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -9,6 +9,7 @@
#include <fdtdec.h>
#include <log.h>
#include <asm/fsp1/fsp_support.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/braswell/fsp_configs.c b/arch/x86/cpu/braswell/fsp_configs.c
index 9e710a940ca..243298fd571 100644
--- a/arch/x86/cpu/braswell/fsp_configs.c
+++ b/arch/x86/cpu/braswell/fsp_configs.c
@@ -7,6 +7,7 @@
#include <fdtdec.h>
#include <log.h>
#include <asm/fsp1/fsp_support.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index b77301118cd..3832a97f2c7 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -13,6 +13,7 @@
#include <asm/cpu.h>
#include <asm/cpu_x86.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/lpc_common.h>
#include <asm/msr.h>
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index 4d4cdafa2b0..e5f62e7187c 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -11,6 +11,7 @@
#include <handoff.h>
#include <init.h>
#include <log.h>
+#include <asm/global_data.h>
#include <asm/mtrr.h>
int misc_init_r(void)
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index ea9e98dde69..2049dbfe24a 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -13,6 +13,7 @@
#include <asm/cpu.h>
#include <asm/cpu_x86.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/msr.h>
#include <asm/post.h>
diff --git a/arch/x86/cpu/broadwell/lpc.c b/arch/x86/cpu/broadwell/lpc.c
index 5669a028cf3..d2638a4e7a6 100644
--- a/arch/x86/cpu/broadwell/lpc.c
+++ b/arch/x86/cpu/broadwell/lpc.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <log.h>
#include <pch.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/io.h>
#include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/broadwell/northbridge.c b/arch/x86/cpu/broadwell/northbridge.c
index 4bcab785560..141babc51c3 100644
--- a/arch/x86/cpu/broadwell/northbridge.c
+++ b/arch/x86/cpu/broadwell/northbridge.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/mrc_common.h>
#include <asm/arch/iomap.h>
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index 9bcf211af99..f012db9debe 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <pch.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/gpio.h>
#include <asm/i8259.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/pinctrl_broadwell.c b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
index 0ead13af62a..85bd37101ba 100644
--- a/arch/x86/cpu/broadwell/pinctrl_broadwell.c
+++ b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
@@ -11,6 +11,7 @@
#include <pch.h>
#include <pci.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/pci.h>
diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c
index ceb395ddcfd..be3c9e764ef 100644
--- a/arch/x86/cpu/broadwell/sata.c
+++ b/arch/x86/cpu/broadwell/sata.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <asm/global_data.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index 72f59a0a573..c104a849a54 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -12,6 +12,7 @@
#include <pci.h>
#include <syscon.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/lpc_common.h>
#include <asm/mrccache.h>
diff --git a/arch/x86/cpu/call32.S b/arch/x86/cpu/call32.S
index e641e781c04..b28d58a317d 100644
--- a/arch/x86/cpu/call32.S
+++ b/arch/x86/cpu/call32.S
@@ -4,7 +4,6 @@
* Written by Simon Glass <sjg@chromium.org>
*/
-#include <asm/global_data.h>
#include <asm/msr-index.h>
#include <asm/processor-flags.h>
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 22a93254a93..15c3ad879a0 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -10,6 +10,7 @@
#include <fdtdec.h>
#include <init.h>
#include <usb.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index 27e859885e8..a2e47d196a2 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <asm/e820.h>
#include <asm/arch/sysinfo.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
index 1594b4a8b2a..c52741ac9da 100644
--- a/arch/x86/cpu/coreboot/tables.c
+++ b/arch/x86/cpu/coreboot/tables.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <net.h>
#include <asm/arch/sysinfo.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 71351262f66..9c4edfcbfda 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -37,6 +37,7 @@
#include <asm/control_regs.h>
#include <asm/coreboot_tables.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/lapic.h>
#include <asm/microcode.h>
#include <asm/mp.h>
diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c
index bfb511a5101..59da41f3833 100644
--- a/arch/x86/cpu/cpu_x86.c
+++ b/arch/x86/cpu/cpu_x86.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 71619f6f01b..9a73b768e9b 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -13,6 +13,7 @@
#include <usb.h>
#include <asm/bootparam.h>
#include <asm/e820.h>
+#include <asm/global_data.h>
#include <asm/post.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c
index 3143c079adb..af65982fd0c 100644
--- a/arch/x86/cpu/efi/sdram.c
+++ b/arch/x86/cpu/efi/sdram.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <efi.h>
#include <init.h>
+#include <asm/global_data.h>
#include <asm/u-boot-x86.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/i386/call64.S b/arch/x86/cpu/i386/call64.S
index 0ffc1006bbf..d81bcc6f8f4 100644
--- a/arch/x86/cpu/i386/call64.S
+++ b/arch/x86/cpu/i386/call64.S
@@ -6,7 +6,6 @@
* Parts of this copied from Linux arch/x86/boot/compressed/head_64.S
*/
-#include <asm/global_data.h>
#include <asm/msr-index.h>
#include <asm/processor-flags.h>
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 6fa0f4d32ba..e59215cc20e 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -27,6 +27,7 @@
#include <asm/control_regs.h>
#include <asm/coreboot_tables.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/mp.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index d85f84b29a7..fae2544c456 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -18,6 +18,7 @@
#include <irq.h>
#include <irq_func.h>
#include <asm/control_regs.h>
+#include <asm/global_data.h>
#include <asm/i8259.h>
#include <asm/interrupt.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/intel_common/acpi.c b/arch/x86/cpu/intel_common/acpi.c
index 6a3456f4760..15f19da2067 100644
--- a/arch/x86/cpu/intel_common/acpi.c
+++ b/arch/x86/cpu/intel_common/acpi.c
@@ -17,6 +17,7 @@
#include <asm/acpi_table.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/intel_acpi.h>
#include <asm/ioapic.h>
#include <asm/mpspec.h>
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c
index a51bf86f7ab..96d05e2eb3a 100644
--- a/arch/x86/cpu/intel_common/cpu.c
+++ b/arch/x86/cpu/intel_common/cpu.c
@@ -15,6 +15,7 @@
#include <acpi/acpigen.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/lapic.h>
#include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
index e4157c5734c..1c0dcedb582 100644
--- a/arch/x86/cpu/intel_common/cpu_from_spl.c
+++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
@@ -9,6 +9,7 @@
#include <handoff.h>
#include <init.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/lapic.h>
#include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index ae4de4ca8c6..588a512ecd4 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -17,6 +17,7 @@
#include <malloc.h>
#include <p2sb.h>
#include <spl.h>
+#include <asm/global_data.h>
#include <asm/itss.h>
static int set_polarity(struct udevice *dev, uint irq, bool active_low)
diff --git a/arch/x86/cpu/intel_common/lpc.c b/arch/x86/cpu/intel_common/lpc.c
index 3420f03ccaa..23befbef15f 100644
--- a/arch/x86/cpu/intel_common/lpc.c
+++ b/arch/x86/cpu/intel_common/lpc.c
@@ -9,6 +9,7 @@
#include <fdtdec.h>
#include <pch.h>
#include <pci.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/io.h>
#include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c
index 0355d3c1da6..4d8e1d21083 100644
--- a/arch/x86/cpu/intel_common/microcode.c
+++ b/arch/x86/cpu/intel_common/microcode.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <log.h>
+#include <asm/global_data.h>
#include <linux/libfdt.h>
#include <asm/cpu.h>
#include <asm/microcode.h>
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index 73bfd123321..a97b0b7ceb4 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <syscon.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/gpio.h>
#include <asm/intel_regs.h>
#include <asm/mrc_common.h>
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index 8b53b96822d..766b2451a2c 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -10,6 +10,7 @@
#include <irq.h>
#include <log.h>
#include <malloc.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/pci.h>
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 5448f064fcb..0540b021618 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <pch.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/io.h>
#include <asm/lapic.h>
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index cb6eded9c98..bddba3eddec 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -20,6 +20,7 @@
#include <pch.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/io.h>
#include <asm/lapic.h>
diff --git a/arch/x86/cpu/ivybridge/fsp_configs.c b/arch/x86/cpu/ivybridge/fsp_configs.c
index 41d7d2a2b42..3c4ea6c267f 100644
--- a/arch/x86/cpu/ivybridge/fsp_configs.c
+++ b/arch/x86/cpu/ivybridge/fsp_configs.c
@@ -7,6 +7,7 @@
#include <fdtdec.h>
#include <log.h>
#include <asm/fsp1/fsp_support.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index 85fd2a965ab..f931d2be1b5 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <rtc.h>
#include <pci.h>
+#include <asm/global_data.h>
#include <asm/intel_regs.h>
#include <asm/interrupt.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index 598ebcdf084..3906a69796f 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -15,6 +15,7 @@
#include <asm/cpu.h>
#include <asm/cpu_common.h>
#include <asm/cpu_x86.h>
+#include <asm/global_data.h>
#include <asm/msr.h>
#include <asm/msr-index.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
index b713fcb1cfe..994f8a4ff6a 100644
--- a/arch/x86/cpu/ivybridge/northbridge.c
+++ b/arch/x86/cpu/ivybridge/northbridge.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <asm/global_data.h>
#include <asm/msr.h>
#include <asm/cpu.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/ivybridge/sata.c b/arch/x86/cpu/ivybridge/sata.c
index 025b20be31b..f47ecdffae7 100644
--- a/arch/x86/cpu/ivybridge/sata.c
+++ b/arch/x86/cpu/ivybridge/sata.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <log.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/pch_common.h>
#include <asm/pci.h>
diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c
index 54e6acf2621..51dfe23f94d 100644
--- a/arch/x86/cpu/ivybridge/sdram_nop.c
+++ b/arch/x86/cpu/ivybridge/sdram_nop.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index 0e61c7b5d7f..c09762aee6c 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -14,6 +14,7 @@
#include <qfw.h>
#include <asm/atomic.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/interrupt.h>
#include <asm/io.h>
#include <asm/lapic.h>
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 6f095c53a57..166aff380c6 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -21,6 +21,7 @@
#include <log.h>
#include <sort.h>
#include <asm/cache.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/mp.h>
#include <asm/msr.h>
diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c
index 19d92f27d80..c1745501294 100644
--- a/arch/x86/cpu/qemu/dram.c
+++ b/arch/x86/cpu/qemu/dram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <asm/global_data.h>
#include <asm/post.h>
#include <asm/arch/qemu.h>
diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c
index 0da36bddeae..19e54c5202a 100644
--- a/arch/x86/cpu/qemu/e820.c
+++ b/arch/x86/cpu/qemu/e820.c
@@ -11,6 +11,7 @@
#include <malloc.h>
#include <asm/e820.h>
#include <asm/arch/qemu.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/quark/acpi.c b/arch/x86/cpu/quark/acpi.c
index b0406a04e92..82b776ff65f 100644
--- a/arch/x86/cpu/quark/acpi.c
+++ b/arch/x86/cpu/quark/acpi.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <acpi/acpi_table.h>
+#include <asm/processor.h>
#include <asm/tables.h>
#include <asm/arch/global_nvs.h>
#include <asm/arch/iomap.h>
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 72937139ed7..2287dce12b5 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <malloc.h>
#include <asm/cache.h>
+#include <asm/global_data.h>
#include <asm/mrccache.h>
#include <asm/mtrr.h>
#include <asm/post.h>
diff --git a/arch/x86/cpu/sipi_vector.S b/arch/x86/cpu/sipi_vector.S
index fa1e6cb19af..6d2da963bcd 100644
--- a/arch/x86/cpu/sipi_vector.S
+++ b/arch/x86/cpu/sipi_vector.S
@@ -11,7 +11,6 @@
* C code
*/
-#include <asm/global_data.h>
#include <asm/msr-index.h>
#include <asm/processor.h>
#include <asm/processor-flags.h>
diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c
index 33e91fb6366..36d0d4da553 100644
--- a/arch/x86/cpu/slimbootloader/sdram.c
+++ b/arch/x86/cpu/slimbootloader/sdram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <asm/global_data.h>
#include <linux/sizes.h>
#include <asm/e820.h>
#include <asm/arch/slimbootloader.h>
diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c
index 772a94c31cb..d28b280890d 100644
--- a/arch/x86/cpu/slimbootloader/serial.c
+++ b/arch/x86/cpu/slimbootloader/serial.c
@@ -9,6 +9,7 @@
#include <ns16550.h>
#include <serial.h>
#include <asm/arch/slimbootloader.h>
+#include <asm/global_data.h>
/**
* The serial port info hob is generated by Slim Bootloader, so eligible for
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index f61fe814e94..ec5b87cfd63 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -8,6 +8,7 @@
#include <init.h>
#include <log.h>
#include <asm/arch/slimbootloader.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index 3d0d95295f6..897fd926c0a 100644
--- a/arch/x86/cpu/start.S
+++ b/arch/x86/cpu/start.S
@@ -22,7 +22,6 @@
*/
#include <config.h>
-#include <asm/global_data.h>
#include <asm/post.h>
#include <asm/processor.h>
#include <asm/processor-flags.h>
diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index 54f4ff6662a..865a49731e5 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -9,7 +9,6 @@
* Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
*/
-#include <asm/global_data.h>
#include <asm/processor-flags.h>
#define BOOT_SEG 0xffff0000 /* linear segment of boot code */
diff --git a/arch/x86/cpu/turbo.c b/arch/x86/cpu/turbo.c
index 4a73cb240da..e2c84cddec8 100644
--- a/arch/x86/cpu/turbo.c
+++ b/arch/x86/cpu/turbo.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <log.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/turbo.h>