diff mbox series

[v2,4/4] MIPS: Select ARCH_HAVE_NMI_SAFE_CMPXCHG when possible

Message ID 20240612-mips-llsc-v2-4-a42bd5562bdb@flygoat.com (mailing list archive)
State New
Headers show
Series MIPS: Enable ARCH_SUPPORTS_ATOMIC_RMW | expand

Commit Message

Jiaxun Yang June 12, 2024, 9:53 a.m. UTC
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 mbox series

Patch

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