Commit 54d47a2be5e7f928fb77b2f5a0761f6bd3c9dbff
1 parent
fa9a97dec6
Exists in
master
and in
4 other branches
lockdep: No need to disable preemption in debug atomic ops
No need to disable preemption in the debug_atomic_* ops, as we ensure interrupts are disabled already. So let's use the __this_cpu_ops() rather than this_cpu_ops() that enclose the ops in a preempt disabled section. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
kernel/lockdep_internals.h
... | ... | @@ -144,12 +144,12 @@ |
144 | 144 | |
145 | 145 | #define debug_atomic_inc(ptr) { \ |
146 | 146 | WARN_ON_ONCE(!irqs_disabled()); \ |
147 | - this_cpu_inc(lockdep_stats.ptr); \ | |
147 | + __this_cpu_inc(lockdep_stats.ptr); \ | |
148 | 148 | } |
149 | 149 | |
150 | 150 | #define debug_atomic_dec(ptr) { \ |
151 | 151 | WARN_ON_ONCE(!irqs_disabled()); \ |
152 | - this_cpu_dec(lockdep_stats.ptr); \ | |
152 | + __this_cpu_dec(lockdep_stats.ptr); \ | |
153 | 153 | } |
154 | 154 | |
155 | 155 | #define debug_atomic_read(ptr) ({ \ |