compat: backport of lock_map_acquire() and lock_map_release()
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 13 Feb 2013 19:51:00 +0000 (20:51 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 13 Feb 2013 19:56:56 +0000 (20:56 +0100)
This is a backport of:

commit 3295f0ef9ff048a4619ede597ad9ec9cab725654
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Aug 11 10:30:30 2008 +0200

    lockdep: rename map_[acquire|release]() => lock_map_[acquire|release]()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.27.h

index ece825de1437ae0140850ca675b0890bb0effb7e..2eae9f2fb3c9c7712a30d9d83ee6f094f41281b9 100644 (file)
@@ -287,6 +287,26 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
 
 #define netif_wake_subqueue netif_start_subqueue
 
+/* Backport of:
+ *
+ * commit 3295f0ef9ff048a4619ede597ad9ec9cab725654
+ * Author: Ingo Molnar <mingo@elte.hu>
+ * Date:   Mon Aug 11 10:30:30 2008 +0200
+ *
+ *     lockdep: rename map_[acquire|release]() => lock_map_[acquire|release]()
+ */
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# ifdef CONFIG_PROVE_LOCKING
+#  define lock_map_acquire(l)          lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_)
+# else
+#  define lock_map_acquire(l)          lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_)
+# endif
+# define lock_map_release(l)                   lock_release(l, 1, _THIS_IP_)
+#else
+# define lock_map_acquire(l)                   do { } while (0)
+# define lock_map_release(l)                   do { } while (0)
+#endif
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
 
 #endif /* LINUX_26_27_COMPAT_H */