diff options
author | Andrew Thoelke <andrew.thoelke@arm.com> | 2014-05-14 17:09:32 +0100 |
---|---|---|
committer | Andrew Thoelke <andrew.thoelke@arm.com> | 2014-06-11 12:10:16 +0100 |
commit | 08ab89d324e8d784f0d35b639b7c27b4ff3e5959 (patch) | |
tree | 72e3f55c277d2db0963ac8d27508d1e937d13dd0 /services/std_svc/psci/psci_common.c | |
parent | 977fbcd4e0842e590a961d6f40c14653caa9301a (diff) |
Provide cm_get/set_context() for current CPU
All callers of cm_get_context() pass the calling CPU MPIDR to the
function. Providing a specialised version for the current
CPU results in a reduction in code size and better readability.
The current function has been renamed to cm_get_context_by_mpidr()
and the existing name is now used for the current-CPU version.
The same treatment has been done to cm_set_context(), although
only both forms are used at present in the PSCI and TSPD code.
Change-Id: I91cb0c2f7bfcb950a045dbd9ff7595751c0c0ffb
Diffstat (limited to 'services/std_svc/psci/psci_common.c')
-rw-r--r-- | services/std_svc/psci/psci_common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index b1ee10da..3cbacd7a 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -219,7 +219,6 @@ int psci_validate_mpidr(unsigned long mpidr, int level) void psci_get_ns_entry_info(unsigned int index) { unsigned long sctlr = 0, scr, el_status, id_aa64pfr0; - uint64_t mpidr = read_mpidr(); cpu_context_t *ns_entry_context; gp_regs_t *ns_entry_gpregs; @@ -253,7 +252,7 @@ void psci_get_ns_entry_info(unsigned int index) write_sctlr_el1(sctlr); /* Fulfill the cpu_on entry reqs. as per the psci spec */ - ns_entry_context = (cpu_context_t *) cm_get_context(mpidr, NON_SECURE); + ns_entry_context = (cpu_context_t *) cm_get_context(NON_SECURE); assert(ns_entry_context); /* |