arch/x86/um/Kconfig | 1 + 1 file changed, 1 insertion(+)
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
----- 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
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
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>
The following commit has been merged into the locking/core branch of tip:
Commit-ID: cf4c3bc1445152c1949a4b5fef56d07579fadb1e
Gitweb: https://git.kernel.org/tip/cf4c3bc1445152c1949a4b5fef56d07579fadb1e
Author: Boqun Feng <boqun.feng@gmail.com>
AuthorDate: Tue, 06 Jan 2026 11:40:34 +08:00
Committer: Boqun Feng <boqun.feng@gmail.com>
CommitterDate: Fri, 09 Jan 2026 19:01:41 +08:00
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.
Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20260106034034.60074-1-boqun.feng@gmail.com
---
arch/x86/um/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index bdd7c8e..44b12e4 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
© 2016 - 2026 Red Hat, Inc.