From d4c7b55050df147dce8c243e6bc8a3e9645c027b Mon Sep 17 00:00:00 2001 From: Ravi Patel Date: Fri, 21 Jun 2019 05:00:49 -0700 Subject: [PATCH] xilinx: versal: Skip store/restore of GIC during CPU idle GIC registers needs to be stored/restored during system suspend/resume only and not during CPU idle. During CPU idle, minimum 1 CPU is in ON state. Signed-off-by: Ravi Patel Signed-off-by: Rajan Vaja Change-Id: I5de2ce3a61bf4260f9385349202b0f592a47aaba --- plat/xilinx/versal/plat_psci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plat/xilinx/versal/plat_psci.c b/plat/xilinx/versal/plat_psci.c index 39550858a..fda42dfda 100644 --- a/plat/xilinx/versal/plat_psci.c +++ b/plat/xilinx/versal/plat_psci.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -59,7 +59,9 @@ static void versal_pwr_domain_suspend(const psci_power_state_t *target_state) plat_versal_gic_cpuif_disable(); - plat_versal_gic_save(); + if (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) { + plat_versal_gic_save(); + } state = target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE ? PM_STATE_SUSPEND_TO_RAM : PM_STATE_CPU_IDLE; @@ -99,11 +101,9 @@ static void versal_pwr_domain_suspend_finish( /* APU was turned off, so restore GIC context */ if (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) { plat_versal_gic_resume(); - plat_versal_gic_cpuif_enable(); - } else { - plat_versal_gic_cpuif_enable(); - plat_versal_gic_pcpu_init(); } + + plat_versal_gic_cpuif_enable(); } void versal_pwr_domain_on_finish(const psci_power_state_t *target_state) -- 2.39.5