Commit cafcd80d216bc2136b8edbb794327e495792c666

Authored by Don Zickus
Committed by Frederic Weisbecker
1 parent 23637d477c

lockup_detector: Cross arch compile fixes

Combining the softlockup and hardlockup code causes watchdog.c
to build even without the hardlockup detection support.

So if an arch, that has the previous and the new nmi watchdog
implementations cohabiting, wants to know if the generic one
is in use, CONFIG_LOCKUP_DETECTOR is not a reliable check.
We need to use CONFIG_HARDLOCKUP_DETECTOR instead.

Fixes:
	kernel/built-in.o: In function `touch_nmi_watchdog':
	(.text+0x449bc): multiple definition of `touch_nmi_watchdog'
	arch/sparc/kernel/built-in.o:(.text+0x11b28): first defined here

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
LKML-Reference: <20100514151121.GR15159@redhat.com>
[ use CONFIG_HARDLOCKUP_DETECTOR instead of CONFIG_PERF_EVENTS_NMI]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

Showing 3 changed files with 8 additions and 5 deletions Side-by-side Diff

arch/x86/kernel/apic/Makefile
... ... @@ -3,10 +3,10 @@
3 3 #
4 4  
5 5 obj-$(CONFIG_X86_LOCAL_APIC) += apic.o apic_noop.o probe_$(BITS).o ipi.o
6   -ifneq ($(CONFIG_LOCKUP_DETECTOR),y)
  6 +ifneq ($(CONFIG_HARDLOCKUP_DETECTOR),y)
7 7 obj-$(CONFIG_X86_LOCAL_APIC) += nmi.o
8 8 endif
9   -obj-$(CONFIG_LOCKUP_DETECTOR) += hw_nmi.o
  9 +obj-$(CONFIG_HARDLOCKUP_DETECTOR) += hw_nmi.o
10 10  
11 11 obj-$(CONFIG_X86_IO_APIC) += io_apic.o
12 12 obj-$(CONFIG_SMP) += ipi.o
... ... @@ -20,7 +20,7 @@
20 20 extern void acpi_nmi_disable(void);
21 21 extern void acpi_nmi_enable(void);
22 22 #else
23   -#ifndef CONFIG_LOCKUP_DETECTOR
  23 +#ifndef CONFIG_HARDLOCKUP_DETECTOR
24 24 static inline void touch_nmi_watchdog(void)
25 25 {
26 26 touch_softlockup_watchdog();
... ... @@ -31,13 +31,13 @@
31 31 int __read_mostly softlockup_thresh = 60;
32 32  
33 33 static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts);
34   -static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
35 34 static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog);
36 35 static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer);
37 36 static DEFINE_PER_CPU(bool, softlockup_touch_sync);
38   -static DEFINE_PER_CPU(bool, hard_watchdog_warn);
39 37 static DEFINE_PER_CPU(bool, soft_watchdog_warn);
40 38 #ifdef CONFIG_HARDLOCKUP_DETECTOR
  39 +static DEFINE_PER_CPU(bool, hard_watchdog_warn);
  40 +static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
41 41 static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts);
42 42 static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts_saved);
43 43 static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
44 44  
... ... @@ -139,12 +139,15 @@
139 139 per_cpu(watchdog_touch_ts, cpu) = 0;
140 140 }
141 141  
  142 +#ifdef CONFIG_HARDLOCKUP_DETECTOR
142 143 void touch_nmi_watchdog(void)
143 144 {
144 145 __get_cpu_var(watchdog_nmi_touch) = true;
145 146 touch_softlockup_watchdog();
146 147 }
147 148 EXPORT_SYMBOL(touch_nmi_watchdog);
  149 +
  150 +#endif
148 151  
149 152 void touch_softlockup_watchdog_sync(void)
150 153 {