From a4a8eaeb36f7a023b057f49e0f43f1d0134fd7f0 Mon Sep 17 00:00:00 2001 From: Achin Gupta Date: Mon, 28 Jul 2014 00:15:23 +0100 Subject: Miscellaneous PSCI code cleanups This patch implements the following cleanups in PSCI generic code: 1. It reworks the affinity level specific handlers in the PSCI implementation such that. a. Usage of the 'rc' local variable is restricted to only where it is absolutely needed b. 'plat_state' local variable is defined only when a direct invocation of plat_get_phys_state() does not suffice. c. If a platform handler is not registered then the level specific handler returns early. 2. It limits the use of the mpidr_aff_map_nodes_t typedef to declaration of arrays of the type instead of using it in function prototypes as well. 3. It removes dangling declarations of __psci_cpu_off() and __psci_cpu_suspend(). The definitions of these functions were removed in earlier patches. Change-Id: I51e851967c148be9c2eeda3a3c41878f7b4d6978 --- services/std_svc/psci/psci_common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'services/std_svc/psci/psci_common.c') diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index e9d6e5b6..2267ad08 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -65,7 +65,7 @@ const plat_pm_ops_t *psci_plat_pm_ops; ******************************************************************************/ uint32_t psci_find_max_phys_off_afflvl(uint32_t start_afflvl, uint32_t end_afflvl, - mpidr_aff_map_nodes_t mpidr_nodes) + aff_map_node_t *mpidr_nodes[]) { uint32_t max_afflvl = PSCI_INVALID_DATA; @@ -220,7 +220,7 @@ int psci_check_afflvl_range(int start_afflvl, int end_afflvl) ******************************************************************************/ void psci_do_afflvl_state_mgmt(uint32_t start_afflvl, uint32_t end_afflvl, - mpidr_aff_map_nodes_t mpidr_nodes, + aff_map_node_t *mpidr_nodes[], uint32_t state) { uint32_t level; @@ -239,7 +239,7 @@ void psci_do_afflvl_state_mgmt(uint32_t start_afflvl, ******************************************************************************/ void psci_acquire_afflvl_locks(int start_afflvl, int end_afflvl, - mpidr_aff_map_nodes_t mpidr_nodes) + aff_map_node_t *mpidr_nodes[]) { int level; @@ -257,7 +257,7 @@ void psci_acquire_afflvl_locks(int start_afflvl, ******************************************************************************/ void psci_release_afflvl_locks(int start_afflvl, int end_afflvl, - mpidr_aff_map_nodes_t mpidr_nodes) + aff_map_node_t *mpidr_nodes[]) { int level; @@ -429,7 +429,7 @@ unsigned short psci_get_phys_state(aff_map_node_t *node) * topology tree and calls the physical power on handler for the corresponding * affinity levels ******************************************************************************/ -static int psci_call_power_on_handlers(mpidr_aff_map_nodes_t mpidr_nodes, +static int psci_call_power_on_handlers(aff_map_node_t *mpidr_nodes[], int start_afflvl, int end_afflvl, afflvl_power_on_finisher_t *pon_handlers) -- cgit