arch/atomic: remove up_testset in spinlock - #20056
Draft
zhangyu-duck wants to merge 1 commit into
Draft
Conversation
zhangyu-duck
force-pushed
the
arch-atomic-remove-up_testset
branch
2 times, most recently
from
September 4, 2026 02:58
1799cdc to
e53a90f
Compare
|
Remove the per-arch testset implementation from the spinlock layer.
The testset abstraction predates the unified spinlock.h API and is no
longer used now that all arches provide spin_lock_irqsave()/
spin_unlock_irqrestore() directly. Drop the per-arch *_testset.{c,S}
implementations and spinlock.h files for arm, sim, sparc, tricore,
x86_64, and xtensa, along with the CXD56_TESTSET,
CXD56_TESTSET_WITH_HWSEM, and CXD56_ATOMIC_WITH_HWSEM Kconfig options
in arch/arm/src/cxd56xx, and simplify the CXD56 semaphore pool loop
in cxd56_sph.c to a single unconditional range.
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
zhangyu-duck
force-pushed
the
arch-atomic-remove-up_testset
branch
from
September 4, 2026 06:06
e53a90f to
3b298ff
Compare
xiaoxiang781216
approved these changes
Sep 4, 2026
xiaoxiang781216
approved these changes
Sep 4, 2026
acassis
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the per-arch
testsetimplementation from the spinlock layer. Thetestsetabstraction predates the unifiedspinlock.hAPI and is no longer used now that all arches providespin_lock_irqsave()/spin_unlock_irqrestore()directly.Changes
arch/<arch>/include/spinlock.hand the per-arch*_testset.{c,S}implementations for arm, sim, sparc, tricore, x86_64, xtensaCXD56_TESTSET,CXD56_TESTSET_WITH_HWSEM, andCXD56_ATOMIC_WITH_HWSEMKconfig options fromarch/arm/src/cxd56xx/Kconfigcxd56_sph.cto a singlefor (i = 3; i < 15; i++)pathDocumentation/Impact
testsetfor spinlock must now providespin_lock_irqsave()/spin_unlock_irqrestore()viaarch/<arch>/include/spinlock.h(or the defaultup_irq_save()/up_irq_restore()fallback ininclude/nuttx/spinlock.h). All currently-supported arches already do this.