From: Cyrill Gorcunov on
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(a)elte.hu>
CC: Lin Ming <ming.m.lin(a)intel.com>
CC: Peter Zijlstra <peterz(a)infradead.org>
Signed-off-by: Cyrill Gorcunov <gorcunov(a)openvz.org>
---
arch/x86/kernel/cpu/perf_event_p4.c | 2 ++
1 file changed, 2 insertions(+)

Index: linux-2.6.git/arch/x86/kernel/cpu/perf_event_p4.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/cpu/perf_event_p4.c
+++ linux-2.6.git/arch/x86/kernel/cpu/perf_event_p4.c
@@ -365,8 +365,10 @@ static int p4_pmu_handle_irq(struct pt_r
}

if (handled) {
+#ifdef CONFIG_X86_LOCAL_APIC
/* p4 quirk: unmask it again */
apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
+#endif
inc_irq_stat(apic_perf_irqs);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/