aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorDon Zickus <dzickus@redhat.com>2010-05-14 11:11:21 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-15 22:25:14 -0400
commitcafcd80d216bc2136b8edbb794327e495792c666 (patch)
tree4eb819c124684b14d48faf094316e8dd3ba4b73a /kernel/watchdog.c
parent23637d477c1f53acbb176a02c241d60a25888fae (diff)
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>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 83fb63155cbc..e53622c1465e 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -31,13 +31,13 @@ int watchdog_enabled;
31int __read_mostly softlockup_thresh = 60; 31int __read_mostly softlockup_thresh = 60;
32 32
33static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts); 33static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts);
34static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
35static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog); 34static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog);
36static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer); 35static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer);
37static DEFINE_PER_CPU(bool, softlockup_touch_sync); 36static DEFINE_PER_CPU(bool, softlockup_touch_sync);
38static DEFINE_PER_CPU(bool, hard_watchdog_warn);
39static DEFINE_PER_CPU(bool, soft_watchdog_warn); 37static DEFINE_PER_CPU(bool, soft_watchdog_warn);
40#ifdef CONFIG_HARDLOCKUP_DETECTOR 38#ifdef CONFIG_HARDLOCKUP_DETECTOR
39static DEFINE_PER_CPU(bool, hard_watchdog_warn);
40static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
41static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts); 41static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts);
42static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts_saved); 42static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts_saved);
43static DEFINE_PER_CPU(struct perf_event *, watchdog_ev); 43static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
@@ -139,6 +139,7 @@ void touch_all_softlockup_watchdogs(void)
139 per_cpu(watchdog_touch_ts, cpu) = 0; 139 per_cpu(watchdog_touch_ts, cpu) = 0;
140} 140}
141 141
142#ifdef CONFIG_HARDLOCKUP_DETECTOR
142void touch_nmi_watchdog(void) 143void touch_nmi_watchdog(void)
143{ 144{
144 __get_cpu_var(watchdog_nmi_touch) = true; 145 __get_cpu_var(watchdog_nmi_touch) = true;
@@ -146,6 +147,8 @@ void touch_nmi_watchdog(void)
146} 147}
147EXPORT_SYMBOL(touch_nmi_watchdog); 148EXPORT_SYMBOL(touch_nmi_watchdog);
148 149
150#endif
151
149void touch_softlockup_watchdog_sync(void) 152void touch_softlockup_watchdog_sync(void)
150{ 153{
151 __raw_get_cpu_var(softlockup_touch_sync) = true; 154 __raw_get_cpu_var(softlockup_touch_sync) = true;