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>
diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c
index aaf82a0..baa3bd4 100644
--- a/lib/psci/psci_suspend.c
+++ b/lib/psci/psci_suspend.c
@@ -121,7 +121,6 @@
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 @@
* detection that a wake-up interrupt has fired.
*/
if (read_isr_el1() != 0U) {
- skip_wfi = true;
goto exit;
}
@@ -164,7 +162,6 @@
*/
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 @@
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 @@
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 @@
*/
psci_set_pwr_domains_to_run(idx, end_pwrlvl);
+exit:
psci_release_pwr_domain_locks(end_pwrlvl, parent_nodes);
return rc;