projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32975a4
)
perf, x86, Do not user perf_disable from NMI context
author
Peter Zijlstra
<
[email protected]
>
Mon, 8 Mar 2010 12:51:01 +0000
(13:51 +0100)
committer
Ingo Molnar
<
[email protected]
>
Wed, 10 Mar 2010 12:22:26 +0000
(13:22 +0100)
Explicitly use intel_pmu_{disable,enable}_all() in intel_pmu_handle_irq()
to avoid the NMI race conditions in perf_{disable,enable}
Signed-off-by: Peter Zijlstra <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/cpu/perf_event_intel.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/perf_event_intel.c
b/arch/x86/kernel/cpu/perf_event_intel.c
index 12e811a7d747e0e2560bf1b179987cb959aadbfb..c582449163fa312950934f301f0a725a98e123fe 100644
(file)
--- a/
arch/x86/kernel/cpu/perf_event_intel.c
+++ b/
arch/x86/kernel/cpu/perf_event_intel.c
@@
-745,11
+745,11
@@
static int intel_pmu_handle_irq(struct pt_regs *regs)
cpuc = &__get_cpu_var(cpu_hw_events);
-
perf_disable
();
+
intel_pmu_disable_all
();
intel_pmu_drain_bts_buffer();
status = intel_pmu_get_status();
if (!status) {
-
perf_enable
();
+
intel_pmu_enable_all
();
return 0;
}
@@
-759,8
+759,7
@@
again:
WARN_ONCE(1, "perfevents: irq loop stuck!\n");
perf_event_print_debug();
intel_pmu_reset();
- perf_enable();
- return 1;
+ goto done;
}
inc_irq_stat(apic_perf_irqs);
@@
-790,8
+789,8
@@
again:
if (status)
goto again;
- perf_enable();
-
+done:
+ intel_pmu_enable_all();
return 1;
}