You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
+2
-19
@@ -575,7 +575,7 @@ out:
|
||||
/*
|
||||
* Create/destroy watchdog threads as CPUs come and go:
|
||||
*/
|
||||
static int
|
||||
static int __cpuinit
|
||||
cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
|
||||
{
|
||||
int hotcpu = (unsigned long)hcpu;
|
||||
@@ -610,27 +610,10 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block cpu_nfb = {
|
||||
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
|
||||
* properly for the boot CPU. This information is required for restarting the
|
||||
* NMI watchdog.
|
||||
*/
|
||||
void lockup_detector_bootcpu_resume(void)
|
||||
{
|
||||
void *cpu = (void *)(long)smp_processor_id();
|
||||
|
||||
cpu_callback(&cpu_nfb, CPU_DEAD_FROZEN, cpu);
|
||||
cpu_callback(&cpu_nfb, CPU_UP_PREPARE_FROZEN, cpu);
|
||||
cpu_callback(&cpu_nfb, CPU_ONLINE_FROZEN, cpu);
|
||||
}
|
||||
#endif
|
||||
|
||||
void __init lockup_detector_init(void)
|
||||
{
|
||||
void *cpu = (void *)(long)smp_processor_id();
|
||||
|
||||
Reference in New Issue
Block a user