diff --git a/arch/x86/core/intel64/cpu.c b/arch/x86/core/intel64/cpu.c index 2e15f85cb19..4bb2e65e784 100644 --- a/arch/x86/core/intel64/cpu.c +++ b/arch/x86/core/intel64/cpu.c @@ -32,7 +32,7 @@ struct x86_tss64 tss0 = { .cpu = &(_kernel.cpus[0]) }; -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 1) +#if CONFIG_MP_NUM_CPUS > 1 Z_GENERIC_SECTION(.tss) struct x86_tss64 tss1 = { .ist7 = (u64_t) _exception_stack1 + CONFIG_EXCEPTION_STACK_SIZE, @@ -41,7 +41,7 @@ struct x86_tss64 tss1 = { }; #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 2) +#if CONFIG_MP_NUM_CPUS > 2 Z_GENERIC_SECTION(.tss) struct x86_tss64 tss2 = { .ist7 = (u64_t) _exception_stack2 + CONFIG_EXCEPTION_STACK_SIZE, @@ -50,7 +50,7 @@ struct x86_tss64 tss2 = { }; #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 3) +#if CONFIG_MP_NUM_CPUS > 3 Z_GENERIC_SECTION(.tss) struct x86_tss64 tss3 = { .ist7 = (u64_t) _exception_stack3 + CONFIG_EXCEPTION_STACK_SIZE, @@ -66,19 +66,19 @@ struct x86_cpuboot x86_cpuboot[] = { .sp = (u64_t) _interrupt_stack + CONFIG_ISR_STACK_SIZE, .fn = z_x86_prep_c }, -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 1) +#if CONFIG_MP_NUM_CPUS > 1 { .tr = X86_KERNEL_CPU1_TR, .gs = X86_KERNEL_CPU1_GS, }, #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 2) +#if CONFIG_MP_NUM_CPUS > 2 { .tr = X86_KERNEL_CPU2_TR, .gs = X86_KERNEL_CPU2_GS, }, #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 3) +#if CONFIG_MP_NUM_CPUS > 3 { .tr = X86_KERNEL_CPU3_TR, .gs = X86_KERNEL_CPU3_GS, diff --git a/arch/x86/core/intel64/locore.S b/arch/x86/core/intel64/locore.S index 6fc7f1e7f40..874bcb3f347 100644 --- a/arch/x86/core/intel64/locore.S +++ b/arch/x86/core/intel64/locore.S @@ -14,7 +14,7 @@ .section .locore,"ax" .code32 -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 1) +#if CONFIG_MP_NUM_CPUS > 1 /* * APs are sent here on startup, in real mode. This @@ -65,7 +65,7 @@ x86_ap_start: unknown_loapic_id: jmp unknown_loapic_id -#endif /* CONFIG_SMP && ... */ +#endif /* CONFIG_MP_NUM_CPUS > 1 */ .code32 .globl __start @@ -280,7 +280,7 @@ gdt: .word 0x8900 .word 0, 0, 0, 0, 0 -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 1) +#if CONFIG_MP_NUM_CPUS > 1 /* * CPU 1 task state segment descriptors */ @@ -298,7 +298,7 @@ gdt: .word 0, 0, 0, 0, 0 #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 2) +#if CONFIG_MP_NUM_CPUS > 2 /* * CPU 2 task state segment descriptors */ @@ -316,7 +316,7 @@ gdt: .word 0, 0, 0, 0, 0 #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 3) +#if CONFIG_MP_NUM_CPUS > 3 /* * CPU 3 task state segment descriptors */ @@ -653,21 +653,21 @@ pdp: .long 0x00000183 /* 0x183 = G, 1GB, R/W, P */ _exception_stack: .fill CONFIG_EXCEPTION_STACK_SIZE, 1, 0xAA -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 1) +#if CONFIG_MP_NUM_CPUS > 1 .global _exception_stack1 .align 16 _exception_stack1: .fill CONFIG_EXCEPTION_STACK_SIZE, 1, 0xAA #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 2) +#if CONFIG_MP_NUM_CPUS > 2 .global _exception_stack2 .align 16 _exception_stack2: .fill CONFIG_EXCEPTION_STACK_SIZE, 1, 0xAA #endif -#if defined(CONFIG_SMP) && (CONFIG_MP_NUM_CPUS > 3) +#if CONFIG_MP_NUM_CPUS > 3 .global _exception_stack3 .align 16 _exception_stack3: diff --git a/arch/x86/include/intel64/kernel_arch_func.h b/arch/x86/include/intel64/kernel_arch_func.h index 863a138e5d6..9463774af99 100644 --- a/arch/x86/include/intel64/kernel_arch_func.h +++ b/arch/x86/include/intel64/kernel_arch_func.h @@ -34,7 +34,7 @@ static inline struct _cpu *z_arch_curr_cpu(void) return cpu; } -#if defined(CONFIG_SMP) && defined(CONFIG_SCHED_IPI_SUPPORTED) +#if defined(CONFIG_SMP) #include