diff options
author | Soby Mathew <soby.mathew@arm.com> | 2014-09-26 15:08:52 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2015-01-23 15:14:36 +0000 |
commit | e146f4cc6c93ab5efe93f73c0dd53bce8c99555f (patch) | |
tree | b7b05b5320052f0b05440950eb22e0bd38052ad5 /services/std_svc | |
parent | eadd7a1b1e1dc270bed8df3197ea6fe9f1286849 (diff) |
Remove `ns_entrypoint` and `mpidr` from parameters in pm_ops
This patch removes the non-secure entry point information being passed
to the platform pm_ops which is not needed. Also, it removes the `mpidr`
parameter for platform pm hooks which are meant to do power management
operations only on the current cpu.
NOTE: PLATFORM PORTS MUST BE UPDATED AFTER MERGING THIS COMMIT.
Change-Id: If632376a990b7f3b355f910e78771884bf6b12e7
Diffstat (limited to 'services/std_svc')
-rw-r--r-- | services/std_svc/psci/psci_afflvl_off.c | 11 | ||||
-rw-r--r-- | services/std_svc/psci/psci_afflvl_on.c | 22 | ||||
-rw-r--r-- | services/std_svc/psci/psci_afflvl_suspend.c | 29 |
3 files changed, 22 insertions, 40 deletions
diff --git a/services/std_svc/psci/psci_afflvl_off.c b/services/std_svc/psci/psci_afflvl_off.c index 7e057896..6a683cd6 100644 --- a/services/std_svc/psci/psci_afflvl_off.c +++ b/services/std_svc/psci/psci_afflvl_off.c @@ -34,7 +34,7 @@ #include <string.h> #include "psci_private.h" -typedef int (*afflvl_off_handler_t)(aff_map_node_t *); +typedef int (*afflvl_off_handler_t)(aff_map_node_t *node); /******************************************************************************* * The next three functions implement a handler for each supported affinity @@ -75,8 +75,7 @@ static int psci_afflvl0_off(aff_map_node_t *cpu_node) * Plat. management: Perform platform specific actions to turn this * cpu off e.g. exit cpu coherency, program the power controller etc. */ - return psci_plat_pm_ops->affinst_off(read_mpidr_el1(), - cpu_node->level, + return psci_plat_pm_ops->affinst_off(cpu_node->level, psci_get_phys_state(cpu_node)); } @@ -99,8 +98,7 @@ static int psci_afflvl1_off(aff_map_node_t *cluster_node) * specific bookeeping e.g. turn off interconnect coherency, * program the power controller etc. */ - return psci_plat_pm_ops->affinst_off(read_mpidr_el1(), - cluster_node->level, + return psci_plat_pm_ops->affinst_off(cluster_node->level, psci_get_phys_state(cluster_node)); } @@ -127,8 +125,7 @@ static int psci_afflvl2_off(aff_map_node_t *system_node) * Plat. Management : Allow the platform to do its bookeeping * at this affinity level */ - return psci_plat_pm_ops->affinst_off(read_mpidr_el1(), - system_node->level, + return psci_plat_pm_ops->affinst_off(system_node->level, psci_get_phys_state(system_node)); } diff --git a/services/std_svc/psci/psci_afflvl_on.c b/services/std_svc/psci/psci_afflvl_on.c index f1d30c9c..d6e35f73 100644 --- a/services/std_svc/psci/psci_afflvl_on.c +++ b/services/std_svc/psci/psci_afflvl_on.c @@ -39,10 +39,10 @@ #include <stddef.h> #include "psci_private.h" -typedef int (*afflvl_on_handler_t)(unsigned long, - aff_map_node_t *, - unsigned long, - unsigned long); +typedef int (*afflvl_on_handler_t)(unsigned long target_cpu, + aff_map_node_t *node, + unsigned long ns_entrypoint, + unsigned long context_id); /******************************************************************************* * This function checks whether a cpu which has been requested to be turned on @@ -122,7 +122,6 @@ static int psci_afflvl0_on(unsigned long target_cpu, */ return psci_plat_pm_ops->affinst_on(target_cpu, psci_entrypoint, - ns_entrypoint, cpu_node->level, psci_get_phys_state(cpu_node)); } @@ -159,7 +158,6 @@ static int psci_afflvl1_on(unsigned long target_cpu, psci_entrypoint = (unsigned long) psci_aff_on_finish_entry; return psci_plat_pm_ops->affinst_on(target_cpu, psci_entrypoint, - ns_entrypoint, cluster_node->level, psci_get_phys_state(cluster_node)); } @@ -197,7 +195,6 @@ static int psci_afflvl2_on(unsigned long target_cpu, psci_entrypoint = (unsigned long) psci_aff_on_finish_entry; return psci_plat_pm_ops->affinst_on(target_cpu, psci_entrypoint, - ns_entrypoint, system_node->level, psci_get_phys_state(system_node)); } @@ -258,7 +255,7 @@ static int psci_call_on_handlers(aff_map_node_t *target_cpu_nodes[], * * The affinity level specific handlers are called in descending order i.e. from * the highest to the lowest affinity level implemented by the platform because - * to turn on affinity level X it is neccesary to turn on affinity level X + 1 + * to turn on affinity level X it is necessary to turn on affinity level X + 1 * first. ******************************************************************************/ int psci_afflvl_on(unsigned long target_cpu, @@ -347,8 +344,7 @@ static unsigned int psci_afflvl0_on_finish(aff_map_node_t *cpu_node) /* Get the physical state of this cpu */ plat_state = get_phys_state(state); - rc = psci_plat_pm_ops->affinst_on_finish(read_mpidr_el1(), - cpu_node->level, + rc = psci_plat_pm_ops->affinst_on_finish(cpu_node->level, plat_state); assert(rc == PSCI_E_SUCCESS); } @@ -405,8 +401,7 @@ static unsigned int psci_afflvl1_on_finish(aff_map_node_t *cluster_node) * situation. */ plat_state = psci_get_phys_state(cluster_node); - return psci_plat_pm_ops->affinst_on_finish(read_mpidr_el1(), - cluster_node->level, + return psci_plat_pm_ops->affinst_on_finish(cluster_node->level, plat_state); } @@ -435,8 +430,7 @@ static unsigned int psci_afflvl2_on_finish(aff_map_node_t *system_node) * situation. */ plat_state = psci_get_phys_state(system_node); - return psci_plat_pm_ops->affinst_on_finish(read_mpidr_el1(), - system_node->level, + return psci_plat_pm_ops->affinst_on_finish(system_node->level, plat_state); } diff --git a/services/std_svc/psci/psci_afflvl_suspend.c b/services/std_svc/psci/psci_afflvl_suspend.c index 4fcabfc2..d30bf399 100644 --- a/services/std_svc/psci/psci_afflvl_suspend.c +++ b/services/std_svc/psci/psci_afflvl_suspend.c @@ -40,10 +40,10 @@ #include <stddef.h> #include "psci_private.h" -typedef int (*afflvl_suspend_handler_t)(aff_map_node_t *, - unsigned long, - unsigned long, - unsigned int); +typedef int (*afflvl_suspend_handler_t)(aff_map_node_t *node, + unsigned long ns_entrypoint, + unsigned long context_id, + unsigned int power_state); /******************************************************************************* * This function saves the power state parameter passed in the current PSCI @@ -161,9 +161,7 @@ static int psci_afflvl0_suspend(aff_map_node_t *cpu_node, * platform defined mailbox with the psci entrypoint, * program the power controller etc. */ - return psci_plat_pm_ops->affinst_suspend(read_mpidr_el1(), - psci_entrypoint, - ns_entrypoint, + return psci_plat_pm_ops->affinst_suspend(psci_entrypoint, cpu_node->level, psci_get_phys_state(cpu_node)); } @@ -198,9 +196,7 @@ static int psci_afflvl1_suspend(aff_map_node_t *cluster_node, */ plat_state = psci_get_phys_state(cluster_node); psci_entrypoint = (unsigned long) psci_aff_suspend_finish_entry; - return psci_plat_pm_ops->affinst_suspend(read_mpidr_el1(), - psci_entrypoint, - ns_entrypoint, + return psci_plat_pm_ops->affinst_suspend(psci_entrypoint, cluster_node->level, plat_state); } @@ -244,9 +240,7 @@ static int psci_afflvl2_suspend(aff_map_node_t *system_node, */ plat_state = psci_get_phys_state(system_node); psci_entrypoint = (unsigned long) psci_aff_suspend_finish_entry; - return psci_plat_pm_ops->affinst_suspend(read_mpidr_el1(), - psci_entrypoint, - ns_entrypoint, + return psci_plat_pm_ops->affinst_suspend(psci_entrypoint, system_node->level, plat_state); } @@ -415,8 +409,7 @@ static unsigned int psci_afflvl0_suspend_finish(aff_map_node_t *cpu_node) /* Get the physical state of this cpu */ plat_state = get_phys_state(state); - rc = psci_plat_pm_ops->affinst_suspend_finish(read_mpidr_el1(), - cpu_node->level, + rc = psci_plat_pm_ops->affinst_suspend_finish(cpu_node->level, plat_state); assert(rc == PSCI_E_SUCCESS); } @@ -479,8 +472,7 @@ static unsigned int psci_afflvl1_suspend_finish(aff_map_node_t *cluster_node) /* Get the physical state of this cpu */ plat_state = psci_get_phys_state(cluster_node); - rc = psci_plat_pm_ops->affinst_suspend_finish(read_mpidr_el1(), - cluster_node->level, + rc = psci_plat_pm_ops->affinst_suspend_finish(cluster_node->level, plat_state); assert(rc == PSCI_E_SUCCESS); } @@ -513,8 +505,7 @@ static unsigned int psci_afflvl2_suspend_finish(aff_map_node_t *system_node) /* Get the physical state of the system */ plat_state = psci_get_phys_state(system_node); - rc = psci_plat_pm_ops->affinst_suspend_finish(read_mpidr_el1(), - system_node->level, + rc = psci_plat_pm_ops->affinst_suspend_finish(system_node->level, plat_state); assert(rc == PSCI_E_SUCCESS); } |