summaryrefslogtreecommitdiff
path: root/services/std_svc/psci/psci_main.c
diff options
context:
space:
mode:
authorAndrew Thoelke <andrew.thoelke@arm.com>2014-06-09 12:44:21 +0100
committerAndrew Thoelke <andrew.thoelke@arm.com>2014-06-25 16:08:35 +0100
commit56378aa6eeef7771507834af7550e7139bae9714 (patch)
treebff6a201120f230f5b553e5e2954923e6115b3e0 /services/std_svc/psci/psci_main.c
parente73af8ac6849607281d5880d4c05798fe00b5d24 (diff)
Remove current CPU mpidr from PSCI common code
Many of the interfaces internal to PSCI pass the current CPU MPIDR_EL1 value from function to function. This is not required, and with inline access to the system registers is less efficient than requiring the code to read that register whenever required. This patch remove the mpidr parameter from the affected interfaces and reduces code in FVP BL3-1 size by 160 bytes. Change-Id: I16120a7c6944de37232016d7e109976540775602
Diffstat (limited to 'services/std_svc/psci/psci_main.c')
-rw-r--r--services/std_svc/psci/psci_main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/services/std_svc/psci/psci_main.c b/services/std_svc/psci/psci_main.c
index 2d7b0180..d68f3d0f 100644
--- a/services/std_svc/psci/psci_main.c
+++ b/services/std_svc/psci/psci_main.c
@@ -78,7 +78,6 @@ int psci_cpu_suspend(unsigned int power_state,
unsigned long context_id)
{
int rc;
- unsigned long mpidr;
unsigned int target_afflvl, pstate_type;
/* Check SBZ bits in power state are zero */
@@ -111,9 +110,7 @@ int psci_cpu_suspend(unsigned int power_state,
* enter the final wfi which will power down this cpu else return
* an error.
*/
- mpidr = read_mpidr();
- rc = psci_afflvl_suspend(mpidr,
- entrypoint,
+ rc = psci_afflvl_suspend(entrypoint,
context_id,
power_state,
MPIDR_AFFLVL0,
@@ -127,18 +124,15 @@ int psci_cpu_suspend(unsigned int power_state,
int psci_cpu_off(void)
{
int rc;
- unsigned long mpidr;
int target_afflvl = get_max_afflvl();
- mpidr = read_mpidr();
-
/*
* Traverse from the highest to the lowest affinity level. When the
* lowest affinity level is hit, all the locks are acquired. State
* management is done immediately followed by cpu, cluster ...
* ..target_afflvl specific actions as this function unwinds back.
*/
- rc = psci_afflvl_off(mpidr, MPIDR_AFFLVL0, target_afflvl);
+ rc = psci_afflvl_off(MPIDR_AFFLVL0, target_afflvl);
/*
* Check if all actions needed to safely power down this cpu have