From 8c32bc26e7bc58f028c1b31dd226610d3d388237 Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Thu, 12 Feb 2015 14:45:02 +0000 Subject: Export maximum affinity using PLATFORM_MAX_AFFLVL macro This patch removes the plat_get_max_afflvl() platform API and instead replaces it with a platform macro PLATFORM_MAX_AFFLVL. This is done because the maximum affinity level for a platform is a static value and it is more efficient for it to be defined as a platform macro. NOTE: PLATFORM PORTS NEED TO BE UPDATED ON MERGE OF THIS COMMIT Fixes ARM-Software/tf-issues#265 Change-Id: I31d89b30c2ccda30d28271154d869060d50df7bf --- services/std_svc/psci/psci_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'services/std_svc/psci/psci_main.c') diff --git a/services/std_svc/psci/psci_main.c b/services/std_svc/psci/psci_main.c index d8a00097..fcd3b552 100644 --- a/services/std_svc/psci/psci_main.c +++ b/services/std_svc/psci/psci_main.c @@ -78,7 +78,7 @@ int psci_cpu_on(unsigned long target_cpu, * levels need to be turned on */ start_afflvl = MPIDR_AFFLVL0; - end_afflvl = get_max_afflvl(); + end_afflvl = PLATFORM_MAX_AFFLVL; rc = psci_afflvl_on(target_cpu, &ep, start_afflvl, @@ -106,7 +106,7 @@ int psci_cpu_suspend(unsigned int power_state, /* Sanity check the requested state */ target_afflvl = psci_get_pstate_afflvl(power_state); - if (target_afflvl > get_max_afflvl()) + if (target_afflvl > PLATFORM_MAX_AFFLVL) return PSCI_E_INVALID_PARAMS; /* Validate the power_state using platform pm_ops */ @@ -170,7 +170,7 @@ int psci_cpu_suspend(unsigned int power_state, int psci_cpu_off(void) { int rc; - int target_afflvl = get_max_afflvl(); + int target_afflvl = PLATFORM_MAX_AFFLVL; /* * Traverse from the highest to the lowest affinity level. When the @@ -196,7 +196,7 @@ int psci_affinity_info(unsigned long target_affinity, unsigned int aff_state; aff_map_node_t *node; - if (lowest_affinity_level > get_max_afflvl()) + if (lowest_affinity_level > PLATFORM_MAX_AFFLVL) return rc; node = psci_get_aff_map_node(target_affinity, lowest_affinity_level); -- cgit