zhangyu-duck opened a new pull request, #20056:
URL: https://github.com/apache/nuttx/pull/20056

   ### Summary
   
   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.
   
   ### Changes
   
   - Delete `arch/<arch>/include/spinlock.h` and the per-arch `*_testset.{c,S}` 
implementations for arm, sim, sparc, tricore, x86_64, xtensa
   - Drop the `CXD56_TESTSET`, `CXD56_TESTSET_WITH_HWSEM`, and 
`CXD56_ATOMIC_WITH_HWSEM` Kconfig options from `arch/arm/src/cxd56xx/Kconfig`
   - Simplify the CXD56 semaphore pool loop in `cxd56_sph.c` to a single `for 
(i = 3; i < 15; i++)` path
   - Clean up the SMP/testset references in `Documentation/`
   
   ### Impact
   
   - Archs that previously relied on `testset` for spinlock must now provide 
`spin_lock_irqsave()`/`spin_unlock_irqrestore()` via 
`arch/<arch>/include/spinlock.h` (or the default 
`up_irq_save()`/`up_irq_restore()` fallback in `include/nuttx/spinlock.h`). All 
currently-supported arches already do this.
   - CXD56 no longer exposes the custom testset/hwsem config knobs; its 
spinlock path falls back to the generic IRQ-based implementation.
   - No functional change for arches that were already using the unified 
spinlock API.
   
   ### Testing
   
   - [ ] Compile-test on sim (qemu)
   - [ ] Compile-test on arm (stm32f4discovery or similar)
   - [ ] Runtime smoke test on sim/nsh
   
   ### Notes
   
   - Single commit on top of `apache/master`.
   - Original work by zhangyu117 <[email protected]> (VELAPLATFO-66334), 
rebased to current master with conflict resolution in 
`arch/arm/src/cxd56xx/{Kconfig,cxd56_sph.c}` (accepted our deletions of the 
testset config block and the conditional compilation branch).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to