Commit-ID: b32ed7f5de262b10633bb6c6dbb7f8ba46598cf4 Gitweb: http://git.kernel.org/tip/b32ed7f5de262b10633bb6c6dbb7f8ba46598cf4 Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx> AuthorDate: Thu, 21 May 2015 12:38:21 +0200 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Wed, 27 May 2015 09:17:42 +0200 perf/x86/intel: Add lockdep assert Lockdep is very good at finding incorrect IRQ state while locking and is far better at telling us if we hold a lock than the _is_locked() API. It also generates less code for !DEBUG kernels. Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Stephane Eranian <eranian@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Vince Weaver <vincent.weaver@xxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- arch/x86/kernel/cpu/perf_event_intel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 0ea0405..5182cee 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c @@ -1926,7 +1926,6 @@ intel_start_scheduling(struct cpu_hw_events *cpuc) * in stop_event_scheduling() * makes scheduling appear as a transaction */ - WARN_ON_ONCE(!irqs_disabled()); raw_spin_lock(&excl_cntrs->lock); /* @@ -2208,7 +2207,7 @@ static void intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cnt xl = &excl_cntrs->states[tid]; - WARN_ON_ONCE(!raw_spin_is_locked(&excl_cntrs->lock)); + lockdep_assert_held(&excl_cntrs->lock); if (cntr >= 0) { if (c->flags & PERF_X86_EVENT_EXCL) -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |