mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
Revert "ANDROID: GKI: arm64: psci: Support for OS initiated scheme"
This reverts commit fd2e0c7338.
This patch is incomplete and halt system booting because of calling
trust with wrong idle paramter.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8361bd1d585433dfbd41816c71f6de4b63d6cb49
This commit is contained in:
@@ -397,26 +397,29 @@ int psci_cpu_init_idle(unsigned int cpu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int psci_suspend_finisher(unsigned long state_id)
|
||||
static int psci_suspend_finisher(unsigned long index)
|
||||
{
|
||||
return psci_ops.cpu_suspend(state_id,
|
||||
u32 *state = __this_cpu_read(psci_power_state);
|
||||
|
||||
return psci_ops.cpu_suspend(state[index - 1],
|
||||
__pa_symbol(cpu_resume));
|
||||
}
|
||||
int psci_cpu_suspend_enter(unsigned long state_id)
|
||||
|
||||
int psci_cpu_suspend_enter(unsigned long index)
|
||||
{
|
||||
int ret;
|
||||
|
||||
u32 *state = __this_cpu_read(psci_power_state);
|
||||
/*
|
||||
* idle state index 0 corresponds to wfi, should never be called
|
||||
* from the cpu_suspend operations
|
||||
*/
|
||||
if (WARN_ON_ONCE(!state_id))
|
||||
if (WARN_ON_ONCE(!index))
|
||||
return -EINVAL;
|
||||
|
||||
if (!psci_power_state_loses_context(state_id))
|
||||
ret = psci_ops.cpu_suspend(state_id, 0);
|
||||
if (!psci_power_state_loses_context(state[index - 1]))
|
||||
ret = psci_ops.cpu_suspend(state[index - 1], 0);
|
||||
else
|
||||
ret = cpu_suspend(state_id, psci_suspend_finisher);
|
||||
ret = cpu_suspend(index, psci_suspend_finisher);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user