mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-26 23:04:50 +00:00
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:
parent
ece8f7d734
commit
e07e7392a1
3 changed files with 8 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -1036,6 +1036,13 @@ void psci_warmboot_entrypoint(void)
|
||||||
else
|
else
|
||||||
psci_cpu_suspend_finish(cpu_idx, &state_info);
|
psci_cpu_suspend_finish(cpu_idx, &state_info);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the requested and target state of this CPU and all the higher
|
* Set the requested and target state of this CPU and all the higher
|
||||||
* power domains which are ancestors of this CPU to run.
|
* power domains which are ancestors of this CPU to run.
|
||||||
|
|
|
@ -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 */
|
/* Populate the mpidr field within the cpu node array */
|
||||||
/* This needs to be done only once */
|
/* This needs to be done only once */
|
||||||
psci_cpu_pd_nodes[cpu_idx].mpidr = read_mpidr() & MPIDR_AFFINITY_MASK;
|
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();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,11 +367,4 @@ void psci_cpu_suspend_finish(unsigned int cpu_idx, const psci_power_state_t *sta
|
||||||
psci_set_suspend_pwrlvl(PSCI_INVALID_PWR_LVL);
|
psci_set_suspend_pwrlvl(PSCI_INVALID_PWR_LVL);
|
||||||
|
|
||||||
PUBLISH_EVENT(psci_suspend_pwrdown_finish);
|
PUBLISH_EVENT(psci_suspend_pwrdown_finish);
|
||||||
|
|
||||||
/*
|
|
||||||
* Generic management: Now we just need to retrieve the
|
|
||||||
* information that we had stashed away during the suspend
|
|
||||||
* call to set this cpu on its way.
|
|
||||||
*/
|
|
||||||
cm_prepare_el3_exit_ns();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue