[PATCH v9 2/9] preempt: Introduce __preempt_count_{sub, add}_return()

Heiko Carstens hca at linux.ibm.com
Mon May 5 02:56:29 PDT 2025


On Wed, Apr 30, 2025 at 05:38:02PM -0400, Lyude Paul wrote:
> On Fri, 2025-02-28 at 10:15 +0100, Heiko Carstens wrote:
> > 
> > Well.. at least it should not, but the way it is currently implemented it
> > indeed does sometimes depending on config options - there is room for
> > improvement. That's my fault - going to address that.
> 
> BTW - was this ever fixed? Going through and applying changes to the spinlock
> series to get it ready for sending out again and I don't know if I should
> leave this code as-is or not here.

Well, this fix was that the atomic primitives, like used in your code, would
always fail to compile. That was address with commit 08d95a12cd28
("s390/atomic_ops: Let __atomic_add_const() variants always return void").

So yes, you need to change your code like I proposed.



More information about the linux-arm-kernel mailing list