mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
suspend: power: plug off the secondary cpus for freeze mode [1/1]
PD#SWPL-2399 Problem: freeze mode can not kill the secondary cpus Solution: move the cpu kill function before the freeze function Verify: tl1 test success Change-Id: I1da7cb8bcd800b8372fd152490eadd4ef3866ece Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
This commit is contained in:
@@ -379,6 +379,25 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
|
||||
if (suspend_test(TEST_PLATFORM))
|
||||
goto Platform_wake;
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MODIFY
|
||||
error = disable_nonboot_cpus();
|
||||
if (error || suspend_test(TEST_CPUS)) {
|
||||
log_suspend_abort_reason("Disabling non-boot cpus failed");
|
||||
goto Enable_cpus;
|
||||
}
|
||||
/*
|
||||
* PM_SUSPEND_FREEZE equals
|
||||
* frozen processes + suspended devices + idle processors.
|
||||
* Thus we should invoke freeze_enter() soon after
|
||||
* all the devices are suspended.
|
||||
*/
|
||||
if (state == PM_SUSPEND_FREEZE) {
|
||||
trace_suspend_resume(TPS("machine_suspend"), state, true);
|
||||
freeze_enter();
|
||||
trace_suspend_resume(TPS("machine_suspend"), state, false);
|
||||
goto Enable_cpus;
|
||||
}
|
||||
#else
|
||||
/*
|
||||
* PM_SUSPEND_FREEZE equals
|
||||
* frozen processes + suspended devices + idle processors.
|
||||
@@ -397,6 +416,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
|
||||
log_suspend_abort_reason("Disabling non-boot cpus failed");
|
||||
goto Enable_cpus;
|
||||
}
|
||||
#endif
|
||||
|
||||
arch_suspend_disable_irqs();
|
||||
BUG_ON(!irqs_disabled());
|
||||
|
||||
Reference in New Issue
Block a user