[PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust

Boqun Feng posted 18 patches 1 month, 3 weeks ago
arch/arm64/Kconfig                            |   1 +
arch/arm64/include/asm/preempt.h              |  20 ++
arch/openrisc/include/asm/smp.h               |   2 +
arch/s390/Kconfig                             |   1 +
arch/s390/include/asm/lowcore.h               |  13 +-
arch/s390/include/asm/preempt.h               |  51 +--
arch/x86/Kconfig                              |   1 +
arch/x86/include/asm/preempt.h                |  61 +++-
arch/x86/kernel/cpu/common.c                  |   2 +-
include/asm-generic/preempt.h                 |  14 +
include/linux/hardirq.h                       |  40 ++-
include/linux/interrupt_rc.h                  |  95 +++++
include/linux/kernel.h                        |   4 +-
include/linux/preempt.h                       |  44 ++-
include/linux/spinlock.h                      |  49 ++-
include/linux/spinlock_api_smp.h              |  41 +++
include/linux/spinlock_api_up.h               |  15 +
include/linux/spinlock_rt.h                   |  18 +
kernel/Kconfig.preempt                        |   4 +
kernel/irq/Makefile                           |   1 +
kernel/irq/refcount_interrupt_test.c          | 131 +++++++
kernel/locking/spinlock.c                     |  31 ++
kernel/sched/core.c                           |  18 +-
kernel/sched/fair.c                           |  12 +-
kernel/softirq.c                              |  36 +-
rust/helpers/helpers.c                        |   1 +
rust/helpers/interrupt.c                      |  18 +
rust/helpers/spinlock.c                       |  15 +
rust/helpers/sync.c                           |   5 +
rust/kernel/interrupt.rs                      |  89 +++++
rust/kernel/lib.rs                            |   1 +
rust/kernel/sync.rs                           |   9 +-
rust/kernel/sync/lock/global.rs               |   3 +
rust/kernel/sync/lock/spinlock.rs             | 329 +++++++++++++++++-
.../testing/selftests/bpf/bpf_experimental.h  |   7 +-
35 files changed, 1092 insertions(+), 90 deletions(-)
create mode 100644 include/linux/interrupt_rc.h
create mode 100644 kernel/irq/refcount_interrupt_test.c
create mode 100644 rust/helpers/interrupt.c
create mode 100644 rust/kernel/interrupt.rs
[PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust
Posted by Boqun Feng 1 month, 3 weeks ago
Hi Peter & Ingo,

Please take a look at this updated series for SpinLockIrq.

Changes since v4:

* Addressed SoB issues spotted by Peter.
* Added underflow/overflow checking for interrupt disabling counter as
  suggested by Shrikanth.
* Added a max nesting level per suggestion from Shrikanth.
* Document/comment updates.

v4: https://lore.kernel.org/lkml/20260804161447.84806-1-boqun@kernel.org/

Regards,
Boqun

Boqun Feng (10):
  preempt: Introduce HARDIRQ_DISABLE_BITS
  preempt: Introduce __preempt_count_{sub,add}_return()
  irq & spin_lock: Add counted interrupt disabling/enabling
  irq: Add max local_interrupt_disable() nesting level kunit test case
  locking: Switch to _irq_{disable,enable}() variants in cleanup guards
  sched: Remove the unused preempt_offset parameter of __cant_sleep()
  sched: Avoid signed comparison of preempt_count() in __cant_migrate()
  preempt: Introduce HAS_SEPARATE_PREEMPT_RESCHED_BITS
  arm64: sched/preempt: Enable HAS_SEPARATE_PREEMPT_RESCHED_BITS
  rust: helper: Add spin_{un,}lock_irq_{enable,disable}() helpers

Heiko Carstens (1):
  s390/preempt: Enable HAS_SEPARATE_PREEMPT_RESCHED_BITS

Joel Fernandes (1):
  preempt: Track NMI nesting to separate per-CPU counter

Lyude Paul (6):
  openrisc: Include <linux/cpumask.h> in smp.h
  irq: Add KUnit test for refcounted interrupt enable/disable
  rust: Introduce interrupt module
  rust: sync: Use super::* in spinlock.rs
  rust: sync: Add SpinLockIrq
  rust: sync: Introduce SpinLockIrq::lock_with() and friends

 arch/arm64/Kconfig                            |   1 +
 arch/arm64/include/asm/preempt.h              |  20 ++
 arch/openrisc/include/asm/smp.h               |   2 +
 arch/s390/Kconfig                             |   1 +
 arch/s390/include/asm/lowcore.h               |  13 +-
 arch/s390/include/asm/preempt.h               |  51 +--
 arch/x86/Kconfig                              |   1 +
 arch/x86/include/asm/preempt.h                |  61 +++-
 arch/x86/kernel/cpu/common.c                  |   2 +-
 include/asm-generic/preempt.h                 |  14 +
 include/linux/hardirq.h                       |  40 ++-
 include/linux/interrupt_rc.h                  |  95 +++++
 include/linux/kernel.h                        |   4 +-
 include/linux/preempt.h                       |  44 ++-
 include/linux/spinlock.h                      |  49 ++-
 include/linux/spinlock_api_smp.h              |  41 +++
 include/linux/spinlock_api_up.h               |  15 +
 include/linux/spinlock_rt.h                   |  18 +
 kernel/Kconfig.preempt                        |   4 +
 kernel/irq/Makefile                           |   1 +
 kernel/irq/refcount_interrupt_test.c          | 131 +++++++
 kernel/locking/spinlock.c                     |  31 ++
 kernel/sched/core.c                           |  18 +-
 kernel/sched/fair.c                           |  12 +-
 kernel/softirq.c                              |  36 +-
 rust/helpers/helpers.c                        |   1 +
 rust/helpers/interrupt.c                      |  18 +
 rust/helpers/spinlock.c                       |  15 +
 rust/helpers/sync.c                           |   5 +
 rust/kernel/interrupt.rs                      |  89 +++++
 rust/kernel/lib.rs                            |   1 +
 rust/kernel/sync.rs                           |   9 +-
 rust/kernel/sync/lock/global.rs               |   3 +
 rust/kernel/sync/lock/spinlock.rs             | 329 +++++++++++++++++-
 .../testing/selftests/bpf/bpf_experimental.h  |   7 +-
 35 files changed, 1092 insertions(+), 90 deletions(-)
 create mode 100644 include/linux/interrupt_rc.h
 create mode 100644 kernel/irq/refcount_interrupt_test.c
 create mode 100644 rust/helpers/interrupt.c
 create mode 100644 rust/kernel/interrupt.rs

-- 
2.50.1 (Apple Git-155)
Re: [PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust
Posted by Peter Zijlstra 1 month, 2 weeks ago
On Fri, Aug 07, 2026 at 12:01:57AM -0700, Boqun Feng wrote:

> * Added underflow/overflow checking for interrupt disabling counter as
>   suggested by Shrikanth.
> * Added a max nesting level per suggestion from Shrikanth.
> * Document/comment updates.

Can I get those as separate patches? I had already queued and tested the
previous version.

(although as it turns out, I lost one SoB fixup somehow, so I'm applying
them again with just that Changelog ammended)
[PATCH 0/4] Improvements on SpinLockIrq patch series
Posted by Boqun Feng 1 month, 2 weeks ago
Hi Peter,

Per your request, I send those improvements as separate patches. I did a
very light build and unit tests. I'm still waiting for the 0day build
test report in case we missed something subtle, but figured maybe it's
better if I send them out while I'm waiting.

Regards,
Boqun

Boqun Feng (4):
  irq: Add {over,under}flow detection for
    local_interrupt_{enable,disable}
  selftests/bpf: Use the new NMI_BITS definition
  irq: Explain better on NMI_MASK overflow condition
  irq: Add max local_interrupt_disable() nesting level kunit test case

 include/linux/hardirq.h                       |  2 +-
 include/linux/interrupt_rc.h                  | 13 +++++++++++
 kernel/irq/refcount_interrupt_test.c          | 22 +++++++++++++++++++
 .../testing/selftests/bpf/bpf_experimental.h  |  2 +-
 4 files changed, 37 insertions(+), 2 deletions(-)

-- 
2.50.1 (Apple Git-155)
Re: [PATCH 0/4] Improvements on SpinLockIrq patch series
Posted by Shrikanth Hegde 1 month, 2 weeks ago

On 8/11/26 9:47 AM, Boqun Feng wrote:
> Hi Peter,
> 
> Per your request, I send those improvements as separate patches. I did a
> very light build and unit tests. I'm still waiting for the 0day build
> test report in case we missed something subtle, but figured maybe it's
> better if I send them out while I'm waiting.
> 
> Regards,
> Boqun
> 
> Boqun Feng (4):
>    irq: Add {over,under}flow detection for
>      local_interrupt_{enable,disable}
>    selftests/bpf: Use the new NMI_BITS definition
>    irq: Explain better on NMI_MASK overflow condition
>    irq: Add max local_interrupt_disable() nesting level kunit test case
> 
>   include/linux/hardirq.h                       |  2 +-
>   include/linux/interrupt_rc.h                  | 13 +++++++++++
>   kernel/irq/refcount_interrupt_test.c          | 22 +++++++++++++++++++
>   .../testing/selftests/bpf/bpf_experimental.h  |  2 +-
>   4 files changed, 37 insertions(+), 2 deletions(-)
> 

Looks good to me.

Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
[PATCH 1/4] irq: Add {over,under}flow detection for local_interrupt_{enable,disable}
Posted by Boqun Feng 1 month, 2 weeks ago
Currently there is no way to detect overflow and underflow inside the
HARDIRQ_DISABLE_MASK part of preempt_count. Add these detection guarded
by DEBUG_PREEMPT similar to the detection for PREEMPT_MASK
{over,under}flow.

Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Boqun Feng <boqun@kernel.org>
---
 include/linux/interrupt_rc.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/linux/interrupt_rc.h b/include/linux/interrupt_rc.h
index b9a7f05ecf42..e2456500a646 100644
--- a/include/linux/interrupt_rc.h
+++ b/include/linux/interrupt_rc.h
@@ -11,6 +11,7 @@
  * make it easier to include without hitting circular header dependencies.
  */
 
+#include <linux/debug_locks.h>
 #include <linux/irqflags.h>
 #include <linux/preempt.h>
 #include <linux/processor.h>
@@ -63,6 +64,13 @@ static inline void local_interrupt_disable(void)
 
 	new_count = hardirq_disable_enter();
 
+	/* Is hardirq disable count overflow soon? */
+	if (IS_ENABLED(CONFIG_DEBUG_PREEMPT) &&
+	    DEBUG_LOCKS_WARN_ON(((new_count & HARDIRQ_DISABLE_MASK) +
+				 (10 << HARDIRQ_DISABLE_SHIFT)) >=
+				HARDIRQ_DISABLE_MASK))
+		return;
+
 	/* Interrupts can happen here, but it's OK, see __irq_exit_rcu(). */
 
 	if ((new_count & HARDIRQ_DISABLE_MASK) == HARDIRQ_DISABLE_OFFSET)
@@ -73,6 +81,11 @@ static inline void local_interrupt_enable(void)
 {
 	int new_count;
 
+	/* Unpaired local_interrupt_enable()? Warn and abort. */
+	if (IS_ENABLED(CONFIG_DEBUG_PREEMPT) &&
+	    DEBUG_LOCKS_WARN_ON((preempt_count() & HARDIRQ_DISABLE_MASK) == 0))
+		return;
+
 	new_count = hardirq_disable_exit();
 
 	if ((new_count & HARDIRQ_DISABLE_MASK) == 0)
-- 
2.50.1 (Apple Git-155)
[PATCH 2/4] selftests/bpf: Use the new NMI_BITS definition
Posted by Boqun Feng 1 month, 2 weeks ago
The definition of NMI_BITS was out of sync after the introduction of
HAS_SEPARATE_PREEMPT_RESCHED_BITS, hence adjust it.

Reported-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Boqun Feng <boqun@kernel.org>
---
 tools/testing/selftests/bpf/bpf_experimental.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/bpf_experimental.h b/tools/testing/selftests/bpf/bpf_experimental.h
index 0159a3d365c8..56520d551abd 100644
--- a/tools/testing/selftests/bpf/bpf_experimental.h
+++ b/tools/testing/selftests/bpf/bpf_experimental.h
@@ -368,7 +368,7 @@ extern int bpf_cgroup_read_xattr(struct cgroup *cgroup, const char *name__str,
 #define SOFTIRQ_BITS	8
 #define HARDIRQ_DISABLE_BITS	8
 #define HARDIRQ_BITS	4
-#define NMI_BITS	1
+#define NMI_BITS	(1 + 3*IS_ENABLED(CONFIG_HAS_SEPARATE_PREEMPT_RESCHED_BITS))
 
 #define PREEMPT_SHIFT	0
 #define SOFTIRQ_SHIFT	(PREEMPT_SHIFT + PREEMPT_BITS)
-- 
2.50.1 (Apple Git-155)
[PATCH 3/4] irq: Explain better on NMI_MASK overflow condition
Posted by Boqun Feng 1 month, 2 weeks ago
Currently __preempt_count_nmi_enter() uses 15 as the maximum NMI nesting
level, and it's because 4 bits are used to represent the nesting level
of NMI. Replace the tautological comment with a more direct mention to
the 4 bits limitation to help readers understand this condition.

Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Boqun Feng <boqun@kernel.org>
---
 include/linux/hardirq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 73b48dd9f135..2648c49cd8f6 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -108,7 +108,7 @@ DECLARE_PER_CPU(unsigned int, nmi_nesting);
 #define __preempt_count_nmi_enter()				\
 	do {							\
 		__preempt_count_add(HARDIRQ_OFFSET);		\
-		/* Maximum NMI nesting is 15. */		\
+		/* NMI nesting is represented in 4 bits. */	\
 		BUG_ON(__this_cpu_read(nmi_nesting) >= 15);	\
 		__this_cpu_inc(nmi_nesting);			\
 		preempt_count_set(preempt_count() | NMI_MASK);  \
-- 
2.50.1 (Apple Git-155)
[PATCH 4/4] irq: Add max local_interrupt_disable() nesting level kunit test case
Posted by Boqun Feng 1 month, 2 weeks ago
To confirm the max nesting level of local_interrupt_disable() works, a
kunit test is added to the whole test suite.

Note that when DEBUG_PREEMPT=y, it'll generate a warning which is
expected.

Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Boqun Feng <boqun@kernel.org>
---
 kernel/irq/refcount_interrupt_test.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/kernel/irq/refcount_interrupt_test.c b/kernel/irq/refcount_interrupt_test.c
index ca904dba24b9..38dfccbaa4d4 100644
--- a/kernel/irq/refcount_interrupt_test.c
+++ b/kernel/irq/refcount_interrupt_test.c
@@ -52,6 +52,27 @@ static void test_multiple_irq_change(struct kunit *test)
 	TEST_IRQ_ON();
 }
 
+static void test_max_nesting_irq_change(struct kunit *test)
+{
+	for (int i = 0; i < __IRQ_MASK(HARDIRQ_DISABLE_BITS); i++) {
+		local_interrupt_disable();
+		TEST_IRQ_OFF();
+	}
+
+
+	for (int i = 0; i < __IRQ_MASK(HARDIRQ_DISABLE_BITS); i++) {
+		TEST_IRQ_OFF();
+		local_interrupt_enable();
+	}
+
+	TEST_IRQ_ON();
+
+	local_interrupt_disable();
+	TEST_IRQ_OFF();
+	local_interrupt_enable();
+	TEST_IRQ_ON();
+}
+
 static void test_irq_save(struct kunit *test)
 {
 	unsigned long flags;
@@ -79,6 +100,7 @@ static struct kunit_case test_cases[] = {
 	KUNIT_CASE(test_single_irq_change),
 	KUNIT_CASE(test_nested_irq_change),
 	KUNIT_CASE(test_multiple_irq_change),
+	KUNIT_CASE(test_max_nesting_irq_change),
 	KUNIT_CASE(test_irq_save),
 	{},
 };
-- 
2.50.1 (Apple Git-155)
Re: [PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust
Posted by Peter Zijlstra 1 month, 2 weeks ago
On Mon, Aug 10, 2026 at 10:52:55AM +0200, Peter Zijlstra wrote:
> On Fri, Aug 07, 2026 at 12:01:57AM -0700, Boqun Feng wrote:
> 
> > * Added underflow/overflow checking for interrupt disabling counter as
> >   suggested by Shrikanth.
> > * Added a max nesting level per suggestion from Shrikanth.
> > * Document/comment updates.
> 
> Can I get those as separate patches? I had already queued and tested the
> previous version.
> 
> (although as it turns out, I lost one SoB fixup somehow, so I'm applying
> them again with just that Changelog ammended)

I'll grab the rust patches from this set I suppose. I had not yet looked
at those, since I don't normally build rust crud and I need to figure
out how to do that again :-(
Re: [PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust
Posted by Peter Zijlstra 1 month, 2 weeks ago
On Mon, Aug 10, 2026 at 10:53:55AM +0200, Peter Zijlstra wrote:
> On Mon, Aug 10, 2026 at 10:52:55AM +0200, Peter Zijlstra wrote:
> > On Fri, Aug 07, 2026 at 12:01:57AM -0700, Boqun Feng wrote:
> > 
> > > * Added underflow/overflow checking for interrupt disabling counter as
> > >   suggested by Shrikanth.
> > > * Added a max nesting level per suggestion from Shrikanth.
> > > * Document/comment updates.
> > 
> > Can I get those as separate patches? I had already queued and tested the
> > previous version.
> > 
> > (although as it turns out, I lost one SoB fixup somehow, so I'm applying
> > them again with just that Changelog ammended)
> 
> I'll grab the rust patches from this set I suppose. I had not yet looked
> at those, since I don't normally build rust crud and I need to figure
> out how to do that again :-(

So on tip/master + tip/locking/core (its fresh, so not in master yet).

I have debian experimental rustc, which is build against clang-23, so I
do:

$ make O=defconfig-build/ LLVM=-23 defconfig rust.config
$ make O=defconfig-build/ LLVM=-23 -j64

and that gets me a wild amount of build fail :/

error[E0560]: struct `blk_mq_tag_set` has no field named `ops`
  --> ../rust/kernel/block/mq/tag_set.rs:46:21
   |
46 |                     ops: OperationsVTable::<T>::build(),
   |                     ^^^ `blk_mq_tag_set` does not have this field
   |
   = note: available fields are: `_address`

error[E0560]: struct `blk_mq_tag_set` has no field named `nr_hw_queues`
  --> ../rust/kernel/block/mq/tag_set.rs:47:21
   |
47 |                     nr_hw_queues,
   |                     ^^^^^^^^^^^^ `blk_mq_tag_set` does not have this field
   |
   = note: available fields are: `_address`

... this goes on for a fair while.


And this is *before* I've applied any of the rust patches from this
series.

Why can't stuff just ever work :-(
Re: [PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust
Posted by Gary Guo 1 month, 2 weeks ago
On Mon Aug 10, 2026 at 10:30 AM BST, Peter Zijlstra wrote:
> On Mon, Aug 10, 2026 at 10:53:55AM +0200, Peter Zijlstra wrote:
>> On Mon, Aug 10, 2026 at 10:52:55AM +0200, Peter Zijlstra wrote:
>> > On Fri, Aug 07, 2026 at 12:01:57AM -0700, Boqun Feng wrote:
>> > 
>> > > * Added underflow/overflow checking for interrupt disabling counter as
>> > >   suggested by Shrikanth.
>> > > * Added a max nesting level per suggestion from Shrikanth.
>> > > * Document/comment updates.
>> > 
>> > Can I get those as separate patches? I had already queued and tested the
>> > previous version.
>> > 
>> > (although as it turns out, I lost one SoB fixup somehow, so I'm applying
>> > them again with just that Changelog ammended)
>> 
>> I'll grab the rust patches from this set I suppose. I had not yet looked
>> at those, since I don't normally build rust crud and I need to figure
>> out how to do that again :-(
>
> So on tip/master + tip/locking/core (its fresh, so not in master yet).
>
> I have debian experimental rustc, which is build against clang-23, so I
> do:
>
> $ make O=defconfig-build/ LLVM=-23 defconfig rust.config
> $ make O=defconfig-build/ LLVM=-23 -j64
>
> and that gets me a wild amount of build fail :/
>
> error[E0560]: struct `blk_mq_tag_set` has no field named `ops`
>   --> ../rust/kernel/block/mq/tag_set.rs:46:21
>    |
> 46 |                     ops: OperationsVTable::<T>::build(),
>    |                     ^^^ `blk_mq_tag_set` does not have this field
>    |
>    = note: available fields are: `_address`
>
> error[E0560]: struct `blk_mq_tag_set` has no field named `nr_hw_queues`
>   --> ../rust/kernel/block/mq/tag_set.rs:47:21
>    |
> 47 |                     nr_hw_queues,
>    |                     ^^^^^^^^^^^^ `blk_mq_tag_set` does not have this field
>    |
>    = note: available fields are: `_address`
>
> ... this goes on for a fair while.

There was a change in clang 22 that breaks bindgen. You'd need the latest
bindgen, see
https://lore.kernel.org/rust-for-linux/CABwQupNfMAJOGqRM9ke6tj4f53dCCsBDKU7Vp+zf8mwk7bqt8Q@mail.gmail.com/.

If you're using debian unstable clang/rustc then you should also get bindgen
from there too. Debian sid has the bindgen version that works with latest clang.

Best,
Gary
Re: [PATCH v5 00/18] Refcounted interrupt disable and SpinLockIrq for Rust
Posted by Peter Zijlstra 1 month, 2 weeks ago
On Mon, Aug 10, 2026 at 11:38:17AM +0100, Gary Guo wrote:
> On Mon Aug 10, 2026 at 10:30 AM BST, Peter Zijlstra wrote:
> > On Mon, Aug 10, 2026 at 10:53:55AM +0200, Peter Zijlstra wrote:
> >> On Mon, Aug 10, 2026 at 10:52:55AM +0200, Peter Zijlstra wrote:
> >> > On Fri, Aug 07, 2026 at 12:01:57AM -0700, Boqun Feng wrote:
> >> > 
> >> > > * Added underflow/overflow checking for interrupt disabling counter as
> >> > >   suggested by Shrikanth.
> >> > > * Added a max nesting level per suggestion from Shrikanth.
> >> > > * Document/comment updates.
> >> > 
> >> > Can I get those as separate patches? I had already queued and tested the
> >> > previous version.
> >> > 
> >> > (although as it turns out, I lost one SoB fixup somehow, so I'm applying
> >> > them again with just that Changelog ammended)
> >> 
> >> I'll grab the rust patches from this set I suppose. I had not yet looked
> >> at those, since I don't normally build rust crud and I need to figure
> >> out how to do that again :-(
> >
> > So on tip/master + tip/locking/core (its fresh, so not in master yet).
> >
> > I have debian experimental rustc, which is build against clang-23, so I
> > do:
> >
> > $ make O=defconfig-build/ LLVM=-23 defconfig rust.config
> > $ make O=defconfig-build/ LLVM=-23 -j64
> >
> > and that gets me a wild amount of build fail :/
> >
> > error[E0560]: struct `blk_mq_tag_set` has no field named `ops`
> >   --> ../rust/kernel/block/mq/tag_set.rs:46:21
> >    |
> > 46 |                     ops: OperationsVTable::<T>::build(),
> >    |                     ^^^ `blk_mq_tag_set` does not have this field
> >    |
> >    = note: available fields are: `_address`
> >
> > error[E0560]: struct `blk_mq_tag_set` has no field named `nr_hw_queues`
> >   --> ../rust/kernel/block/mq/tag_set.rs:47:21
> >    |
> > 47 |                     nr_hw_queues,
> >    |                     ^^^^^^^^^^^^ `blk_mq_tag_set` does not have this field
> >    |
> >    = note: available fields are: `_address`
> >
> > ... this goes on for a fair while.
> 
> There was a change in clang 22 that breaks bindgen. You'd need the latest
> bindgen, see
> https://lore.kernel.org/rust-for-linux/CABwQupNfMAJOGqRM9ke6tj4f53dCCsBDKU7Vp+zf8mwk7bqt8Q@mail.gmail.com/.
> 
> If you're using debian unstable clang/rustc then you should also get bindgen
> from there too. Debian sid has the bindgen version that works with latest clang.

I 'upgraded' to bindgen/unstable, and found that Kbuild does not have a
dependency on the bindgen version so it didn't rebuild and insta
exploded with the same fails. A make clean fixed that.

Build seems happier now. Let me go apply these here locking patches.