summaryrefslogtreecommitdiff
path: root/kernel/smp.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2017-09-07 11:42:30 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:34 +0200
commit3c1b1d400484fd6d7fc11bd005626fe04085f6ef (patch)
tree7616c8347af62dcfd052a2bd15d82bd21c1c3b55 /kernel/smp.c
parent2590a10d3fffb0271466a169db6aabc314503b7d (diff)
smp: Wake up all idle CPUs when suspending to idle
Regardless of CPU isolation or not, we need to wake up all the CPUs during suspend to idle so that each CPU can disable their local tick device, etc. If we don't wake every CPU up, then we don't fully suspend the system and things like sched_clock and timekeeping are never stopped properly. Change-Id: Ic9141602acc5e6cddefca0727f9be075dad3e498 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'kernel/smp.c')
-rw-r--r--kernel/smp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/smp.c b/kernel/smp.c
index b2ec21c5c9d6..3f300d3fd1f6 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -14,6 +14,7 @@
#include <linux/smp.h>
#include <linux/cpu.h>
#include <linux/sched.h>
+#include <linux/suspend.h>
#include "smpboot.h"
@@ -766,7 +767,8 @@ void wake_up_all_idle_cpus(void)
for_each_online_cpu(cpu) {
if (cpu == smp_processor_id())
continue;
- if (!cpu_isolated(cpu))
+ if (suspend_freeze_state == FREEZE_STATE_ENTER ||
+ !cpu_isolated(cpu))
wake_up_if_idle(cpu);
}
preempt_enable();