提交 54d47a2b 编写于 作者: F Frederic Weisbecker

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: NFrederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
上级 fa9a97de
...@@ -144,12 +144,12 @@ DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats); ...@@ -144,12 +144,12 @@ DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats);
#define debug_atomic_inc(ptr) { \ #define debug_atomic_inc(ptr) { \
WARN_ON_ONCE(!irqs_disabled()); \ WARN_ON_ONCE(!irqs_disabled()); \
this_cpu_inc(lockdep_stats.ptr); \ __this_cpu_inc(lockdep_stats.ptr); \
} }
#define debug_atomic_dec(ptr) { \ #define debug_atomic_dec(ptr) { \
WARN_ON_ONCE(!irqs_disabled()); \ WARN_ON_ONCE(!irqs_disabled()); \
this_cpu_dec(lockdep_stats.ptr); \ __this_cpu_dec(lockdep_stats.ptr); \
} }
#define debug_atomic_read(ptr) ({ \ #define debug_atomic_read(ptr) ({ \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册