Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68204 )
Change subject: cpu/x86: Clean up includes ......................................................................
cpu/x86: Clean up includes
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: I01c6651079333686cb0eb68e89e56d7907868124 --- M src/cpu/x86/backup_default_smm.c M src/cpu/x86/lapic/boot_cpu.c M src/cpu/x86/lapic/lapic.c M src/cpu/x86/lapic/lapic_cpu_stop.c M src/cpu/x86/mtrr/debug.c M src/cpu/x86/mtrr/earlymtrr.c M src/cpu/x86/smi_trigger.c M src/cpu/x86/smm/save_state.c M src/cpu/x86/smm/smm_module_handler.c M src/cpu/x86/tsc/delay_tsc.c 10 files changed, 28 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/68204/1
diff --git a/src/cpu/x86/backup_default_smm.c b/src/cpu/x86/backup_default_smm.c index 1672e0b..a574237 100644 --- a/src/cpu/x86/backup_default_smm.c +++ b/src/cpu/x86/backup_default_smm.c @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <string.h> #include <acpi/acpi.h> -#include <console/console.h> #include <cbmem.h> +#include <console/console.h> #include <cpu/x86/smm.h> +#include <string.h>
void *backup_default_smm_area(void) { diff --git a/src/cpu/x86/lapic/boot_cpu.c b/src/cpu/x86/lapic/boot_cpu.c index cf220d5..fd70870 100644 --- a/src/cpu/x86/lapic/boot_cpu.c +++ b/src/cpu/x86/lapic/boot_cpu.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <smp/node.h> -#include <cpu/x86/msr.h> #include <cpu/x86/lapic_def.h> +#include <cpu/x86/msr.h> +#include <smp/node.h>
#if CONFIG(SMP) int boot_cpu(void) diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c index 2d04fb3..24d2e37 100644 --- a/src/cpu/x86/lapic/lapic.c +++ b/src/cpu/x86/lapic/lapic.c @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <assert.h> +#include <console/console.h> #include <cpu/cpu.h> #include <cpu/x86/lapic.h> #include <cpu/x86/lapic_def.h> #include <cpu/x86/msr.h> -#include <console/console.h> #include <smp/node.h> -#include <stdint.h> +#include <types.h>
void enable_lapic_mode(bool try_set_x2apic) { diff --git a/src/cpu/x86/lapic/lapic_cpu_stop.c b/src/cpu/x86/lapic/lapic_cpu_stop.c index 1affe15..6eacba6 100644 --- a/src/cpu/x86/lapic/lapic_cpu_stop.c +++ b/src/cpu/x86/lapic/lapic_cpu_stop.c @@ -4,6 +4,7 @@ #include <cpu/x86/lapic.h> #include <delay.h> #include <halt.h> +#include <stdint.h>
/** * Sending INIT IPI to self is equivalent of asserting #INIT with a bit of diff --git a/src/cpu/x86/mtrr/debug.c b/src/cpu/x86/mtrr/debug.c index 4ecae06..2725b77 100644 --- a/src/cpu/x86/mtrr/debug.c +++ b/src/cpu/x86/mtrr/debug.c @@ -2,6 +2,7 @@
#include <console/console.h> #include <cpu/cpu.h> +#include <cpu/x86/msr.h #include <cpu/x86/mtrr.h> #include <stdint.h>
diff --git a/src/cpu/x86/mtrr/earlymtrr.c b/src/cpu/x86/mtrr/earlymtrr.c index 2c14a70..aa430d5 100644 --- a/src/cpu/x86/mtrr/earlymtrr.c +++ b/src/cpu/x86/mtrr/earlymtrr.c @@ -5,7 +5,7 @@ #include <cpu/x86/msr.h> #include <console/console.h> #include <commonlib/bsd/helpers.h> -#include <stdint.h> +#include <types.h>
/* Get first available variable MTRR. * Returns var# if available, else returns -1. diff --git a/src/cpu/x86/smi_trigger.c b/src/cpu/x86/smi_trigger.c index e4c6dc9..470ecde 100644 --- a/src/cpu/x86/smi_trigger.c +++ b/src/cpu/x86/smi_trigger.c @@ -3,6 +3,7 @@ #include <arch/io.h> #include <console/console.h> #include <cpu/x86/smm.h> +#include <stdint.h>
static void apmc_log(const char *fn, u8 cmd) { diff --git a/src/cpu/x86/smm/save_state.c b/src/cpu/x86/smm/save_state.c index bb08f86..d8c44a8 100644 --- a/src/cpu/x86/smm/save_state.c +++ b/src/cpu/x86/smm/save_state.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <cpu/x86/smm.h> +#include <commonlib/bsd/helpers.h> #include <cpu/x86/save_state.h> +#include <cpu/x86/smm.h> +#include <types.h>
/* These are weakly linked such that platforms can link only the save state ops they actually require. */ diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c index e18a26a..e813f78 100644 --- a/src/cpu/x86/smm/smm_module_handler.c +++ b/src/cpu/x86/smm/smm_module_handler.c @@ -1,11 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/io.h> +#include <commonlib/bsd/compiler.h> +#include <commonlib/region.h> #include <console/cbmem_console.h> #include <console/console.h> -#include <commonlib/region.h> +#include <cpu/cpu.h> #include <cpu/x86/smm.h> #include <rmodule.h> +#include <types.h>
#if CONFIG(SPI_FLASH_SMM) #include <spi-generic.h> diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c index 9607c2c..978a6ee 100644 --- a/src/cpu/x86/tsc/delay_tsc.c +++ b/src/cpu/x86/tsc/delay_tsc.c @@ -3,6 +3,7 @@ #include <arch/cpu.h> #include <cpu/x86/tsc.h> #include <delay.h> +#include <stdint.h> #include <thread.h>
void init_timer(void)