mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nmi_watchdog: undefined 'apic' compile fix
@ 2010-02-19  2:56 Don Zickus
  2010-02-20  8:12 ` [tip:perf/nmi] nmi_watchdog: Fix undefined 'apic' build bug tip-bot for Don Zickus
  0 siblings, 1 reply; 2+ messages in thread
From: Don Zickus @ 2010-02-19  2:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Don Zickus, mingo, a.p.zijlstra, gorcunov, aris

Ingo provided me a config that fails to compile with

arch/x86/built-in.o: In function `arch_trigger_all_cpu_backtrace':
(.text+0x17e78): undefined reference to `apic'
make: *** [.tmp_vmlinux1] Error 1

I realized I changed the compile behaviour of the nmi code by not wrapping
it with CONFIG_LOCAL_APIC.  To fix this I add a compile check for
ARCH_HAS_NMI_WATCHDOG around arch_trigger_all_cpu_backtrace.

Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 arch/x86/kernel/apic/hw_nmi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c
index 312d772..0b4d205 100644
--- a/arch/x86/kernel/apic/hw_nmi.c
+++ b/arch/x86/kernel/apic/hw_nmi.c
@@ -92,6 +92,7 @@ u64 hw_nmi_get_sample_period(void)
         return cpu_khz * 1000;
 }
 
+#ifdef ARCH_HAS_NMI_WATCHDOG
 void arch_trigger_all_cpu_backtrace(void)
 {
 	int i;
@@ -108,6 +109,7 @@ void arch_trigger_all_cpu_backtrace(void)
 		mdelay(1);
 	}
 }
+#endif
 
 /* STUB calls to mimic old nmi_watchdog behaviour */
 #if defined(CONFIG_X86_LOCAL_APIC)
-- 
1.6.6.83.gc9a2


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

end of thread, other threads:[~2010-02-20  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-19  2:56 [PATCH] nmi_watchdog: undefined 'apic' compile fix Don Zickus
2010-02-20  8:12 ` [tip:perf/nmi] nmi_watchdog: Fix undefined 'apic' build bug tip-bot for Don Zickus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome