Re: [PATCH] locking: Revert switching guards to _irq_{disable,enable}()
From: Thomas Gleixner
Date: Mon Aug 31 2026 - 06:26:59 EST
On Sun, Aug 30 2026 at 14:23, Boqun Feng wrote:
> On Sun, Aug 30, 2026 at 09:57:30PM +0200, Thomas Gleixner wrote:
>> The actual PREEMPT_COUNT_IRQFLAGS thing will be 7.4 material obviously
>> and as this is confined to Rust then it's trivial enough to work around
>> it locally without exposing more stuff. See tiny delta patch below.
>>
>> So the only side effect of that is that the Rust implementation will not
>> be fully integrated into the preempt count magic, but it should just
>> work, no?
>>
>
> Right, that works. It's similar to the "alternatively" approach I
> mentioned here [1].
But thinking more about it. It actually just works with the preempt
count bits independent of PREEMPT_COUNT_IRQFLAGS.
For PREEMPT_COUNT_IRQFLAGS=n, Rust is the only one using it.
For PREEMPT_COUNT_IRQFLAGS=y, the Rust part integrates with the core
implementation. And once all Rust supporting architectures are enabling
PREEMPT_COUNT_IRQFLAGS the Rust extra magic goes away.
No?
Thanks,
tglx