diff options
Diffstat (limited to 'kernel/lockdep_internals.h')
-rw-r--r-- | kernel/lockdep_internals.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h index 2b174762fa0e..7de27a80f802 100644 --- a/kernel/lockdep_internals.h +++ b/kernel/lockdep_internals.h | |||
@@ -139,6 +139,9 @@ struct lockdep_stats { | |||
139 | 139 | ||
140 | DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats); | 140 | DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats); |
141 | 141 | ||
142 | #define __debug_atomic_inc(ptr) \ | ||
143 | this_cpu_inc(lockdep_stats.ptr); | ||
144 | |||
142 | #define debug_atomic_inc(ptr) { \ | 145 | #define debug_atomic_inc(ptr) { \ |
143 | WARN_ON_ONCE(!irqs_disabled()); \ | 146 | WARN_ON_ONCE(!irqs_disabled()); \ |
144 | this_cpu_inc(lockdep_stats.ptr); \ | 147 | this_cpu_inc(lockdep_stats.ptr); \ |
@@ -160,6 +163,7 @@ DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats); | |||
160 | __total; \ | 163 | __total; \ |
161 | }) | 164 | }) |
162 | #else | 165 | #else |
166 | # define __debug_atomic_inc(ptr) do { } while (0) | ||
163 | # define debug_atomic_inc(ptr) do { } while (0) | 167 | # define debug_atomic_inc(ptr) do { } while (0) |
164 | # define debug_atomic_dec(ptr) do { } while (0) | 168 | # define debug_atomic_dec(ptr) do { } while (0) |
165 | # define debug_atomic_read(ptr) 0 | 169 | # define debug_atomic_read(ptr) 0 |