lpm-levels: Do not disable non-sec interrupts in suspend
When the system suspend is happening, last core disables
the non-sec interrupts at QGIC by setting the GRPEN1_EL1_NS
to ZERO. This makes core not seen any non-sec interrupts
and would result into system do not wake up from any of
interrupts. Do not touch GRPEN1_EL1_NS register while
system is going into suspend.
Change-Id: I7d6c5047fb4743df187fe49fba18b64db3179bc9
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
diff --git a/drivers/irqchip/irq-gic-common.h b/drivers/irqchip/irq-gic-common.h
index 205e5fd..83b72f4 100644
--- a/drivers/irqchip/irq-gic-common.h
+++ b/drivers/irqchip/irq-gic-common.h
@@ -27,6 +27,8 @@
u32 iidr;
u32 mask;
};
+extern bool from_suspend;
+extern struct irq_chip gic_arch_extn;
int gic_configure_irq(unsigned int irq, unsigned int type,
void __iomem *base, void (*sync_access)(void));
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 300347e..c9281fb 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -689,6 +689,9 @@
static int gic_cpu_pm_notifier(struct notifier_block *self,
unsigned long cmd, void *v)
{
+ if (from_suspend)
+ return NOTIFY_OK;
+
if (cmd == CPU_PM_EXIT) {
if (gic_dist_security_disabled())
gic_enable_redist(true);