Skip to content
Commit 500ad2d8 authored by K.Prasad's avatar K.Prasad Committed by Ingo Molnar
Browse files

perf/hwpb: Invoke __perf_event_disable() if interrupts are already disabled



While debugging a warning message on PowerPC while using hardware
breakpoints, it was discovered that when perf_event_disable is invoked
through hw_breakpoint_handler function with interrupts disabled, a
subsequent IPI in the code path would trigger a WARN_ON_ONCE message in
smp_call_function_single function.

This patch calls __perf_event_disable() when interrupts are already
disabled, instead of perf_event_disable().

Reported-by: default avatarEdjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Signed-off-by: default avatarK.Prasad <Prasad.Krishnan@gmail.com>
[naveen.n.rao@linux.vnet.ibm.com: v3: Check to make sure we target current task]
Signed-off-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120802081635.5811.17737.stgit@localhost.localdomain


[ Fixed build error on MIPS. ]
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 3ec18cd8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment