Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuttx/arch: remove the custom board check in up_testset implementation #14963

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ config ARCH_HAVE_TESTSET
bool
default n

config ARCH_HAVE_CUSTOM_TESTSET
bool
default n

config ARCH_HAVE_THREAD_LOCAL
bool
default n
Expand Down
6 changes: 4 additions & 2 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ config ARCH_CHIP_LC823450
select ARCH_HAVE_HEAPCHECK
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_CUSTOM_TESTSET
select ARCH_HAVE_CUSTOM_VECTORS
---help---
ON Semiconductor LC823450 architectures (ARM dual Cortex-M3)
Expand Down Expand Up @@ -344,11 +345,11 @@ config ARCH_CHIP_RP2040
select ARCH_CORTEXM0
select ARCH_HAVE_RAMVECTORS
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_TESTSET
select ARCH_HAVE_I2CRESET
select ARM_HAVE_WFE_SEV
select ARCH_HAVE_PWM_MULTICHAN
select ARCH_BOARD_COMMON
select ARCH_HAVE_CUSTOM_TESTSET
extinguish marked this conversation as resolved.
Show resolved Hide resolved
select ARCH_HAVE_CUSTOM_VECTORS
---help---
Raspberry Pi RP2040 architectures (ARM dual Cortex-M0+).
Expand All @@ -358,9 +359,9 @@ config ARCH_CHIP_RP23XX
select ARCH_CORTEXM33
select ARCH_HAVE_RAMVECTORS
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_TESTSET
select ARCH_HAVE_I2CRESET
select ARM_HAVE_WFE_SEV
select ARCH_HAVE_CUSTOM_TESTSET
select ARCH_HAVE_PWM_MULTICHAN
select ARCH_BOARD_COMMON
---help---
Expand Down Expand Up @@ -684,6 +685,7 @@ config ARCH_CHIP_CXD56XX
select ARCH_HAVE_SDIO if MMCSD
select ARCH_HAVE_MATH_H
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_CUSTOM_TESTSET
select ARCH_HAVE_CUSTOM_VECTORS
select LIBC_ARCH_ATOMIC if SMP
---help---
Expand Down
6 changes: 1 addition & 5 deletions arch/arm/include/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ typedef uint8_t spinlock_t;
*
****************************************************************************/

#if defined(CONFIG_ARCH_HAVE_TESTSET) \
&& !defined(CONFIG_ARCH_CHIP_LC823450) \
&& !defined(CONFIG_ARCH_CHIP_CXD56XX) \
&& !defined(CONFIG_ARCH_CHIP_RP2040) \
&& !defined(CONFIG_ARCH_CHIP_RP23XX)
#if defined(CONFIG_ARCH_HAVE_TESTSET) && !defined(CONFIG_ARCH_HAVE_CUSTOM_TESTSET)
static inline_function spinlock_t up_testset(volatile spinlock_t *lock)
{
spinlock_t ret = SP_UNLOCKED;
Expand Down
2 changes: 1 addition & 1 deletion include/nuttx/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ extern volatile uint8_t g_irq_spin_count[CONFIG_SMP_NCPUS];
*
****************************************************************************/

#if defined(CONFIG_ARCH_HAVE_TESTSET)
#if defined(CONFIG_ARCH_HAVE_TESTSET) || defined(CONFIG_ARCH_HAVE_CUSTOM_TESTSET)
spinlock_t up_testset(FAR volatile spinlock_t *lock);
#else
static inline spinlock_t up_testset(FAR volatile spinlock_t *lock)
Expand Down
2 changes: 1 addition & 1 deletion sched/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ config SMP
bool "Symmetric Multi-Processing (SMP)"
default n
depends on ARCH_HAVE_MULTICPU
depends on ARCH_HAVE_TESTSET
depends on ARCH_HAVE_TESTSET || ARCH_HAVE_CUSTOM_TESTSET
depends on ARCH_INTERRUPTSTACK != 0
select SPINLOCK
select IRQCOUNT
Expand Down
Loading