summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2016-08-04 16:14:50 +0100
committerSudeep Holla <sudeep.holla@arm.com>2016-08-11 11:09:35 +0100
commit65d68ca64d12a4ce5b05a96808dd6f638451940d (patch)
tree5db07956e53f059f5fa68758aaa6ea1e9fb1636e /drivers
parentee3e93592547e78fc4ec5b88d93447e05e3b80c5 (diff)
gicv3: disable Group1 NonSecure interrupts during core powerdown
As per the GICv3 specification, to power down a processor using GICv3 and allow automatic power-on if an interrupt must be sent to a processor, software must set Enable to zero for all interrupt groups(by writing to GICC_CTLR or ICC_IGRPEN{0,1}_EL1/3 as appropriate. Also, NonSecure EL1 software may not be aware of the CPU power state details and fail to choose right states that require quiescing the CPU interface. So it's preferred that the PSCI implementation handles it as it is fully aware of the CPU power states. This patch adds disabling of Group1 NonSecure interrupts during processor power down along with Group0 and Group1 Secure interrupts so that all the interrupt groups are handled at once as per specification. Change-Id: Ib564d773c9c4c41f2ca9471451c030e3de75e641
Diffstat (limited to 'drivers')
-rw-r--r--drivers/arm/gic/v3/gicv3_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/arm/gic/v3/gicv3_main.c b/drivers/arm/gic/v3/gicv3_main.c
index 6c6c7af9..e0170338 100644
--- a/drivers/arm/gic/v3/gicv3_main.c
+++ b/drivers/arm/gic/v3/gicv3_main.c
@@ -280,9 +280,10 @@ void gicv3_cpuif_disable(unsigned int proc_num)
write_icc_igrpen0_el1(read_icc_igrpen0_el1() &
~IGRPEN1_EL1_ENABLE_G0_BIT);
- /* Disable Group1 Secure interrupts */
+ /* Disable Group1 Secure and Non-Secure interrupts */
write_icc_igrpen1_el3(read_icc_igrpen1_el3() &
- ~IGRPEN1_EL3_ENABLE_G1S_BIT);
+ ~(IGRPEN1_EL3_ENABLE_G1NS_BIT |
+ IGRPEN1_EL3_ENABLE_G1S_BIT));
/* Synchronise accesses to group enable registers */
isb();