]> git.baikalelectronics.ru Git - kernel.git/commit
cpu/hotplug: Ignore pm_wakeup_pending() for disable_nonboot_cpus()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 27 Mar 2020 11:06:44 +0000 (12:06 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 28 Mar 2020 10:42:55 +0000 (11:42 +0100)
commit451971178e0ebfed9db4d18ba6a9c6c66cf6b0cf
tree1252ed7d0059e070795e9e4e5d8d6ac06b1cee46
parent5ee66d87c8c072b384ff096d8c1792fc123c63ff
cpu/hotplug: Ignore pm_wakeup_pending() for disable_nonboot_cpus()

A recent change to freeze_secondary_cpus() which added an early abort if a
wakeup is pending missed the fact that the function is also invoked for
shutdown, reboot and kexec via disable_nonboot_cpus().

In case of disable_nonboot_cpus() the wakeup event needs to be ignored as
the purpose is to terminate the currently running kernel.

Add a 'suspend' argument which is only set when the freeze is in context of
a suspend operation. If not set then an eventually pending wakeup event is
ignored.

Fixes: b31dd67ad98a ("cpu/hotplug: Abort disabling secondary CPUs if wakeup is pending")
Reported-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/874kuaxdiz.fsf@nanos.tec.linutronix.de
include/linux/cpu.h
kernel/cpu.c