summaryrefslogtreecommitdiff
path: root/lib/psci/psci_private.h
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2019-06-04 10:46:54 -0400
committerAndrew F. Davis <afd@ti.com>2019-06-06 11:31:47 -0400
commit74d27d006279753f2036b6d3ccfdc6c4357c96d8 (patch)
tree2378d87a318f427aadf288764a79ab0aa7291415 /lib/psci/psci_private.h
parent0f95565c40d54188dd072fe2b429046dbbd9a6a3 (diff)
PSCI: Lookup list of parent nodes to lock only once
When acquiring or releasing the power domain locks for a given CPU the parent nodes are looked up by walking the up the PD tree list on both the acquire and release path, only one set of lookups is needed. Fetch the parent nodes first and pass this list into both the acquire and release functions to avoid the double lookup. This also allows us to not have to do this lookup after coherency has been exited during the core power down sequence. The shared struct psci_cpu_pd_nodes is not placed in coherent memory like is done for psci_non_cpu_pd_nodes and doing so would negatively affect performance. With this patch we remove the need to have it in coherent memory by moving the access out of psci_release_pwr_domain_locks(). Signed-off-by: Andrew F. Davis <afd@ti.com> Change-Id: I7b9cfa9d31148dea0f5e21091c8b45ef7fe4c4ab
Diffstat (limited to 'lib/psci/psci_private.h')
-rw-r--r--lib/psci/psci_private.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/psci/psci_private.h b/lib/psci/psci_private.h
index 68ec7fb6..bbcc5cfe 100644
--- a/lib/psci/psci_private.h
+++ b/lib/psci/psci_private.h
@@ -274,8 +274,10 @@ void psci_get_parent_pwr_domain_nodes(int cpu_idx,
unsigned int *node_index);
void psci_do_state_coordination(unsigned int end_pwrlvl,
psci_power_state_t *state_info);
-void psci_acquire_pwr_domain_locks(unsigned int end_pwrlvl, int cpu_idx);
-void psci_release_pwr_domain_locks(unsigned int end_pwrlvl, int cpu_idx);
+void psci_acquire_pwr_domain_locks(unsigned int end_pwrlvl,
+ const unsigned int *parent_nodes);
+void psci_release_pwr_domain_locks(unsigned int end_pwrlvl,
+ const unsigned int *parent_nodes);
int psci_validate_suspend_req(const psci_power_state_t *state_info,
unsigned int is_power_down_state);
unsigned int psci_find_max_off_lvl(const psci_power_state_t *state_info);