From a58480425c5b4c7a3d5000c797f083bc7d5fd532 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Fri, 22 Mar 2024 16:52:04 +0000 Subject: [PATCH] make SMP conditional check more general Check for CONFIG_ENABLE_SMP_SUPPORT instead of checking for the number in CONFIG_MAX_NUM_NODES. This allows enabling SMP support with just one node also. Signed-off-by: Axel Heider --- include/arch/arm/arch/64/mode/machine.h | 2 +- libsel4/include/sel4/syscalls.h | 2 +- src/arch/arm/64/traps.S | 2 +- src/arch/riscv/head.S | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/arch/arm/arch/64/mode/machine.h b/include/arch/arm/arch/64/mode/machine.h index aa83f28c4..d869e3926 100644 --- a/include/arch/arm/arch/64/mode/machine.h +++ b/include/arch/arm/arch/64/mode/machine.h @@ -304,7 +304,7 @@ static inline void invalidateByVA_I(vptr_t vaddr, paddr_t paddr) static inline void invalidate_I_PoU(void) { -#if CONFIG_MAX_NUM_NODES > 1 +#ifdef CONFIG_ENABLE_SMP_SUPPORT asm volatile("ic ialluis"); #else asm volatile("ic iallu"); diff --git a/libsel4/include/sel4/syscalls.h b/libsel4/include/sel4/syscalls.h index a47f81226..5df4da996 100644 --- a/libsel4/include/sel4/syscalls.h +++ b/libsel4/include/sel4/syscalls.h @@ -118,7 +118,7 @@ seL4_DebugCapIdentify(seL4_CPtr cap); */ LIBSEL4_INLINE_FUNC void seL4_DebugNameThread(seL4_CPtr tcb, const char *name); -#if CONFIG_MAX_NUM_NODES > 1 && defined CONFIG_ARCH_ARM +#if defined(CONFIG_ENABLE_SMP_SUPPORT) && defined(CONFIG_ARCH_ARM) /** * @xmlonly @endxmlonly * @brief Sends arbitrary SGI. diff --git a/src/arch/arm/64/traps.S b/src/arch/arm/64/traps.S index 5050bc6b7..6320d54c0 100644 --- a/src/arch/arm/64/traps.S +++ b/src/arch/arm/64/traps.S @@ -32,7 +32,7 @@ .macro lsp_i _tmp mrs \_tmp, TPIDR -#if CONFIG_MAX_NUM_NODES > 1 +#ifdef CONFIG_ENABLE_SMP_SUPPORT bic \_tmp, \_tmp, #0xfff #endif mov sp, \_tmp diff --git a/src/arch/riscv/head.S b/src/arch/riscv/head.S index 990a18fd2..6185a66ab 100644 --- a/src/arch/riscv/head.S +++ b/src/arch/riscv/head.S @@ -30,7 +30,7 @@ _start: la sp, (kernel_stack_alloc + BIT(CONFIG_KERNEL_STACK_BITS)) csrw sscratch, x0 /* zero sscratch for the init task */ -#if CONFIG_MAX_NUM_NODES > 1 +#ifdef CONFIG_ENABLE_SMP_SUPPORT /* setup the per-core stack */ mv t0, a7 slli t0, t0, CONFIG_KERNEL_STACK_BITS