From a41f774702768d9835b99979ccff0bde54abdd57 Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Tue, 4 May 2010 04:47:25 +0200 Subject: [PATCH] --- yaml --- r: 190988 b: refs/heads/master c: ba697f40dbb704956a4cf67a7845b538015a01ea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/lockdep.c | 2 +- trunk/kernel/lockdep_internals.h | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index dd003e81242d..46a60e8345fb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0e417fe1f247bb3ac056ee04604332005c334fac +refs/heads/master: ba697f40dbb704956a4cf67a7845b538015a01ea diff --git a/trunk/kernel/lockdep.c b/trunk/kernel/lockdep.c index 1b58a1bbcc87..9cf79858fd82 100644 --- a/trunk/kernel/lockdep.c +++ b/trunk/kernel/lockdep.c @@ -2303,7 +2303,7 @@ void trace_hardirqs_on_caller(unsigned long ip) * so this is racy by nature but loosing one hit * in a stat is not a big deal. */ - this_cpu_inc(lockdep_stats.redundant_hardirqs_on); + __debug_atomic_inc(redundant_hardirqs_on); return; } /* we'll do an OFF -> ON transition: */ diff --git a/trunk/kernel/lockdep_internals.h b/trunk/kernel/lockdep_internals.h index 2b174762fa0e..7de27a80f802 100644 --- a/trunk/kernel/lockdep_internals.h +++ b/trunk/kernel/lockdep_internals.h @@ -139,6 +139,9 @@ struct lockdep_stats { DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats); +#define __debug_atomic_inc(ptr) \ + this_cpu_inc(lockdep_stats.ptr); + #define debug_atomic_inc(ptr) { \ WARN_ON_ONCE(!irqs_disabled()); \ this_cpu_inc(lockdep_stats.ptr); \ @@ -160,6 +163,7 @@ DECLARE_PER_CPU(struct lockdep_stats, lockdep_stats); __total; \ }) #else +# define __debug_atomic_inc(ptr) do { } while (0) # define debug_atomic_inc(ptr) do { } while (0) # define debug_atomic_dec(ptr) do { } while (0) # define debug_atomic_read(ptr) 0