aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event_p4.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2010-03-13 03:11:16 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-13 07:32:27 -0500
commit8576e1971663ffdb6139041de97cdd2e1d4791cc (patch)
tree9f4a8ec49e65c77fc2f786006bd50844946c9c4a /arch/x86/kernel/cpu/perf_event_p4.c
parent567e54790e5c07152a93b6de4d0210af8b77da87 (diff)
x86, perf: Unmask LVTPC only if we have APIC supported
Ingo reported: | | There's a build failure on -tip with the P4 driver, on UP 32-bit, if | PERF_EVENTS is enabled but UP_APIC is disabled: | | arch/x86/built-in.o: In function `p4_pmu_handle_irq': | perf_event.c:(.text+0xa756): undefined reference to `apic' | perf_event.c:(.text+0xa76e): undefined reference to `apic' | So we have to unmask LVTPC only if we're configured to have one. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> CC: Lin Ming <ming.m.lin@intel.com> CC: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20100313081116.GA5179@lenovo> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_p4.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event_p4.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index 381f593e829..ef861da1c8a 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -365,8 +365,10 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
365 } 365 }
366 366
367 if (handled) { 367 if (handled) {
368#ifdef CONFIG_X86_LOCAL_APIC
368 /* p4 quirk: unmask it again */ 369 /* p4 quirk: unmask it again */
369 apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); 370 apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
371#endif
370 inc_irq_stat(apic_perf_irqs); 372 inc_irq_stat(apic_perf_irqs);
371 } 373 }
372 374