[Intel-gfx] [PATCH 04/12] kernel/lockdep: Make cross-release a config option

Daniel Vetter daniel.vetter at ffwll.ch
Fri Nov 2 09:15:23 UTC 2018


cross-release annotations will need some serious amounts of vetting
before they can be enabled by default, or we'll just annoy everyone.

Instead split it into a separate option, which for now stays disabled
by default even if you enable overall lockdep.

Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Ingo Molnar <mingo at kernel.org>
Cc: Masahiro Yamada <yamada.masahiro at socionext.com>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Randy Dunlap <rdunlap at infradead.org>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Waiman Long <longman at redhat.com>
Cc: Masami Hiramatsu <mhiramat at kernel.org>
Cc: Yury Norov <ynorov at caviumnetworks.com>
Cc: Mikulas Patocka <mpatocka at redhat.com>
Cc: Robin Murphy <robin.murphy at arm.com>
Cc: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 lib/Kconfig.debug | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index fbfdf7c263d2..7e504b7fbbe1 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1055,8 +1055,6 @@ config PROVE_LOCKING
 	select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER
 	select DEBUG_WW_MUTEX_SLOWPATH
 	select DEBUG_LOCK_ALLOC
-	select LOCKDEP_CROSSRELEASE
-	select LOCKDEP_COMPLETIONS
 	select TRACE_IRQFLAGS
 	default n
 	help
@@ -1093,6 +1091,18 @@ config PROVE_LOCKING
 
 	 For more details, see Documentation/locking/lockdep-design.txt.
 
+config LOCKDEP_CROSSRELEASE
+	bool "Enable cross-release checking"
+	depends on PROVE_LOCKING
+	select LOCKDEP_COMPLETIONS
+	help
+	 This makes lockdep work for crosslock which is a lock allowed to
+	 be released in a different context from the acquisition context.
+	 Normally a lock must be released in the context acquiring the lock.
+	 However, relexing this constraint helps synchronization primitives
+	 such as page locks or completions can use the lock correctness
+	 detector, lockdep.
+
 config LOCK_STAT
 	bool "Lock usage statistics"
 	depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
@@ -1189,16 +1199,6 @@ config LOCKDEP
 config LOCKDEP_SMALL
 	bool
 
-config LOCKDEP_CROSSRELEASE
-	bool
-	help
-	 This makes lockdep work for crosslock which is a lock allowed to
-	 be released in a different context from the acquisition context.
-	 Normally a lock must be released in the context acquiring the lock.
-	 However, relexing this constraint helps synchronization primitives
-	 such as page locks or completions can use the lock correctness
-	 detector, lockdep.
-
 config LOCKDEP_COMPLETIONS
 	bool
 	help
-- 
2.19.1



More information about the Intel-gfx mailing list