From: Hauke Mehrtens Date: Wed, 13 Feb 2013 19:51:00 +0000 (+0100) Subject: compat: backport of lock_map_acquire() and lock_map_release() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6649081917c808bed07b6f9bc3e302fb37688a54;p=openwrt%2Fstaging%2Fblogic.git compat: backport of lock_map_acquire() and lock_map_release() This is a backport of: commit 3295f0ef9ff048a4619ede597ad9ec9cab725654 Author: Ingo Molnar Date: Mon Aug 11 10:30:30 2008 +0200 lockdep: rename map_[acquire|release]() => lock_map_[acquire|release]() Signed-off-by: Hauke Mehrtens --- diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h index ece825de1437..2eae9f2fb3c9 100644 --- a/include/linux/compat-2.6.27.h +++ b/include/linux/compat-2.6.27.h @@ -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 + * 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 */