diff --git a/include/spinlock.h b/include/spinlock.h index 44d4c6abdad..779d891e117 100644 --- a/include/spinlock.h +++ b/include/spinlock.h @@ -61,7 +61,7 @@ struct k_spinlock { bool z_spin_lock_valid(struct k_spinlock *l); bool z_spin_unlock_valid(struct k_spinlock *l); void z_spin_lock_set_owner(struct k_spinlock *l); -BUILD_ASSERT(CONFIG_MP_NUM_CPUS < 4, "Too many CPUs for mask"); +BUILD_ASSERT(CONFIG_MP_NUM_CPUS <= 4, "Too many CPUs for mask"); #endif /* CONFIG_SPIN_VALIDATE */ /** diff --git a/subsys/debug/Kconfig b/subsys/debug/Kconfig index 8c886eb0fa4..99f2b381102 100644 --- a/subsys/debug/Kconfig +++ b/subsys/debug/Kconfig @@ -222,7 +222,7 @@ config ASSERT_LEVEL config SPIN_VALIDATE bool "Enable spinlock validation" depends on ASSERT - depends on MP_NUM_CPUS < 4 + depends on MP_NUM_CPUS <= 4 default y if !FLASH || FLASH_SIZE > 32 help There's a spinlock validation framework available when asserts are diff --git a/tests/kernel/spinlock/testcase.yaml b/tests/kernel/spinlock/testcase.yaml index 6afc1715a52..c4c6338e440 100644 --- a/tests/kernel/spinlock/testcase.yaml +++ b/tests/kernel/spinlock/testcase.yaml @@ -1,4 +1,4 @@ tests: kernel.multiprocessing.spinlock: tags: smp spinlock - filter: CONFIG_SMP and CONFIG_MP_NUM_CPUS > 1 + filter: CONFIG_SMP and CONFIG_MP_NUM_CPUS > 1 and CONFIG_MP_NUM_CPUS <= 4