From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA34D3CAE76 for ; Mon, 30 Mar 2026 12:02:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774872154; cv=none; b=jyIHAGOzhO5+QbdcLjiRJ3kjEbdZwMb5ecB7oJOmYO551pcKkvo6NDyVYqQ0nF1XMSKvJfBgAVjbarJf2VGtYPCeVStsGJjACnIoPi1UyZuJH92zNiAxSsqY4EBcYbvMAq6fk1+zZbgVyRbdC7QyJPvfTKADlNi4I+pbJtGjzvg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774872154; c=relaxed/simple; bh=A1N/kPJmtqh/H7w9Tqw87o+5Xj3tEPp9oN0AWdJtzng=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=odydPVCtlSqtK2CjZG2OLY3artOg1Fco94hDrFfiUOCWgfnU/MEMTFWBlYgSdlx3TeWNf4RRnBeygg0tnUOWczm+tsoQyCe2fhfYG0vxYtBp2Erb1DfSkBzUz/ktCTx1RuISP5yU7nW+qto5TD618yS0oCJeX8YyWQ5pQAUVIpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lW/u5Jwe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lW/u5Jwe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5CFBC2BCB0; Mon, 30 Mar 2026 12:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774872154; bh=A1N/kPJmtqh/H7w9Tqw87o+5Xj3tEPp9oN0AWdJtzng=; h=Date:From:To:Cc:Subject:References:From; b=lW/u5JwekMG4FE7ynNkX0QlsfxRBHCRgjsbiDf5cO6KRh8/hEyuZsN8cX6eOWgW7w R8i63kz4MK6iA5uGvajREWfndAqXtHZyQqyN6s3a0foRUE2MKxdIni5TQsmBAWAEDK uWnpYblQQ1MpLSZOM/iFIZYTdqrM3JVz/9AZVVY7uEFxxJoAFmIEf3gnX+lnAbEpE9 t3zcpuH1NcCgPFOHjmxqDBMSyOvdfAS5vcqnM/ZG6hWg+1kAnIUcuE2RgtP+3C9fuP Yg7pP6e/3ZOFIGUF4QjlUTPIrnkEL0nOilWWk/3vBe501+vLPyQlgHq2kG/KIP4oSO srWGqZP3rIf7g== Date: Mon, 30 Mar 2026 14:02:31 +0200 Message-ID: <20260330120117.467037069@kernel.org> User-Agent: quilt/0.68 From: Thomas Gleixner To: LKML Cc: Mathieu Desnoyers , =?UTF-8?q?Andr=C3=A8=20Almeida?= , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" , Uros Bizjak , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Subject: [patch V3 06/14] x86: Select ARCH_MEMORY_ORDER_TOS References: <20260330114212.927686587@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 The generic unsafe_atomic_store_release_user() implementation does: if (!IS_ENABLED(CONFIG_ARCH_MEMORY_ORDER_TOS)) smp_mb(); unsafe_put_user(); As x86 implements Total Store Order (TOS) which means stores imply release, select ARCH_MEMORY_ORDER_TOS to avoid the unnecessary smp_mb(). Signed-off-by: Thomas Gleixner Reviewed-by: André Almeida --- V3: Rename to TOS - Peter V2: New patch --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -114,6 +114,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_TOS select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select ARCH_MIGHT_HAVE_PC_PARPORT