diff --git a/CODEOWNERS b/CODEOWNERS index e08be29ba0..b06792219a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -229,7 +229,7 @@ /include/arch/riscv32/ @nategraff-sifive @kgugala @pgielda /include/arch/x86/ @andrewboie @wentongwu /include/arch/common/ @andrewboie @andyross @nashif -/include/arch/x86/arch.h @andrewboie +/include/arch/x86/ia32/arch.h @andrewboie /include/arch/x86/multiboot.h @gnuless /include/arch/xtensa/ @andrewboie /include/sys/atomic.h @andrewboie @andyross diff --git a/arch/x86/core/ia32/excstub.S b/arch/x86/core/ia32/excstub.S index 942063ab99..085e75b68c 100644 --- a/arch/x86/core/ia32/excstub.S +++ b/arch/x86/core/ia32/excstub.S @@ -16,7 +16,7 @@ #include #include -#include /* For MK_ISR_NAME */ +#include /* For MK_ISR_NAME */ #include diff --git a/arch/x86/core/ia32/intstub.S b/arch/x86/core/ia32/intstub.S index 1addcc6028..f5c7e3d66a 100644 --- a/arch/x86/core/ia32/intstub.S +++ b/arch/x86/core/ia32/intstub.S @@ -443,9 +443,9 @@ z_dynamic_irq_stub_common: /* Create all the dynamic IRQ stubs * - * NOTE: Please update DYN_STUB_SIZE in include/arch/x86/arch.h if you change - * how large the generated stubs are, otherwise _get_dynamic_stub() will - * be unable to correctly determine the offset + * NOTE: Please update DYN_STUB_SIZE in include/arch/x86/ia32/arch.h if you + * change how large the generated stubs are, otherwise _get_dynamic_stub() + * will be unable to correctly determine the offset */ /* diff --git a/arch/x86/core/pcie.c b/arch/x86/core/pcie.c index 7be9b8e1a1..b791ace605 100644 --- a/arch/x86/core/pcie.c +++ b/arch/x86/core/pcie.c @@ -6,7 +6,6 @@ #include #include -#include #ifdef CONFIG_PCIE_MSI #include diff --git a/arch/x86/include/kernel_arch_data.h b/arch/x86/include/kernel_arch_data.h index a3f04f2f49..312a544793 100644 --- a/arch/x86/include/kernel_arch_data.h +++ b/arch/x86/include/kernel_arch_data.h @@ -12,7 +12,7 @@ * other definitions for the Intel Architecture 32 bit (IA-32) processor * architecture. * The header include/kernel.h contains the public kernel interface - * definitions, with include/arch/x86/arch.h supplying the + * definitions, with include/arch/x86/ia32/arch.h supplying the * IA-32 specific portions of the public kernel interface. * * This file is also included by assembly language files which must #define diff --git a/include/arch/cpu.h b/include/arch/cpu.h index 7b6320ac04..8e219e8dca 100644 --- a/include/arch/cpu.h +++ b/include/arch/cpu.h @@ -9,8 +9,8 @@ #ifndef ZEPHYR_INCLUDE_ARCH_CPU_H_ #define ZEPHYR_INCLUDE_ARCH_CPU_H_ -#if defined(CONFIG_X86) -#include +#if defined(CONFIG_X86) && !defined(CONFIG_X86_LONGMODE) +#include #elif defined(CONFIG_X86_64) #include #elif defined(CONFIG_ARM) diff --git a/include/arch/x86/arch.h b/include/arch/x86/ia32/arch.h similarity index 99% rename from include/arch/x86/arch.h rename to include/arch/x86/ia32/arch.h index 555321d8fd..45eb163378 100644 --- a/include/arch/x86/arch.h +++ b/include/arch/x86/ia32/arch.h @@ -11,8 +11,8 @@ * by the generic kernel interface header (include/arch/cpu.h) */ -#ifndef ZEPHYR_INCLUDE_ARCH_X86_ARCH_H_ -#define ZEPHYR_INCLUDE_ARCH_X86_ARCH_H_ +#ifndef ZEPHYR_INCLUDE_ARCH_X86_IA32_ARCH_H_ +#define ZEPHYR_INCLUDE_ARCH_X86_IA32_ARCH_H_ #include #include @@ -20,8 +20,8 @@ #include #include #include -#include "sys_io.h" -#include "ffs.h" +#include "../sys_io.h" +#include "../ffs.h" #ifndef _ASMLANGUAGE #include @@ -668,4 +668,4 @@ void z_x86_reset_pages(void *start, size_t size); } #endif -#endif /* ZEPHYR_INCLUDE_ARCH_X86_ARCH_H_ */ +#endif /* ZEPHYR_INCLUDE_ARCH_X86_IA32_ARCH_H_ */ diff --git a/tests/kernel/mem_protect/x86_mmu_api/src/userbuffer_validate.c b/tests/kernel/mem_protect/x86_mmu_api/src/userbuffer_validate.c index 36e2d27f28..4f6639fdaf 100644 --- a/tests/kernel/mem_protect/x86_mmu_api/src/userbuffer_validate.c +++ b/tests/kernel/mem_protect/x86_mmu_api/src/userbuffer_validate.c @@ -7,9 +7,8 @@ #include #include #include -#include +#include #include -#include #include #include