Skip to contentSkip to conversation

lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 15, 2013 Library code

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 15 Nov 2013 12:08:53 -0800

The patch titled
Subject: lockref: use BLOATED_SPINLOCKS to avoid explicit config dependencies
has been removed from the -mm tree. Its filename was
lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Peter Zijlstra <[email protected]>
Subject: lockref: use BLOATED_SPINLOCKS to avoid explicit config dependencies

Avoid the fragile Kconfig construct guestimating spinlock_t sizes; use a friendly compile-time test to determine this.

---

 include/linux/lockref.h |    7 ++++++-
 lib/Kconfig             |    7 -------
 lib/lockref.c           |    2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)
include/linux/lockref.h renamed from include/linux/lockref.h~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies +6 -1
diff -puN include/linux/lockref.h~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies include/linux/lockref.h
@@ -15,10 +15,15 @@
  */
 
 #include <linux/spinlock.h>
+#include <generated/bounds.h>
+
+#define USE_CMPXCHG_LOCKREF \
+	(IS_ENABLED(CONFIG_ARCH_USE_CMPXCHG_LOCKREF) && \
+	 IS_ENABLED(CONFIG_SMP) && !BLOATED_SPINLOCKS)
 
 struct lockref {
 	union {
-#ifdef CONFIG_CMPXCHG_LOCKREF
+#if USE_CMPXCHG_LOCKREF
 		aligned_u64 lock_count;
 #endif
 		struct {
lib/Kconfig renamed from lib/Kconfig~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies +0 -6
diff -puN lib/Kconfig~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies lib/Kconfig
@@ -51,13 +51,6 @@ config PERCPU_RWSEM
 config ARCH_USE_CMPXCHG_LOCKREF
 	bool
 
-config CMPXCHG_LOCKREF
-	def_bool y if ARCH_USE_CMPXCHG_LOCKREF
-	depends on SMP
-	depends on !GENERIC_LOCKBREAK
-	depends on !DEBUG_SPINLOCK
-	depends on !DEBUG_LOCK_ALLOC