diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 17:21:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 17:21:00 -0700 |
commit | f74b9444192c60603020c61d7915b72893137edc (patch) | |
tree | 8b1d16d373234038c2b045c9ceb3c33b93059e8a /include | |
parent | 7a6362800cb7d1d618a697a650c7aaed3eb39320 (diff) | |
parent | 4ba8216cd90560bc402f52076f64d8546e8aefcb (diff) | |
download | linux-3.10-f74b9444192c60603020c61d7915b72893137edc.tar.gz linux-3.10-f74b9444192c60603020c61d7915b72893137edc.tar.bz2 linux-3.10-f74b9444192c60603020c61d7915b72893137edc.zip |
Merge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
BKL: That's all, folks
fs/locks.c: Remove stale FIXME left over from BKL conversion
ipx: remove the BKL
appletalk: remove the BKL
x25: remove the BKL
ufs: remove the BKL
hpfs: remove the BKL
drivers: remove extraneous includes of smp_lock.h
tracing: don't trace the BKL
adfs: remove the big kernel lock
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hardirq.h | 9 | ||||
-rw-r--r-- | include/linux/smp_lock.h | 65 | ||||
-rw-r--r-- | include/trace/events/bkl.h | 61 |
3 files changed, 1 insertions, 134 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 32f9fd6619b..ba362171e8a 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -93,13 +93,6 @@ */ #define in_nmi() (preempt_count() & NMI_MASK) -#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL) -# include <linux/sched.h> -# define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0) -#else -# define PREEMPT_INATOMIC_BASE 0 -#endif - #if defined(CONFIG_PREEMPT) # define PREEMPT_CHECK_OFFSET 1 #else @@ -113,7 +106,7 @@ * used in the general case to determine whether sleeping is possible. * Do not use in_atomic() in driver code. */ -#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_INATOMIC_BASE) +#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) /* * Check whether we were atomic before we did preempt_disable(): diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h deleted file mode 100644 index 3a198820273..00000000000 --- a/include/linux/smp_lock.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef __LINUX_SMPLOCK_H -#define __LINUX_SMPLOCK_H - -#ifdef CONFIG_LOCK_KERNEL -#include <linux/sched.h> - -extern int __lockfunc __reacquire_kernel_lock(void); -extern void __lockfunc __release_kernel_lock(void); - -/* - * Release/re-acquire global kernel lock for the scheduler - */ -#define release_kernel_lock(tsk) do { \ - if (unlikely((tsk)->lock_depth >= 0)) \ - __release_kernel_lock(); \ -} while (0) - -static inline int reacquire_kernel_lock(struct task_struct *task) -{ - if (unlikely(task->lock_depth >= 0)) - return __reacquire_kernel_lock(); - return 0; -} - -extern void __lockfunc -_lock_kernel(const char *func, const char *file, int line) -__acquires(kernel_lock); - -extern void __lockfunc -_unlock_kernel(const char *func, const char *file, int line) -__releases(kernel_lock); - -#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 - * function, but they *do* need to know that the BKL became available. - * This function just avoids wrapping a bunch of lock/unlock pairs - * around code which doesn't really need it. - */ -static inline void cycle_kernel_lock(void) -{ - lock_kernel(); - unlock_kernel(); -} - -#else - -#ifdef CONFIG_BKL /* provoke build bug if not set */ -#define lock_kernel() -#define unlock_kernel() -#define cycle_kernel_lock() do { } while(0) -#endif /* CONFIG_BKL */ - -#define release_kernel_lock(task) do { } while(0) -#define reacquire_kernel_lock(task) 0 - -#endif /* CONFIG_LOCK_KERNEL */ -#endif /* __LINUX_SMPLOCK_H */ diff --git a/include/trace/events/bkl.h b/include/trace/events/bkl.h deleted file mode 100644 index 1af72dc2427..00000000000 --- a/include/trace/events/bkl.h +++ /dev/null @@ -1,61 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM bkl - -#if !defined(_TRACE_BKL_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_BKL_H - -#include <linux/tracepoint.h> - -TRACE_EVENT(lock_kernel, - - TP_PROTO(const char *func, const char *file, int line), - - TP_ARGS(func, file, line), - - TP_STRUCT__entry( - __field( int, depth ) - __field_ext( const char *, func, FILTER_PTR_STRING ) - __field_ext( const char *, file, FILTER_PTR_STRING ) - __field( int, line ) - ), - - TP_fast_assign( - /* We want to record the lock_depth after lock is acquired */ - __entry->depth = current->lock_depth + 1; - __entry->func = func; - __entry->file = file; - __entry->line = line; - ), - - TP_printk("depth=%d file:line=%s:%d func=%s()", __entry->depth, - __entry->file, __entry->line, __entry->func) -); - -TRACE_EVENT(unlock_kernel, - - TP_PROTO(const char *func, const char *file, int line), - - TP_ARGS(func, file, line), - - TP_STRUCT__entry( - __field(int, depth ) - __field(const char *, func ) - __field(const char *, file ) - __field(int, line ) - ), - - TP_fast_assign( - __entry->depth = current->lock_depth; - __entry->func = func; - __entry->file = file; - __entry->line = line; - ), - - TP_printk("depth=%d file:line=%s:%d func=%s()", __entry->depth, - __entry->file, __entry->line, __entry->func) -); - -#endif /* _TRACE_BKL_H */ - -/* This part must be outside protection */ -#include <trace/define_trace.h> |