summaryrefslogtreecommitdiffstats
path: root/include/linux/smp_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/smp_lock.h')
-rw-r--r--include/linux/smp_lock.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h
index d48cc77..2ea1dd1 100644
--- a/include/linux/smp_lock.h
+++ b/include/linux/smp_lock.h
@@ -3,7 +3,6 @@
#ifdef CONFIG_LOCK_KERNEL
#include <linux/sched.h>
-#include <trace/events/bkl.h>
#define kernel_locked() (current->lock_depth >= 0)
@@ -25,18 +24,21 @@ static inline int reacquire_kernel_lock(struct task_struct *task)
return 0;
}
-extern void __lockfunc _lock_kernel(void) __acquires(kernel_lock);
-extern void __lockfunc _unlock_kernel(void) __releases(kernel_lock);
+extern void __lockfunc
+_lock_kernel(const char *func, const char *file, int line)
+__acquires(kernel_lock);
-#define lock_kernel() { \
- trace_lock_kernel(__func__, __FILE__, __LINE__); \
- _lock_kernel(); \
-}
+extern void __lockfunc
+_unlock_kernel(const char *func, const char *file, int line)
+__releases(kernel_lock);
-#define unlock_kernel() { \
- trace_unlock_kernel(__func__, __FILE__, __LINE__); \
- _unlock_kernel(); \
-}
+#define lock_kernel() do { \
+ _lock_kernel(__func__, __FILE__, __LINE__); \
+} while (0)
+
+#define unlock_kernel() do { \
+ _unlock_kernel(__func__, __FILE__, __LINE__); \
+} while (0)
/*
* Various legacy drivers don't really need the BKL in a specific
@@ -52,8 +54,8 @@ static inline void cycle_kernel_lock(void)
#else
-#define lock_kernel() trace_lock_kernel(__func__, __FILE__, __LINE__);
-#define unlock_kernel() trace_unlock_kernel(__func__, __FILE__, __LINE__);
+#define lock_kernel()
+#define unlock_kernel()
#define release_kernel_lock(task) do { } while(0)
#define cycle_kernel_lock() do { } while(0)
#define reacquire_kernel_lock(task) 0
OpenPOWER on IntegriCloud