diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:49:31 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:49:31 -0400 |
| commit | 31b7eab27a314b153d8fa07ba9e9ec00a98141e1 (patch) | |
| tree | 47415377d5f9bcf8c06e501f1636088548202edf /include/linux | |
| parent | 1053e6bba091d9d18797f7789df6a7ef8735f20c (diff) | |
| parent | 4ba053c04aece1f4734056f21b751eee47ea3fb1 (diff) | |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: Check the depth of subclass
lockdep: Add improved subclass caching
affs: Use sema_init instead of init_MUTEX
hfs: Convert tree_lock to mutex
arm: Bcmring: semaphore cleanup
printk: Make console_sem a semaphore not a pseudo mutex
drivers/macintosh/adb: Do not claim that the semaphore is a mutex
parport: Semaphore cleanup
irda: Semaphore cleanup
net: Wan/cosa.c: Convert "mutex" to semaphore
net: Ppp_async: semaphore cleanup
hamradio: Mkiss: semaphore cleanup
hamradio: 6pack: semaphore cleanup
net: 3c527: semaphore cleanup
input: Serio/hp_sdc: semaphore cleanup
input: Serio/hil_mlc: semaphore cleanup
input: Misc/hp_sdc_rtc: semaphore cleanup
lockup_detector: Make callback function static
lockup detector: Fix grammar by adding a missing "to" in the comments
lockdep: Remove __debug_show_held_locks
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/debug_locks.h | 5 | ||||
| -rw-r--r-- | include/linux/lockdep.h | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 29b3ce3f2a1d..2833452ea01c 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
| @@ -49,7 +49,6 @@ struct task_struct; | |||
| 49 | 49 | ||
| 50 | #ifdef CONFIG_LOCKDEP | 50 | #ifdef CONFIG_LOCKDEP |
| 51 | extern void debug_show_all_locks(void); | 51 | extern void debug_show_all_locks(void); |
| 52 | extern void __debug_show_held_locks(struct task_struct *task); | ||
| 53 | extern void debug_show_held_locks(struct task_struct *task); | 52 | extern void debug_show_held_locks(struct task_struct *task); |
| 54 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); | 53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); |
| 55 | extern void debug_check_no_locks_held(struct task_struct *task); | 54 | extern void debug_check_no_locks_held(struct task_struct *task); |
| @@ -58,10 +57,6 @@ static inline void debug_show_all_locks(void) | |||
| 58 | { | 57 | { |
| 59 | } | 58 | } |
| 60 | 59 | ||
| 61 | static inline void __debug_show_held_locks(struct task_struct *task) | ||
| 62 | { | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline void debug_show_held_locks(struct task_struct *task) | 60 | static inline void debug_show_held_locks(struct task_struct *task) |
| 66 | { | 61 | { |
| 67 | } | 62 | } |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 06aed8305bf3..2186a64ee4b5 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -32,6 +32,17 @@ extern int lock_stat; | |||
| 32 | #define MAX_LOCKDEP_SUBCLASSES 8UL | 32 | #define MAX_LOCKDEP_SUBCLASSES 8UL |
| 33 | 33 | ||
| 34 | /* | 34 | /* |
| 35 | * NR_LOCKDEP_CACHING_CLASSES ... Number of classes | ||
| 36 | * cached in the instance of lockdep_map | ||
| 37 | * | ||
| 38 | * Currently main class (subclass == 0) and signle depth subclass | ||
| 39 | * are cached in lockdep_map. This optimization is mainly targeting | ||
| 40 | * on rq->lock. double_rq_lock() acquires this highly competitive with | ||
| 41 | * single depth. | ||
| 42 | */ | ||
| 43 | #define NR_LOCKDEP_CACHING_CLASSES 2 | ||
| 44 | |||
| 45 | /* | ||
| 35 | * Lock-classes are keyed via unique addresses, by embedding the | 46 | * Lock-classes are keyed via unique addresses, by embedding the |
| 36 | * lockclass-key into the kernel (or module) .data section. (For | 47 | * lockclass-key into the kernel (or module) .data section. (For |
| 37 | * static locks we use the lock address itself as the key.) | 48 | * static locks we use the lock address itself as the key.) |
| @@ -138,7 +149,7 @@ void clear_lock_stats(struct lock_class *class); | |||
| 138 | */ | 149 | */ |
| 139 | struct lockdep_map { | 150 | struct lockdep_map { |
| 140 | struct lock_class_key *key; | 151 | struct lock_class_key *key; |
| 141 | struct lock_class *class_cache; | 152 | struct lock_class *class_cache[NR_LOCKDEP_CACHING_CLASSES]; |
| 142 | const char *name; | 153 | const char *name; |
| 143 | #ifdef CONFIG_LOCK_STAT | 154 | #ifdef CONFIG_LOCK_STAT |
| 144 | int cpu; | 155 | int cpu; |
