OSDN Git Service

lpm-levels: Do not disable non-sec interrupts in suspend
authorMurali Nalajala <mnalajal@codeaurora.org>
Tue, 19 May 2015 17:26:11 +0000 (10:26 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:07:22 +0000 (11:07 -0700)
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>
Conflicts:
drivers/irqchip/irq-gic-common.h

drivers/irqchip/irq-gic-common.h
drivers/irqchip/irq-gic-v3.c
kernel/cpu_pm.c

index fff697d..a6fceec 100644 (file)
@@ -26,6 +26,8 @@ struct gic_quirk {
        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));
index d7be6dd..0ebd9b0 100644 (file)
@@ -645,6 +645,9 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 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) {
                gic_enable_redist(true);
                gic_cpu_sys_reg_init();
index 6c3523f..774bfe7 100644 (file)
@@ -22,6 +22,8 @@
 #include <linux/spinlock.h>
 #include <linux/syscore_ops.h>
 
+bool from_suspend = false;
+
 static DEFINE_RWLOCK(cpu_pm_notifier_lock);
 static RAW_NOTIFIER_HEAD(cpu_pm_notifier_chain);
 
@@ -208,6 +210,7 @@ static int cpu_pm_suspend(void)
 {
        int ret;
 
+       from_suspend = true;
        ret = cpu_pm_enter();
        if (ret)
                return ret;
@@ -218,6 +221,7 @@ static int cpu_pm_suspend(void)
 
 static void cpu_pm_resume(void)
 {
+       from_suspend = false;
        cpu_cluster_pm_exit(0);
        cpu_pm_exit();
 }