Re: [PATCH 3/4] sparc32: implement futex atomics, with casa detected at run time

From: Arnd Bergmann

Date: Thu Oct 15 2026 - 05:48:42 EST


On Thu, Oct 15, 2026, at 11:28, John Paul Adrian Glaubitz wrote:
> On Thu, 2026-10-15 at 11:23 +0200, Arnd Bergmann wrote:
>> On Thu, Oct 15, 2026, at 10:55, Ramin Moussavi wrote:
>> > sparc32 has no futex_atomic_cmpxchg_inatomic() or
>> > arch_futex_atomic_op_inuser() of its own. The generic versions only
>> > work on UP, so FUTEX depends on !(SPARC32 && SMP) and an SMP kernel
>> > has no futexes at all; NPTL cannot run on it.
>>
>> I believe there are existing patches for LEON with CASA that
>> should just be merged, I would not worry about supporting broken
>> CPUs that never had this.
>
> I think you mean the series by Imre Kaloz [1]? If yes, he actually
> implements CASA emulation unless I'm missing something.

No, I had not seen that one, I was actually surprised that Andreas
never merged it as we had discussed this years ago when I looked
at the Leon downstream kernel. I see it is still part of his
downstream patches at [1], at least the versions from 4.9 to
the latest (6.13).

Arnd

[1] https://download.gaisler.com/anonftp/linux/linux-2.6/kernel/