aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-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
-rw-r--r--arch/x86/include/asm/acpi_table.h2
-rw-r--r--arch/x86/include/asm/arch-apollolake/systemagent.h3
-rw-r--r--arch/x86/include/asm/cpu_common.h1
-rw-r--r--arch/x86/include/asm/fast_spi.h4
-rw-r--r--arch/x86/include/asm/io.h2
-rw-r--r--arch/x86/include/asm/mp.h2
-rw-r--r--arch/x86/include/asm/mrccache.h2
-rw-r--r--arch/x86/lib/acpi_s3.c1
-rw-r--r--arch/x86/lib/acpi_table.c1
-rw-r--r--arch/x86/lib/asm-offsets.c1
-rw-r--r--arch/x86/lib/bios.c1
-rw-r--r--arch/x86/lib/bootm.c1
-rw-r--r--arch/x86/lib/cmd_boot.c1
-rw-r--r--arch/x86/lib/coreboot_table.c1
-rw-r--r--arch/x86/lib/e820.c1
-rw-r--r--arch/x86/lib/fsp/fsp_common.c1
-rw-r--r--arch/x86/lib/fsp/fsp_dram.c1
-rw-r--r--arch/x86/lib/fsp/fsp_graphics.c1
-rw-r--r--arch/x86/lib/fsp1/fsp_common.c1
-rw-r--r--arch/x86/lib/fsp1/fsp_dram.c1
-rw-r--r--arch/x86/lib/fsp2/fsp_dram.c1
-rw-r--r--arch/x86/lib/fsp2/fsp_meminit.c1
-rw-r--r--arch/x86/lib/fsp2/fsp_silicon_init.c1
-rw-r--r--arch/x86/lib/fsp2/fsp_support.c1
-rw-r--r--arch/x86/lib/init_helpers.c1
-rw-r--r--arch/x86/lib/mpspec.c1
-rw-r--r--arch/x86/lib/mrccache.c1
-rw-r--r--arch/x86/lib/physmem.c1
-rw-r--r--arch/x86/lib/pinctrl_ich6.c1
-rw-r--r--arch/x86/lib/pirq_routing.c1
-rw-r--r--arch/x86/lib/relocate.c1
-rw-r--r--arch/x86/lib/spl.c1
-rw-r--r--arch/x86/lib/tables.c1
-rw-r--r--arch/x86/lib/tpl.c1
88 files changed, 90 insertions, 7 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>
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index 1b49ccadc0c..d5c8805df38 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -11,6 +11,8 @@
#ifndef __ACPI__
+#include <pci.h>
+
struct acpi_facs;
struct acpi_fadt;
struct acpi_global_nvs;
diff --git a/arch/x86/include/asm/arch-apollolake/systemagent.h b/arch/x86/include/asm/arch-apollolake/systemagent.h
index 788a63d7999..48e76c2bb0a 100644
--- a/arch/x86/include/asm/arch-apollolake/systemagent.h
+++ b/arch/x86/include/asm/arch-apollolake/systemagent.h
@@ -9,6 +9,9 @@
/* Device 0:0.0 PCI configuration space */
#include <linux/bitops.h>
+
+struct udevice;
+
#define MCHBAR 0x48
/* RAPL Package Power Limit register under MCHBAR */
diff --git a/arch/x86/include/asm/cpu_common.h b/arch/x86/include/asm/cpu_common.h
index 2a5779a8e1a..e41ceda73a8 100644
--- a/arch/x86/include/asm/cpu_common.h
+++ b/arch/x86/include/asm/cpu_common.h
@@ -14,6 +14,7 @@ enum {
};
struct cpu_info;
+struct udevice;
/**
* cpu_common_init() - Set up common CPU init
diff --git a/arch/x86/include/asm/fast_spi.h b/arch/x86/include/asm/fast_spi.h
index 7a81d4f05c6..82e3d8f63ef 100644
--- a/arch/x86/include/asm/fast_spi.h
+++ b/arch/x86/include/asm/fast_spi.h
@@ -6,8 +6,10 @@
#ifndef ASM_FAST_SPI_H
#define ASM_FAST_SPI_H
-/* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
+#include <pci.h>
#include <linux/bitops.h>
+
+/* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
struct fast_spi_regs {
u32 bfp;
u32 hsfsts_ctl;
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index cf6c33cbe3a..83dc09757e0 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -7,7 +7,7 @@
#ifndef _ASM_IO_H
#define _ASM_IO_H
-#include <linux/compiler.h>
+#include <compiler.h>
/*
* This file contains the definitions for the x86 IO instructions
diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h
index 1e4e35321de..1a3ae8e3950 100644
--- a/arch/x86/include/asm/mp.h
+++ b/arch/x86/include/asm/mp.h
@@ -11,6 +11,8 @@
#include <asm/atomic.h>
#include <asm/cache.h>
+struct udevice;
+
enum {
/* Indicates that the function should run on all CPUs */
MP_SELECT_ALL = -1,
diff --git a/arch/x86/include/asm/mrccache.h b/arch/x86/include/asm/mrccache.h
index b60d1171f77..8b104a2f0b8 100644
--- a/arch/x86/include/asm/mrccache.h
+++ b/arch/x86/include/asm/mrccache.h
@@ -7,6 +7,8 @@
#ifndef _ASM_MRCCACHE_H
#define _ASM_MRCCACHE_H
+#include <compiler.h>
+
#define MRC_DATA_ALIGN 0x100
#define MRC_DATA_SIGNATURE (('M' << 0) | ('R' << 8) | \
('C' << 16) | ('D'<<24))
diff --git a/arch/x86/lib/acpi_s3.c b/arch/x86/lib/acpi_s3.c
index 52410a515df..2c70acbe7b0 100644
--- a/arch/x86/lib/acpi_s3.c
+++ b/arch/x86/lib/acpi_s3.c
@@ -7,6 +7,7 @@
#include <acpi/acpi_s3.h>
#include <acpi/acpi_table.h>
#include <asm/acpi.h>
+#include <asm/global_data.h>
#include <asm/post.h>
#include <linux/linkage.h>
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 9a41ecb587d..5ec31301d0b 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -22,6 +22,7 @@
#include <acpi/acpi_table.h>
#include <asm/acpi/global_nvs.h>
#include <asm/ioapic.h>
+#include <asm/global_data.h>
#include <asm/lapic.h>
#include <asm/mpspec.h>
#include <asm/tables.h>
diff --git a/arch/x86/lib/asm-offsets.c b/arch/x86/lib/asm-offsets.c
index 47b38cd9e78..8df67db65c3 100644
--- a/arch/x86/lib/asm-offsets.c
+++ b/arch/x86/lib/asm-offsets.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <asm/global_data.h>
#include <linux/kbuild.h>
int main(void)
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index 3ab432e2623..fbdc3b04e36 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -6,6 +6,7 @@
* Copyright (C) 2009-2010 coresystems GmbH
*/
#include <common.h>
+#include <compiler.h>
#include <bios_emul.h>
#include <irq_func.h>
#include <log.h>
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index da6b8ce1ec1..aa5f0bf6b72 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -12,6 +12,7 @@
#include <command.h>
#include <hang.h>
#include <log.h>
+#include <asm/global_data.h>
#include <dm/device.h>
#include <dm/root.h>
#include <errno.h>
diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c
index baaf3d13ad4..4facbe5f32f 100644
--- a/arch/x86/lib/cmd_boot.c
+++ b/arch/x86/lib/cmd_boot.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
+#include <asm/global_data.h>
#include <asm/u-boot-x86.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index 6cd32443012..6eab0452fda 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -10,6 +10,7 @@
#include <acpi/acpi_s3.h>
#include <asm/coreboot_tables.h>
#include <asm/e820.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c
index 1f20c5c8c6b..12fcff12380 100644
--- a/arch/x86/lib/e820.c
+++ b/arch/x86/lib/e820.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <efi_loader.h>
#include <asm/e820.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 4061fa244c4..6365b0a50a7 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -13,6 +13,7 @@
#include <acpi/acpi_s3.h>
#include <asm/cmos_layout.h>
#include <asm/early_cmos.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/mrccache.h>
#include <asm/post.h>
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 3ffd40ce747..8ad9aeedac0 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <asm/fsp/fsp_support.h>
#include <asm/e820.h>
+#include <asm/global_data.h>
#include <asm/mrccache.h>
#include <asm/mtrr.h>
#include <asm/post.h>
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index a029237d08e..cc909e0e16a 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -13,6 +13,7 @@
#include <video.h>
#include <acpi/acpi_table.h>
#include <asm/fsp/fsp_support.h>
+#include <asm/global_data.h>
#include <asm/intel_opregion.h>
#include <asm/mtrr.h>
#include <dm/acpi.h>
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index da351cf097c..20926171822 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -13,6 +13,7 @@
#include <acpi/acpi_s3.h>
#include <asm/cmos_layout.h>
#include <asm/early_cmos.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/mrccache.h>
#include <asm/post.h>
diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index e3f9e30f6a6..cfd9b9f48c3 100644
--- a/arch/x86/lib/fsp1/fsp_dram.c
+++ b/arch/x86/lib/fsp1/fsp_dram.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
#include <asm/fsp/fsp_support.h>
+#include <asm/global_data.h>
int dram_init(void)
{
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index a95fdc46c1b..42d3892b762 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -16,6 +16,7 @@
#include <asm/fsp/fsp_support.h>
#include <asm/fsp2/fsp_api.h>
#include <asm/fsp2/fsp_internal.h>
+#include <asm/global_data.h>
#include <linux/sizes.h>
int dram_init(void)
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index ce0b0aff76b..022e2cb64e5 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -11,6 +11,7 @@
#include <bootstage.h>
#include <dm.h>
#include <log.h>
+#include <asm/global_data.h>
#include <asm/mrccache.h>
#include <asm/fsp/fsp_infoheader.h>
#include <asm/fsp2/fsp_api.h>
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index ead3493de82..a96d2b183f6 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -17,6 +17,7 @@
#include <asm/arch/fsp/fsp_s_upd.h>
#include <asm/fsp/fsp_infoheader.h>
#include <asm/fsp2/fsp_internal.h>
+#include <asm/global_data.h>
int fsp_silicon_init(bool s3wake, bool use_spi_flash)
{
diff --git a/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c
index f220ef498b0..503f97d5f33 100644
--- a/arch/x86/lib/fsp2/fsp_support.c
+++ b/arch/x86/lib/fsp2/fsp_support.c
@@ -10,6 +10,7 @@
#include <spi_flash.h>
#include <asm/fsp/fsp_support.h>
#include <asm/fsp2/fsp_internal.h>
+#include <asm/global_data.h>
/* The amount of the FSP header to probe to obtain what we need */
#define PROBE_BUF_SIZE 0x180
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index d906b528b35..066dc404a2d 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
+#include <asm/global_data.h>
#include <linux/errno.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index 562a27c5579..8e97d9ff36d 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -12,6 +12,7 @@
#include <fdtdec.h>
#include <log.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/irq.h>
#include <asm/ioapic.h>
#include <asm/lapic.h>
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index f181e8100cb..b5269156801 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -15,6 +15,7 @@
#include <net.h>
#include <spi.h>
#include <spi_flash.h>
+#include <asm/global_data.h>
#include <asm/mrccache.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index 4578046169a..c11101b44ec 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <physmem.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <linux/compiler.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/pinctrl_ich6.c b/arch/x86/lib/pinctrl_ich6.c
index 482599478b8..fd5e311b291 100644
--- a/arch/x86/lib/pinctrl_ich6.c
+++ b/arch/x86/lib/pinctrl_ich6.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/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c
index eb6a7d96de1..caeaec9287f 100644
--- a/arch/x86/lib/pirq_routing.c
+++ b/arch/x86/lib/pirq_routing.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <log.h>
#include <pci.h>
+#include <asm/global_data.h>
#include <asm/pci.h>
#include <asm/pirq_routing.h>
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index ecbd0927e07..6fe51516477 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <log.h>
#include <relocate.h>
+#include <asm/global_data.h>
#include <asm/u-boot-x86.h>
#include <asm/sections.h>
#include <elf.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 6699de49c63..1bae1f4f321 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -17,6 +17,7 @@
#include <syscon.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
+#include <asm/global_data.h>
#include <asm/mrccache.h>
#include <asm/mtrr.h>
#include <asm/pci.h>
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index c4007fa4866..1779bb3e11a 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <smbios.h>
#include <acpi/acpi_table.h>
+#include <asm/global_data.h>
#include <asm/sfi.h>
#include <asm/mpspec.h>
#include <asm/tables.h>
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index c84a0c9bc7d..ac6b6efbccd 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <spl.h>
#include <asm/cpu.h>
+#include <asm/global_data.h>
#include <asm/mtrr.h>
#include <asm/processor.h>
#include <asm-generic/sections.h>