All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86,perf: Unmask LVTPC only if we have APIC supported
@ 2010-03-13  8:11 Cyrill Gorcunov
  2010-03-13 12:24 ` Ingo Molnar
  2010-03-13 16:21 ` [tip:perf/core] x86, perf: " tip-bot for Cyrill Gorcunov
  0 siblings, 2 replies; 10+ messages in thread
From: Cyrill Gorcunov @ 2010-03-13  8:11 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Lin Ming, Peter Zijlstra, LKML

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>
CC: Lin Ming <ming.m.lin@intel.com>
CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@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);
 	}
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-03-13 16:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13  8:11 [PATCH] x86,perf: Unmask LVTPC only if we have APIC supported Cyrill Gorcunov
2010-03-13 12:24 ` Ingo Molnar
2010-03-13 12:32   ` Cyrill Gorcunov
2010-03-13 12:40     ` Ingo Molnar
2010-03-13 12:42       ` Ingo Molnar
2010-03-13 13:42       ` Cyrill Gorcunov
2010-03-13 13:50         ` Ingo Molnar
2010-03-13 14:08           ` Cyrill Gorcunov
2010-03-13 15:03           ` Cyrill Gorcunov
2010-03-13 16:21 ` [tip:perf/core] x86, perf: " tip-bot for Cyrill Gorcunov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.