mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00
chore(psci): drop skip_wfi variable
There is now a convent place at the end of the function to jump to when we shouldn't power down. This eliminates the need for skip_wfi. Change-Id: I8d1a88c77463e8ee6765b185adbe3d23d9fce101 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
This commit is contained in:
parent
da305ec75d
commit
dc0bf48669
1 changed files with 1 additions and 9 deletions
|
@ -121,7 +121,6 @@ int psci_cpu_suspend_start(unsigned int idx,
|
|||
unsigned int is_power_down_state)
|
||||
{
|
||||
int rc = PSCI_E_SUCCESS;
|
||||
bool skip_wfi = false;
|
||||
unsigned int parent_nodes[PLAT_MAX_PWR_LVL] = {0};
|
||||
unsigned int max_off_lvl = 0;
|
||||
#if FEAT_PABANDON
|
||||
|
@ -152,7 +151,6 @@ int psci_cpu_suspend_start(unsigned int idx,
|
|||
* detection that a wake-up interrupt has fired.
|
||||
*/
|
||||
if (read_isr_el1() != 0U) {
|
||||
skip_wfi = true;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -164,7 +162,6 @@ int psci_cpu_suspend_start(unsigned int idx,
|
|||
*/
|
||||
rc = psci_validate_state_coordination(idx, end_pwrlvl, state_info);
|
||||
if (rc != PSCI_E_SUCCESS) {
|
||||
skip_wfi = true;
|
||||
goto exit;
|
||||
}
|
||||
} else {
|
||||
|
@ -183,7 +180,6 @@ int psci_cpu_suspend_start(unsigned int idx,
|
|||
if (psci_plat_pm_ops->pwr_domain_validate_suspend != NULL) {
|
||||
rc = psci_plat_pm_ops->pwr_domain_validate_suspend(state_info);
|
||||
if (rc != PSCI_E_SUCCESS) {
|
||||
skip_wfi = true;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -243,17 +239,12 @@ int psci_cpu_suspend_start(unsigned int idx,
|
|||
plat_psci_stat_accounting_start(state_info);
|
||||
#endif
|
||||
|
||||
exit:
|
||||
/*
|
||||
* Release the locks corresponding to each power level in the
|
||||
* reverse order to which they were acquired.
|
||||
*/
|
||||
psci_release_pwr_domain_locks(end_pwrlvl, parent_nodes);
|
||||
|
||||
if (skip_wfi) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if ENABLE_RUNTIME_INSTRUMENTATION
|
||||
/*
|
||||
* Update the timestamp with cache off. We assume this
|
||||
|
@ -335,6 +326,7 @@ exit:
|
|||
*/
|
||||
psci_set_pwr_domains_to_run(idx, end_pwrlvl);
|
||||
|
||||
exit:
|
||||
psci_release_pwr_domain_locks(end_pwrlvl, parent_nodes);
|
||||
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Reference in a new issue