refactor(psci): extract cm_prepare_el3_exit_ns() to a common location

PSCI on and suspend wakeup both end with a cm_prepare_el3_exit_ns() call.
Since they are equivalent to the caller, move the call to just after the
*_finish calls to deduplicate it.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I05c16dc6613aba357d20cc39cc43aab803d675e0
This commit is contained in:
Boyan Karatotev 2023-05-17 12:20:09 +01:00 committed by Jayanth Dodderi Chidanand
parent ece8f7d734
commit e07e7392a1
3 changed files with 8 additions and 15 deletions

View file

@ -225,11 +225,4 @@ void psci_cpu_on_finish(unsigned int cpu_idx, const psci_power_state_t *state_in
/* Populate the mpidr field within the cpu node array */
/* This needs to be done only once */
psci_cpu_pd_nodes[cpu_idx].mpidr = read_mpidr() & MPIDR_AFFINITY_MASK;
/*
* Generic management: Now we just need to retrieve the
* information that we had stashed away during the cpu_on
* call to set this cpu on its way.
*/
cm_prepare_el3_exit_ns();
}