Skip to contentSkip to conversation

locking/lockdep: Enforce PROVE_RAW_LOCK_NESTING only if ARCH_SUPPORTS_RT

PATCH Applied Waiman Long 3 participants 3 messages Nov 28, 2024 – Dec 2, 2024 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 locking/lockdep: Enforce PROVE_RAW_LOCK_NESTING only if ARCH_SUPPORTS_RT

Relax the rule to set PROVE_RAW_LOCK_NESTING by default only for arches that supports PREEMPT_RT. For arches that do not support PREEMPT_RT, they will not be forced to address unimportant raw lock nesting issues when they want to enable PROVE_LOCKING. They do have the option to enable it to look for these raw locking nesting problems if they choose to.

---
 lib/Kconfig.debug | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/Kconfig.debug +2 -2
index 1e37c62e8595..942b4cb138bd 100644
@@ -1397,9 +1397,9 @@ config PROVE_LOCKING
 	 For more details, see Documentation/locking/lockdep-design.rst.
 
 config PROVE_RAW_LOCK_NESTING
-	bool
+	bool "Enable raw_spinlock - spinlock nesting checks" if !ARCH_SUPPORTS_RT
 	depends on PROVE_LOCKING
-	default y
+	default y if ARCH_SUPPORTS_RT
 	help
 	 Enable the raw_spinlock vs. spinlock nesting checks which ensure
 	 that the lock nesting rules for PREEMPT_RT enabled kernels are
Signature · 1 line
2.47.0
Tested-by on v2 1/1
#1 lore raw
Quoted 9 lines · Waiman Long

Relax the rule to set PROVE_RAW_LOCK_NESTING by default only for arches that supports PREEMPT_RT. For arches that do not support PREEMPT_RT, they will not be forced to address unimportant raw lock nesting issues when they want to enable PROVE_LOCKING. They do have the option to enable it to look for these raw locking nesting problems if they choose to.

Quoted 20 lines
---
  lib/Kconfig.debug | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
lib/Kconfig.debug +2 -2
index 1e37c62e8595..942b4cb138bd 100644
@@ -1397,9 +1397,9 @@ config PROVE_LOCKING
  	 For more details, see Documentation/locking/lockdep-design.rst.
 
  config PROVE_RAW_LOCK_NESTING
-	bool
+	bool "Enable raw_spinlock - spinlock nesting checks" if !ARCH_SUPPORTS_RT
  	depends on PROVE_LOCKING
-	default y
+	default y if ARCH_SUPPORTS_RT
  	help
  	 Enable the raw_spinlock vs. spinlock nesting checks which ensure
  	 that the lock nesting rules for PREEMPT_RT enabled kernels are
merge bot Applied
#2 lore raw
In reply to Waiman Long
The following commit has been merged into the locking/core branch of tip:

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     d387ceb17149fed4d85a1ec01b3d65ae0204060d
Gitweb:        https://git.kernel.org/tip/d387ceb17149fed4d85a1ec01b3d65ae0204060d
Author:        Waiman Long <[email protected]>
AuthorDate:    Wed, 27 Nov 2024 21:00:09 -05:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 02 Dec 2024 12:16:58 +01:00

locking/lockdep: Enforce PROVE_RAW_LOCK_NESTING only if ARCH_SUPPORTS_RT

Relax the rule to set PROVE_RAW_LOCK_NESTING by default only for arches that supports PREEMPT_RT. For arches that do not support PREEMPT_RT, they will not be forced to address unimportant raw lock nesting issues when they want to enable PROVE_LOCKING. They do have the option to enable it to look for these raw locking nesting problems if they choose to.

---
 lib/Kconfig.debug | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/Kconfig.debug +2 -2
index f3d7237..49a3819 100644
@@ -1397,9 +1397,9 @@ config PROVE_LOCKING
 	 For more details, see Documentation/locking/lockdep-design.rst.
 
 config PROVE_RAW_LOCK_NESTING
-	bool
+	bool "Enable raw_spinlock - spinlock nesting checks" if !ARCH_SUPPORTS_RT
 	depends on PROVE_LOCKING
-	default y
+	default y if ARCH_SUPPORTS_RT
 	help
 	 Enable the raw_spinlock vs. spinlock nesting checks which ensure
 	 that the lock nesting rules for PREEMPT_RT enabled kernels are