* [PATCH] alpha: Select ARCH_SUPPORTS_ATOMIC_RMW
@ 2026-04-03 15:03 Matt Turner
2026-04-12 8:13 ` Magnus Lindholm
0 siblings, 1 reply; 2+ messages in thread
From: Matt Turner @ 2026-04-03 15:03 UTC (permalink / raw)
To: Magnus Lindholm; +Cc: linux-alpha, linux-kernel, Matt Turner
Alpha has native LL/SC instructions (LDL_L/STL_C, LDQ_L/STQ_C) that
provide atomic read-modify-write capability, and already selects
ARCH_HAVE_NMI_SAFE_CMPXCHG.
Selecting ARCH_SUPPORTS_ATOMIC_RMW enables MUTEX_SPIN_ON_OWNER and
RWSEM_SPIN_ON_OWNER on SMP, allowing optimistic spinning on contended
locks rather than immediately sleeping.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git ./arch/alpha/Kconfig ./arch/alpha/Kconfig
index 4329743757e3..57c91ed67b71 100644
--- ./arch/alpha/Kconfig
+++ ./arch/alpha/Kconfig
@@ -10,6 +10,7 @@ config ALPHA
select ARCH_MODULE_NEEDS_WEAK_PER_CPU if SMP
select ARCH_NO_PREEMPT
select ARCH_NO_SG_CHAIN
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
select ARCH_USE_CMPXCHG_LOCKREF
select FORCE_PCI
--
2.52.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] alpha: Select ARCH_SUPPORTS_ATOMIC_RMW
2026-04-03 15:03 [PATCH] alpha: Select ARCH_SUPPORTS_ATOMIC_RMW Matt Turner
@ 2026-04-12 8:13 ` Magnus Lindholm
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Lindholm @ 2026-04-12 8:13 UTC (permalink / raw)
To: Matt Turner; +Cc: linux-alpha, linux-kernel
On Fri, Apr 3, 2026 at 5:03 PM Matt Turner <mattst88@gmail.com> wrote:
>
> Alpha has native LL/SC instructions (LDL_L/STL_C, LDQ_L/STQ_C) that
> provide atomic read-modify-write capability, and already selects
> ARCH_HAVE_NMI_SAFE_CMPXCHG.
>
> Selecting ARCH_SUPPORTS_ATOMIC_RMW enables MUTEX_SPIN_ON_OWNER and
> RWSEM_SPIN_ON_OWNER on SMP, allowing optimistic spinning on contended
> locks rather than immediately sleeping.
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Matt Turner <mattst88@gmail.com>
> ---
> arch/alpha/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git ./arch/alpha/Kconfig ./arch/alpha/Kconfig
> index 4329743757e3..57c91ed67b71 100644
> --- ./arch/alpha/Kconfig
> +++ ./arch/alpha/Kconfig
> @@ -10,6 +10,7 @@ config ALPHA
> select ARCH_MODULE_NEEDS_WEAK_PER_CPU if SMP
> select ARCH_NO_PREEMPT
> select ARCH_NO_SG_CHAIN
> + select ARCH_SUPPORTS_ATOMIC_RMW
> select ARCH_SUPPORTS_PAGE_TABLE_CHECK
> select ARCH_USE_CMPXCHG_LOCKREF
> select FORCE_PCI
> --
Hi Matt,
Support for pre-BWX CPUs has been removed from the kernel for quite
some time, so all supported Alpha systems now have full byte/word
instruction support along with the existing LL/SC primitives
(LDL_L/STL_C, LDQ_L/STQ_C). Given that, selecting
ARCH_SUPPORTS_ATOMIC_RMW at the architecture level
accurately reflects the capabilities of the CPUs we actually support today.
That said, there have also been efforts (by Maciej Rozycki) to reintroduce
support for non-BWX Alpha systems. If that happens, we may need to
revisit the rationale here, since the "all supported systems have BWX"
argument would no longer apply as stated?
The patch itself fails to apply cleanly on top of v7.0-rc1, I guess
there are entries in your arch/alpha/Kconfig that do not match
what is in v7.0-rc1?
Regards
Magnus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-12 8:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-03 15:03 [PATCH] alpha: Select ARCH_SUPPORTS_ATOMIC_RMW Matt Turner
2026-04-12 8:13 ` Magnus Lindholm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome