]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nmi-watchdog-fix-for-lockup-detector-breakage-on-resume-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 3 May 2012 05:44:15 +0000 (15:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:43 +0000 (15:46 +1000)
make lockup_detector_bootcpu_resume() conditional on CONFIG_SUSPEND

Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sameer Nanda <snanda@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/sched.h
kernel/watchdog.c

index 6669e7294cc9f7f78960133fbf7fe741ce2b8fb9..0d4ff63b2275ded7a78a56b3c1ca23513cb987d1 100644 (file)
@@ -317,7 +317,6 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
                                  size_t *lenp, loff_t *ppos);
 extern unsigned int  softlockup_panic;
 void lockup_detector_init(void);
-void lockup_detector_bootcpu_resume(void);
 #else
 static inline void touch_softlockup_watchdog(void)
 {
@@ -331,6 +330,11 @@ static inline void touch_all_softlockup_watchdogs(void)
 static inline void lockup_detector_init(void)
 {
 }
+#endif
+
+#if defined(CONFIG_LOCKUP_DETECTOR) && defined(CONFIG_SUSPEND)
+void lockup_detector_bootcpu_resume(void);
+#else
 static inline void lockup_detector_bootcpu_resume(void)
 {
 }
index c4dd7e2c617997bd0a41873169029a68e994c595..38f39007546f1f427ca265381cc28fa99a465165 100644 (file)
@@ -597,6 +597,7 @@ static struct notifier_block __cpuinitdata cpu_nfb = {
        .notifier_call = cpu_callback
 };
 
+#ifdef CONFIG_SUSPEND
 /*
  * On exit from suspend we force an offline->online transition on the boot CPU
  * so that the PMU state that was lost while in suspended state gets set up
@@ -610,6 +611,7 @@ void lockup_detector_bootcpu_resume(void)
        cpu_callback(&cpu_nfb, CPU_DEAD, cpu);
        cpu_callback(&cpu_nfb, CPU_ONLINE, cpu);
 }
+#endif
 
 void __init lockup_detector_init(void)
 {