From 6f3009ecf07fcc8b397f24591bee2cd518787222 Mon Sep 17 00:00:00 2001 From: "Charles E. Youse" Date: Thu, 27 Jun 2019 14:04:51 -0700 Subject: [PATCH] arch/x86: move include/arch/x86/asm.h to include/arch/x86/ia32/asm.h This file is 32-bit specific, so it is moved into the ia32/ directory and references to it are updated accordingly. Also, SP_ARG* definitions are no longer used, so they are removed. Signed-off-by: Charles E. Youse --- arch/x86/core/ia32/cache_s.S | 2 +- arch/x86/core/ia32/crt0.S | 2 +- arch/x86/core/ia32/excstub.S | 2 +- arch/x86/core/ia32/intstub.S | 2 +- arch/x86/core/ia32/swap.S | 2 +- arch/x86/core/ia32/userspace.S | 2 +- .../interrupt_controller/loapic_spurious.S | 2 +- include/arch/x86/{ => ia32}/asm.h | 19 +++---------------- soc/x86/intel_quark/quark_se/soc_power.S | 2 +- tests/kernel/static_idt/src/test_stubs.S | 2 +- 10 files changed, 12 insertions(+), 25 deletions(-) rename include/arch/x86/{ => ia32}/asm.h (81%) diff --git a/arch/x86/core/ia32/cache_s.S b/arch/x86/core/ia32/cache_s.S index e0c51ec927d..95c0923ec72 100644 --- a/arch/x86/core/ia32/cache_s.S +++ b/arch/x86/core/ia32/cache_s.S @@ -10,7 +10,7 @@ * This module contains functions for manipulating caches. */ -#include +#include #ifndef CONFIG_CLFLUSH_INSTRUCTION_SUPPORTED diff --git a/arch/x86/core/ia32/crt0.S b/arch/x86/core/ia32/crt0.S index f97111998b4..eb099904d44 100644 --- a/arch/x86/core/ia32/crt0.S +++ b/arch/x86/core/ia32/crt0.S @@ -11,7 +11,7 @@ * after having been loaded into RAM. */ -#include +#include #include #include #include diff --git a/arch/x86/core/ia32/excstub.S b/arch/x86/core/ia32/excstub.S index a4ed87e278d..942063ab991 100644 --- a/arch/x86/core/ia32/excstub.S +++ b/arch/x86/core/ia32/excstub.S @@ -15,7 +15,7 @@ */ #include -#include +#include #include /* For MK_ISR_NAME */ #include diff --git a/arch/x86/core/ia32/intstub.S b/arch/x86/core/ia32/intstub.S index 41fd968b3d6..1addcc60284 100644 --- a/arch/x86/core/ia32/intstub.S +++ b/arch/x86/core/ia32/intstub.S @@ -15,7 +15,7 @@ */ #include -#include +#include #include #include /* _NANO_ERR_SPURIOUS_INT */ #include diff --git a/arch/x86/core/ia32/swap.S b/arch/x86/core/ia32/swap.S index dbad84d109d..128b3b337e8 100644 --- a/arch/x86/core/ia32/swap.S +++ b/arch/x86/core/ia32/swap.S @@ -18,7 +18,7 @@ */ #include -#include +#include #include /* exports (internal APIs) */ diff --git a/arch/x86/core/ia32/userspace.S b/arch/x86/core/ia32/userspace.S index 9ffcefeedc0..8b312a24351 100644 --- a/arch/x86/core/ia32/userspace.S +++ b/arch/x86/core/ia32/userspace.S @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/interrupt_controller/loapic_spurious.S b/drivers/interrupt_controller/loapic_spurious.S index 394b62fb151..739e585acd5 100644 --- a/drivers/interrupt_controller/loapic_spurious.S +++ b/drivers/interrupt_controller/loapic_spurious.S @@ -10,7 +10,7 @@ */ #include -#include +#include GTEXT(z_loapic_spurious_handler) diff --git a/include/arch/x86/asm.h b/include/arch/x86/ia32/asm.h similarity index 81% rename from include/arch/x86/asm.h rename to include/arch/x86/ia32/asm.h index c53a2f6508a..ebae5eec437 100644 --- a/include/arch/x86/asm.h +++ b/include/arch/x86/ia32/asm.h @@ -6,25 +6,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -#ifndef ZEPHYR_INCLUDE_ARCH_X86_ASM_H_ -#define ZEPHYR_INCLUDE_ARCH_X86_ASM_H_ - +#ifndef ZEPHYR_INCLUDE_ARCH_X86_IA32_ASM_H_ +#define ZEPHYR_INCLUDE_ARCH_X86_IA32_ASM_H_ #include #include -/* offsets from stack pointer to function arguments */ - -#define SP_ARG0 0 -#define SP_ARG1 4 -#define SP_ARG2 8 -#define SP_ARG3 12 -#define SP_ARG4 16 -#define SP_ARG5 20 -#define SP_ARG6 24 -#define SP_ARG7 28 -#define SP_ARG8 32 - #if defined(_ASMLANGUAGE) #if defined(CONFIG_X86_RETPOLINE) @@ -86,4 +73,4 @@ GTEXT(z_x86_trampoline_to_kernel) #endif /* CONFIG_X86_KPTI */ #endif /* _ASMLANGUAGE */ -#endif /* ZEPHYR_INCLUDE_ARCH_X86_ASM_H_ */ +#endif /* ZEPHYR_INCLUDE_ARCH_X86_IA32_ASM_H_ */ diff --git a/soc/x86/intel_quark/quark_se/soc_power.S b/soc/x86/intel_quark/quark_se/soc_power.S index 2fabdcc4912..c919072c2ef 100644 --- a/soc/x86/intel_quark/quark_se/soc_power.S +++ b/soc/x86/intel_quark/quark_se/soc_power.S @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES GDATA(_pm_save_gdtr) diff --git a/tests/kernel/static_idt/src/test_stubs.S b/tests/kernel/static_idt/src/test_stubs.S index 9b792b5f987..27bf03ebb71 100644 --- a/tests/kernel/static_idt/src/test_stubs.S +++ b/tests/kernel/static_idt/src/test_stubs.S @@ -16,7 +16,7 @@ testing. #include #include -#include +#include #include /* imports (internal APIs) */