From 61eae524b6e452fd1be931c6e1ff8f7cf3ae969c Mon Sep 17 00:00:00 2001 From: Achin Gupta Date: Tue, 28 Jun 2016 16:46:15 +0100 Subject: Fix use of stale power states in PSCI standby finisher A PSCI CPU_SUSPEND request to place a CPU in retention states at power levels higher than the CPU power level is subject to the same state coordination as a power down state. A CPU could implement multiple retention states at a particular power level. When exiting WFI, the non-CPU power levels may be in a different retention state to what was initially requested, therefore each CPU should refresh its view of the states of all power levels. Previously, a CPU re-used the state of the power levels when it entered the retention state. This patch fixes this issue by ensuring that a CPU upon exit from retention reads the state of each power level afresh. Change-Id: I93b5f5065c63400c6fd2598dbaafac385748f989 --- lib/psci/psci_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/psci/psci_common.c') diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c index c6fea5b04..e87e8c054 100644 --- a/lib/psci/psci_common.c +++ b/lib/psci/psci_common.c @@ -252,8 +252,8 @@ static plat_local_state_t *psci_get_req_local_pwr_states(unsigned int pwrlvl, * function will be called after a cpu is powered on to find the local state * each power domain has emerged from. *****************************************************************************/ -static void psci_get_target_local_pwr_states(unsigned int end_pwrlvl, - psci_power_state_t *target_state) +void psci_get_target_local_pwr_states(unsigned int end_pwrlvl, + psci_power_state_t *target_state) { unsigned int parent_idx, lvl; plat_local_state_t *pd_state = target_state->pwr_domain_state; -- cgit v1.2.3