diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/lockdep.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r-- | include/linux/lockdep.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 06aed8305bf3..ef820a3c378b 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; |
@@ -424,25 +435,9 @@ do { \ | |||
424 | 435 | ||
425 | #endif /* CONFIG_LOCKDEP */ | 436 | #endif /* CONFIG_LOCKDEP */ |
426 | 437 | ||
427 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
428 | extern void early_init_irq_lock_class(void); | ||
429 | #else | ||
430 | static inline void early_init_irq_lock_class(void) | ||
431 | { | ||
432 | } | ||
433 | #endif | ||
434 | |||
435 | #ifdef CONFIG_TRACE_IRQFLAGS | 438 | #ifdef CONFIG_TRACE_IRQFLAGS |
436 | extern void early_boot_irqs_off(void); | ||
437 | extern void early_boot_irqs_on(void); | ||
438 | extern void print_irqtrace_events(struct task_struct *curr); | 439 | extern void print_irqtrace_events(struct task_struct *curr); |
439 | #else | 440 | #else |
440 | static inline void early_boot_irqs_off(void) | ||
441 | { | ||
442 | } | ||
443 | static inline void early_boot_irqs_on(void) | ||
444 | { | ||
445 | } | ||
446 | static inline void print_irqtrace_events(struct task_struct *curr) | 441 | static inline void print_irqtrace_events(struct task_struct *curr) |
447 | { | 442 | { |
448 | } | 443 | } |
@@ -492,12 +487,15 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
492 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 487 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
493 | # ifdef CONFIG_PROVE_LOCKING | 488 | # ifdef CONFIG_PROVE_LOCKING |
494 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) | 489 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
490 | # define mutex_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) | ||
495 | # else | 491 | # else |
496 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) | 492 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
493 | # define mutex_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i) | ||
497 | # endif | 494 | # endif |
498 | # define mutex_release(l, n, i) lock_release(l, n, i) | 495 | # define mutex_release(l, n, i) lock_release(l, n, i) |
499 | #else | 496 | #else |
500 | # define mutex_acquire(l, s, t, i) do { } while (0) | 497 | # define mutex_acquire(l, s, t, i) do { } while (0) |
498 | # define mutex_acquire_nest(l, s, t, n, i) do { } while (0) | ||
501 | # define mutex_release(l, n, i) do { } while (0) | 499 | # define mutex_release(l, n, i) do { } while (0) |
502 | #endif | 500 | #endif |
503 | 501 | ||
@@ -519,12 +517,15 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
519 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 517 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
520 | # ifdef CONFIG_PROVE_LOCKING | 518 | # ifdef CONFIG_PROVE_LOCKING |
521 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_) | 519 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_) |
520 | # define lock_map_acquire_read(l) lock_acquire(l, 0, 0, 2, 2, NULL, _THIS_IP_) | ||
522 | # else | 521 | # else |
523 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_) | 522 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_) |
523 | # define lock_map_acquire_read(l) lock_acquire(l, 0, 0, 2, 1, NULL, _THIS_IP_) | ||
524 | # endif | 524 | # endif |
525 | # define lock_map_release(l) lock_release(l, 1, _THIS_IP_) | 525 | # define lock_map_release(l) lock_release(l, 1, _THIS_IP_) |
526 | #else | 526 | #else |
527 | # define lock_map_acquire(l) do { } while (0) | 527 | # define lock_map_acquire(l) do { } while (0) |
528 | # define lock_map_acquire_read(l) do { } while (0) | ||
528 | # define lock_map_release(l) do { } while (0) | 529 | # define lock_map_release(l) do { } while (0) |
529 | #endif | 530 | #endif |
530 | 531 | ||