From: Andrew Morton Date: Thu, 3 May 2012 05:44:15 +0000 (+1000) Subject: nmi-watchdog-fix-for-lockup-detector-breakage-on-resume-fix-fix X-Git-Tag: next-20120503~2^2~128 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e7adf456c1adc2f6cb896dd97b12845bda62cc33;p=karo-tx-linux.git nmi-watchdog-fix-for-lockup-detector-breakage-on-resume-fix-fix make lockup_detector_bootcpu_resume() conditional on CONFIG_SUSPEND Cc: "Rafael J. Wysocki" Cc: Don Zickus Cc: Ingo Molnar Cc: Mandeep Singh Baines Cc: Peter Zijlstra Cc: Sameer Nanda Signed-off-by: Andrew Morton --- diff --git a/include/linux/sched.h b/include/linux/sched.h index 6669e7294cc9..0d4ff63b2275 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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) { } diff --git a/kernel/watchdog.c b/kernel/watchdog.c index c4dd7e2c6179..38f39007546f 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -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) {