diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-07 07:50:22 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-08 14:49:45 -0400 |
commit | 300d3739e873d50d4c6e3656f89007a217fb1d29 (patch) | |
tree | 05ed9e06da5920926e0048ee0591a724ee487968 /kernel/watchdog.c | |
parent | 77254950bb174d637cd88d1a74e137ecf3185a65 (diff) |
Revert "NMI watchdog: fix for lockup detector breakage on resume"
Revert commit 45226e9 (NMI watchdog: fix for lockup detector breakage
on resume) which breaks resume from system suspend on my SH7372
Mackerel board (by causing a NULL pointer dereference to happen) and
is generally wrong, because it abuses the CPU hotplug functionality
in a shamelessly blatant way.
The original issue should be addressed through appropriate syscore
resume callback instead.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r-- | kernel/watchdog.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 69add8a9da68..4b1dfba70f7c 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -575,7 +575,7 @@ out: | |||
575 | /* | 575 | /* |
576 | * Create/destroy watchdog threads as CPUs come and go: | 576 | * Create/destroy watchdog threads as CPUs come and go: |
577 | */ | 577 | */ |
578 | static int | 578 | static int __cpuinit |
579 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 579 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
580 | { | 580 | { |
581 | int hotcpu = (unsigned long)hcpu; | 581 | int hotcpu = (unsigned long)hcpu; |
@@ -610,27 +610,10 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
610 | return NOTIFY_OK; | 610 | return NOTIFY_OK; |
611 | } | 611 | } |
612 | 612 | ||
613 | static struct notifier_block cpu_nfb = { | 613 | static struct notifier_block __cpuinitdata cpu_nfb = { |
614 | .notifier_call = cpu_callback | 614 | .notifier_call = cpu_callback |
615 | }; | 615 | }; |
616 | 616 | ||
617 | #ifdef CONFIG_SUSPEND | ||
618 | /* | ||
619 | * On exit from suspend we force an offline->online transition on the boot CPU | ||
620 | * so that the PMU state that was lost while in suspended state gets set up | ||
621 | * properly for the boot CPU. This information is required for restarting the | ||
622 | * NMI watchdog. | ||
623 | */ | ||
624 | void lockup_detector_bootcpu_resume(void) | ||
625 | { | ||
626 | void *cpu = (void *)(long)smp_processor_id(); | ||
627 | |||
628 | cpu_callback(&cpu_nfb, CPU_DEAD_FROZEN, cpu); | ||
629 | cpu_callback(&cpu_nfb, CPU_UP_PREPARE_FROZEN, cpu); | ||
630 | cpu_callback(&cpu_nfb, CPU_ONLINE_FROZEN, cpu); | ||
631 | } | ||
632 | #endif | ||
633 | |||
634 | void __init lockup_detector_init(void) | 617 | void __init lockup_detector_init(void) |
635 | { | 618 | { |
636 | void *cpu = (void *)(long)smp_processor_id(); | 619 | void *cpu = (void *)(long)smp_processor_id(); |