Re: [PATCH] rust: sync: atomic: Provide stub for `rusttest` 32-bit hosts

From: Boqun Feng

Date: Sun Jan 25 2026 - 10:27:30 EST


On Sun, Jan 25, 2026 at 03:23:45PM +0100, Miguel Ojeda wrote:
> On Sat, Jan 24, 2026 at 12:35 AM Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:
> >
> > For arm32, on a x86_64 builder, running the `rusttest` target yields:
> >
> > error[E0080]: evaluation of constant value failed
> > --> rust/kernel/static_assert.rs:37:23
> > |
> > 37 | const _: () = ::core::assert!($condition $(,$arg)?);
> > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<isize>() == size_of::<isize_atomic_repr>()', rust/kernel/sync/atomic/predefine.rs:68:1
> > |
> > ::: rust/kernel/sync/atomic/predefine.rs:68:1
> > |
> > 68 | static_assert!(size_of::<isize>() == size_of::<isize_atomic_repr>());
> > | -------------------------------------------------------------------- in this macro invocation
> > |
> > = note: this error originates in the macro `::core::assert` which comes from the expansion of the macro `static_assert` (in Nightly builds, run with -Z macro-backtrace for more info)
> >
> > The reason is that `rusttest` runs on the host, so for e.g. a x86_64
> > builder `isize` is 64 bits but it is not a `CONFIG_64BIT` build.
> >
> > Fix it by providing a stub for `rusttest` as usual.
> >
> > Fixes: 84c6d36bcaf9 ("rust: sync: atomic: Add Atomic<{usize,isize}>")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
>
> Boqun et al.: in case it helps, I will send a fixes PR early this
> week, so if you happen to want me to pick this one up with the rest,

Thank you, that'll be great!

Acked-by: Boqun Feng <boqun.feng@xxxxxxxxx>

Regards,
Boqun

> please let me know.
>
> Cheers,
> Miguel