From: Thomas Gleixner Date: Tue, 2 Jun 2026 09:09:47 +0000 (+0200) Subject: x86: Select ARCH_MEMORY_ORDER_TSO X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7b125c44d0b7f617ee81dffd14ce116149d03cb6;p=thirdparty%2Fkernel%2Flinux.git x86: Select ARCH_MEMORY_ORDER_TSO The generic unsafe_atomic_store_release_user() implementation does: if (!IS_ENABLED(CONFIG_ARCH_MEMORY_ORDER_TSO)) smp_mb(); unsafe_put_user(); As x86 implements Total Store Order (TSO) which means stores imply release, select ARCH_MEMORY_ORDER_TSO to avoid the unnecessary smp_mb(). Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: André Almeida Link: https://patch.msgid.link/20260602090535.564499644@kernel.org --- diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f3f7cb01d69d0..1ce62a996192e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -113,6 +113,7 @@ config X86 select ARCH_HAS_ZONE_DMA_SET if EXPERT select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_HAVE_EXTRA_ELF_NOTES + select ARCH_MEMORY_ORDER_TSO select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select ARCH_MIGHT_HAVE_PC_PARPORT