Skip to content

Commit

Permalink
lockdep: No need to disable preemption in debug atomic ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fweisbec committed May 4, 2010
1 parent fa9a97d commit 54d47a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/lockdep_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats);

#define debug_atomic_inc(ptr) { \
WARN_ON_ONCE(!irqs_disabled()); \
this_cpu_inc(lockdep_stats.ptr); \
__this_cpu_inc(lockdep_stats.ptr); \
}

#define debug_atomic_dec(ptr) { \
WARN_ON_ONCE(!irqs_disabled()); \
this_cpu_dec(lockdep_stats.ptr); \
__this_cpu_dec(lockdep_stats.ptr); \
}

#define debug_atomic_read(ptr) ({ \
Expand Down

0 comments on commit 54d47a2

Please sign in to comment.