From 45d3205ba565ababcaf1e9e85a63dd7a0b1d72be Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 7 Oct 2022 10:07:12 +0200 Subject: [PATCH] cpu/x86: Clean up includes Signed-off-by: Elyes Haouas Change-Id: I01c6651079333686cb0eb68e89e56d7907868124 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68204 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/cpu/x86/backup_default_smm.c | 4 ++-- src/cpu/x86/lapic/boot_cpu.c | 4 ++-- src/cpu/x86/lapic/lapic.c | 4 ++-- src/cpu/x86/lapic/lapic_cpu_stop.c | 1 + src/cpu/x86/mtrr/debug.c | 1 + src/cpu/x86/mtrr/earlymtrr.c | 2 +- src/cpu/x86/smi_trigger.c | 1 + src/cpu/x86/smm/save_state.c | 4 +++- src/cpu/x86/smm/smm_module_handler.c | 5 ++++- src/cpu/x86/tsc/delay_tsc.c | 1 + 10 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/cpu/x86/backup_default_smm.c b/src/cpu/x86/backup_default_smm.c index 1672e0b1dc..a574237c80 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 #include -#include #include +#include #include +#include 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 cf220d5187..fd708704da 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 -#include #include +#include +#include #if CONFIG(SMP) int boot_cpu(void) diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c index 2d04fb3a80..24d2e37d47 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 +#include #include #include #include #include -#include #include -#include +#include 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 1affe15bed..6eacba6c21 100644 --- a/src/cpu/x86/lapic/lapic_cpu_stop.c +++ b/src/cpu/x86/lapic/lapic_cpu_stop.c @@ -4,6 +4,7 @@ #include #include #include +#include /** * 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 4ecae068b7..a3e40d3a6c 100644 --- a/src/cpu/x86/mtrr/debug.c +++ b/src/cpu/x86/mtrr/debug.c @@ -2,6 +2,7 @@ #include #include +#include #include #include diff --git a/src/cpu/x86/mtrr/earlymtrr.c b/src/cpu/x86/mtrr/earlymtrr.c index 2c14a70609..aa430d5330 100644 --- a/src/cpu/x86/mtrr/earlymtrr.c +++ b/src/cpu/x86/mtrr/earlymtrr.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include /* 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 e4c6dc9417..470ecde8b0 100644 --- a/src/cpu/x86/smi_trigger.c +++ b/src/cpu/x86/smi_trigger.c @@ -3,6 +3,7 @@ #include #include #include +#include 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 bb08f86414..d8c44a85e0 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 +#include #include +#include +#include /* 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 e18a26a250..e813f786e6 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 +#include +#include #include #include -#include +#include #include #include +#include #if CONFIG(SPI_FLASH_SMM) #include diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c index 9607c2c6eb..978a6ee8e9 100644 --- a/src/cpu/x86/tsc/delay_tsc.c +++ b/src/cpu/x86/tsc/delay_tsc.c @@ -3,6 +3,7 @@ #include #include #include +#include #include void init_timer(void)