Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Jonas Gorski <jonas.gorski@gmail.com>,
	 "Maciej W. Rozycki" <macro@orcam.me.uk>,
	linux-mips@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: [PATCH v2 4/4] MIPS: Select ARCH_HAVE_NMI_SAFE_CMPXCHG when possible
Date: Wed, 12 Jun 2024 10:53:32 +0100	[thread overview]
Message-ID: <20240612-mips-llsc-v2-4-a42bd5562bdb@flygoat.com> (raw)
In-Reply-To: <20240612-mips-llsc-v2-0-a42bd5562bdb@flygoat.com>

LLSC based CMPXCHG is safe for NMI.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e83036580a47..1bb274c50636 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -17,6 +17,7 @@ config MIPS
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
 	select ARCH_HAS_UBSAN
 	select ARCH_HAS_GCOV_PROFILE_ALL
+	select ARCH_HAVE_NMI_SAFE_CMPXCHG if CPU_HAS_LLSC
 	select ARCH_KEEP_MEMBLOCK
 	select ARCH_USE_BUILTIN_BSWAP
 	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT

-- 
2.43.0


      parent reply	other threads:[~2024-06-12  9:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  9:53 [PATCH v2 0/4] MIPS: Enable ARCH_SUPPORTS_ATOMIC_RMW Jiaxun Yang
2024-06-12  9:53 ` [PATCH v2 1/4] MIPS: Introduce WAR_4KC_LLSC config option Jiaxun Yang
2024-06-12  9:53 ` [PATCH v2 2/4] MIPS: Introduce config options for LLSC availability Jiaxun Yang
2024-06-20 16:06   ` Thomas Bogendoerfer
2024-06-20 16:30     ` Jiaxun Yang
2024-06-20 17:41       ` Thomas Bogendoerfer
2024-06-21  0:00   ` Maciej W. Rozycki
2024-06-21 10:45     ` Jiaxun Yang
2024-06-21 13:57       ` Maciej W. Rozycki
2024-06-21 15:21         ` Jiaxun Yang
2024-06-21 17:40           ` Maciej W. Rozycki
2024-06-21 20:31           ` Thomas Bogendoerfer
2024-06-12  9:53 ` [PATCH v2 3/4] MIPS: Select ARCH_SUPPORTS_ATOMIC_RMW when possible Jiaxun Yang
2024-06-12  9:53 ` Jiaxun Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240612-mips-llsc-v2-4-a42bd5562bdb@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox