* Re: [boqun:rust-sync.20260105a 18/22] error[E0277]: the trait bound `i8: AtomicImpl` is not satisfied
[not found] <202601060041.k0JkAkUD-lkp@intel.com>
@ 2026-01-06 0:49 ` Boqun Feng
2026-01-06 3:40 ` [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86 Boqun Feng
0 siblings, 1 reply; 5+ messages in thread
From: Boqun Feng @ 2026-01-06 0:49 UTC (permalink / raw)
To: kernel test robot
Cc: FUJITA Tomonori, llvm, oe-kbuild-all, Richard Weinberger,
Anton Ivanov, Johannes Berg, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, linux-um,
linux-kernel
[Cc UML]
On Tue, Jan 06, 2026 at 12:25:24AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-sync.20260105a
> head: 243aa6a057d46d3a4de9297422e480d469eddaf7
> commit: 06ed7e7e7aa656f7054af7d3d3387a07244d85b1 [18/22] rust: sync: atomic: Add i8/i16 xchg and cmpxchg support
> config: um-randconfig-001-20260105 (https://download.01.org/0day-ci/archive/20260106/202601060041.k0JkAkUD-lkp@intel.com/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
> rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260106/202601060041.k0JkAkUD-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202601060041.k0JkAkUD-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from kernel/sched/rq-offsets.c:5:
> In file included from kernel/sched/sched.h:28:
> In file included from include/linux/cgroup_api.h:1:
> In file included from include/linux/cgroup.h:27:
> In file included from include/linux/kernel_stat.h:8:
> In file included from include/linux/interrupt.h:11:
> In file included from include/linux/hardirq.h:11:
> In file included from arch/um/include/asm/hardirq.h:24:
> In file included from include/linux/irq.h:20:
> In file included from include/linux/io.h:12:
> In file included from arch/um/include/asm/io.h:24:
> include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> 1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
> | ~~~~~~~~~~ ^
> 1 warning generated.
> llvm-nm: error: rust/helpers/helpers.o: No such file or directory
> clang diag: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> clang diag: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> clang diag: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
> >> error[E0277]: the trait bound `i8: AtomicImpl` is not satisfied
> --> rust/kernel/sync/atomic/internal.rs:265:7
> |
> 265 | [ i8 => atomic_i8, i16 => atomic_i16, i32 => atomic, i64 => atomic64 ]
> | ^^ the trait `AtomicImpl` is not implemented for `i8`
> |
> = help: the following other types implement trait `AtomicImpl`:
> i32
> i64
UML_X86 is using the atomics of x86 kernel (defined in
arch/x86/include/asm/atomic*), right? If so, I think we need this:
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index bdd7c8e39b01..44b12e45f9a0 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -9,6 +9,7 @@ endmenu
config UML_X86
def_bool y
select ARCH_USE_QUEUED_RWLOCKS
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_USE_QUEUED_SPINLOCKS
select DCACHE_WORD_ACCESS
select HAVE_EFFICIENT_UNALIGNED_ACCESS
Regards,
Boqun
[...]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86
2026-01-06 0:49 ` [boqun:rust-sync.20260105a 18/22] error[E0277]: the trait bound `i8: AtomicImpl` is not satisfied Boqun Feng
@ 2026-01-06 3:40 ` Boqun Feng
2026-01-06 13:30 ` FUJITA Tomonori
2026-01-06 14:20 ` Richard Weinberger
0 siblings, 2 replies; 5+ messages in thread
From: Boqun Feng @ 2026-01-06 3:40 UTC (permalink / raw)
To: linux-um, x86
Cc: Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-kernel, rust-for-linux, FUJITA Tomonori
x86 atomic instructions are used for um on UML_X86, therefore atomics
on UML_X86 support native atomic RmW as x86 does, hence select
ARCH_SUPPORTS_ATOMIC_RMW.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
---
UM & x86 maintainers,
I need this to avoid a build error for Rust atomics since Rust currently
only support Atomic<i8/i16> on ARCH_SUPPORTS_ATOMIC_RMW archs. I will
add it to my upcoming PR if I get some Acked-by, thanks!
arch/x86/um/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index bdd7c8e39b01..44b12e45f9a0 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -9,6 +9,7 @@ endmenu
config UML_X86
def_bool y
select ARCH_USE_QUEUED_RWLOCKS
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_USE_QUEUED_SPINLOCKS
select DCACHE_WORD_ACCESS
select HAVE_EFFICIENT_UNALIGNED_ACCESS
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86
2026-01-06 3:40 ` [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86 Boqun Feng
@ 2026-01-06 13:30 ` FUJITA Tomonori
2026-01-06 14:20 ` Richard Weinberger
1 sibling, 0 replies; 5+ messages in thread
From: FUJITA Tomonori @ 2026-01-06 13:30 UTC (permalink / raw)
To: boqun.feng
Cc: linux-um, x86, richard, anton.ivanov, johannes, tglx, mingo, bp,
dave.hansen, hpa, ojeda, gary, bjorn3_gh, lossin, a.hindborg,
aliceryhl, tmgross, dakr, linux-kernel, rust-for-linux,
fujita.tomonori
On Tue, 6 Jan 2026 11:40:34 +0800
Boqun Feng <boqun.feng@gmail.com> wrote:
> x86 atomic instructions are used for um on UML_X86, therefore atomics
> on UML_X86 support native atomic RmW as x86 does, hence select
> ARCH_SUPPORTS_ATOMIC_RMW.
>
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86
2026-01-06 3:40 ` [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86 Boqun Feng
2026-01-06 13:30 ` FUJITA Tomonori
@ 2026-01-06 14:20 ` Richard Weinberger
2026-01-07 3:26 ` Boqun Feng
1 sibling, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2026-01-06 14:20 UTC (permalink / raw)
To: Boqun Feng
Cc: linux-um, x86, anton ivanov, Johannes Berg, tglx, mingo, bp,
dave hansen, hpa, Miguel Ojeda, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross, dakr,
linux-kernel, Rust for Linux Kernel, FUJITA Tomonori
----- Ursprüngliche Mail -----
> Von: "Boqun Feng" <boqun.feng@gmail.com>
> An: "linux-um" <linux-um@lists.infradead.org>, "x86" <x86@kernel.org>
> CC: "richard" <richard@nod.at>, "anton ivanov" <anton.ivanov@cambridgegreys.com>, "Johannes Berg"
> <johannes@sipsolutions.net>, "tglx" <tglx@linutronix.de>, "mingo" <mingo@redhat.com>, "bp" <bp@alien8.de>, "dave
> hansen" <dave.hansen@linux.intel.com>, "hpa" <hpa@zytor.com>, "Miguel Ojeda" <ojeda@kernel.org>, "Boqun Feng"
> <boqun.feng@gmail.com>, "Gary Guo" <gary@garyguo.net>, "Björn Roy Baron" <bjorn3_gh@protonmail.com>, "Benno Lossin"
> <lossin@kernel.org>, "Andreas Hindborg" <a.hindborg@kernel.org>, "Alice Ryhl" <aliceryhl@google.com>, "Trevor Gross"
> <tmgross@umich.edu>, "dakr" <dakr@kernel.org>, "linux-kernel" <linux-kernel@vger.kernel.org>, "Rust for Linux Kernel"
> <rust-for-linux@vger.kernel.org>, "FUJITA Tomonori" <fujita.tomonori@gmail.com>
> Gesendet: Dienstag, 6. Januar 2026 04:40:34
> Betreff: [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86
> x86 atomic instructions are used for um on UML_X86, therefore atomics
> on UML_X86 support native atomic RmW as x86 does, hence select
> ARCH_SUPPORTS_ATOMIC_RMW.
>
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> ---
> UM & x86 maintainers,
>
> I need this to avoid a build error for Rust atomics since Rust currently
> only support Atomic<i8/i16> on ARCH_SUPPORTS_ATOMIC_RMW archs. I will
> add it to my upcoming PR if I get some Acked-by, thanks!
>
> arch/x86/um/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86
2026-01-06 14:20 ` Richard Weinberger
@ 2026-01-07 3:26 ` Boqun Feng
0 siblings, 0 replies; 5+ messages in thread
From: Boqun Feng @ 2026-01-07 3:26 UTC (permalink / raw)
To: Richard Weinberger
Cc: linux-um, x86, anton ivanov, Johannes Berg, tglx, mingo, bp,
dave hansen, hpa, Miguel Ojeda, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross, dakr,
linux-kernel, Rust for Linux Kernel, FUJITA Tomonori
On Tue, Jan 06, 2026 at 03:20:43PM +0100, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Von: "Boqun Feng" <boqun.feng@gmail.com>
> > An: "linux-um" <linux-um@lists.infradead.org>, "x86" <x86@kernel.org>
> > CC: "richard" <richard@nod.at>, "anton ivanov" <anton.ivanov@cambridgegreys.com>, "Johannes Berg"
> > <johannes@sipsolutions.net>, "tglx" <tglx@linutronix.de>, "mingo" <mingo@redhat.com>, "bp" <bp@alien8.de>, "dave
> > hansen" <dave.hansen@linux.intel.com>, "hpa" <hpa@zytor.com>, "Miguel Ojeda" <ojeda@kernel.org>, "Boqun Feng"
> > <boqun.feng@gmail.com>, "Gary Guo" <gary@garyguo.net>, "Björn Roy Baron" <bjorn3_gh@protonmail.com>, "Benno Lossin"
> > <lossin@kernel.org>, "Andreas Hindborg" <a.hindborg@kernel.org>, "Alice Ryhl" <aliceryhl@google.com>, "Trevor Gross"
> > <tmgross@umich.edu>, "dakr" <dakr@kernel.org>, "linux-kernel" <linux-kernel@vger.kernel.org>, "Rust for Linux Kernel"
> > <rust-for-linux@vger.kernel.org>, "FUJITA Tomonori" <fujita.tomonori@gmail.com>
> > Gesendet: Dienstag, 6. Januar 2026 04:40:34
> > Betreff: [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86
>
> > x86 atomic instructions are used for um on UML_X86, therefore atomics
> > on UML_X86 support native atomic RmW as x86 does, hence select
> > ARCH_SUPPORTS_ATOMIC_RMW.
> >
> > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > ---
> > UM & x86 maintainers,
> >
> > I need this to avoid a build error for Rust atomics since Rust currently
> > only support Atomic<i8/i16> on ARCH_SUPPORTS_ATOMIC_RMW archs. I will
> > add it to my upcoming PR if I get some Acked-by, thanks!
> >
> > arch/x86/um/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
>
> Acked-by: Richard Weinberger <richard@nod.at>
>
Queued with both tags applied, thank you both!
Regards,
Boqun
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-07 3:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202601060041.k0JkAkUD-lkp@intel.com>
2026-01-06 0:49 ` [boqun:rust-sync.20260105a 18/22] error[E0277]: the trait bound `i8: AtomicImpl` is not satisfied Boqun Feng
2026-01-06 3:40 ` [PATCH] arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86 Boqun Feng
2026-01-06 13:30 ` FUJITA Tomonori
2026-01-06 14:20 ` Richard Weinberger
2026-01-07 3:26 ` Boqun Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox