summaryrefslogtreecommitdiff
path: root/lib/psci
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2018-07-26 14:00:32 -0500
committerAndrew F. Davis <afd@ti.com>2018-07-26 14:14:06 -0500
commit39a8fa70f0d9a1d7093020fcd00e565e99a2306f (patch)
tree03dcaa1e2dc937671f37d407428beb50ae193f94 /lib/psci
parent60e062fb0e33f7d9825267cbfb397d7c7aca1169 (diff)
PSCI: Fix logic error to skip cache flushing
If either USE_COHERENT_MEM or HW_ASSISTED_COHERENCY being true should cause us to not enter the ifdef block, then the logic is not correct here. Posibly bad use of De Morgan's law? Fix this. Signed-off-by: Andrew F. Davis <afd@ti.com>
Diffstat (limited to 'lib/psci')
-rw-r--r--lib/psci/psci_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
index 59c9c686..ec74a8cd 100644
--- a/lib/psci/psci_common.c
+++ b/lib/psci/psci_common.c
@@ -267,7 +267,7 @@ static plat_local_state_t *psci_get_req_local_pwr_states(unsigned int pwrlvl,
static plat_local_state_t get_non_cpu_pd_node_local_state(
unsigned int parent_idx)
{
-#if !USE_COHERENT_MEM || !HW_ASSISTED_COHERENCY
+#if !(USE_COHERENT_MEM || HW_ASSISTED_COHERENCY)
flush_dcache_range(
(uintptr_t) &psci_non_cpu_pd_nodes[parent_idx],
sizeof(psci_non_cpu_pd_nodes[parent_idx]));
@@ -283,7 +283,7 @@ static void set_non_cpu_pd_node_local_state(unsigned int parent_idx,
plat_local_state_t state)
{
psci_non_cpu_pd_nodes[parent_idx].local_state = state;
-#if !USE_COHERENT_MEM || !HW_ASSISTED_COHERENCY
+#if !(USE_COHERENT_MEM || HW_ASSISTED_COHERENCY)
flush_dcache_range(
(uintptr_t) &psci_non_cpu_pd_nodes[parent_idx],
sizeof(psci_non_cpu_pd_nodes[parent_idx]));