Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8834c35b authored by Murali Nalajala's avatar Murali Nalajala Committed by Maulik Shah
Browse files

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 prevents
the core from detecting  any non-sec interrupts and that would result
in the system not waking up from any of interrupts. Do not modify
GRPEN1_EL1_NS register when the system is going into suspend.

Change-Id: I7d6c5047fb4743df187fe49fba18b64db3179bc9
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent 364475ab
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ struct gic_quirk {
	u32 iidr;
	u32 iidr;
	u32 mask;
	u32 mask;
};
};
extern bool from_suspend;


#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ
#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ
extern int msm_show_resume_irq_mask;
extern int msm_show_resume_irq_mask;
+3 −0
Original line number Original line Diff line number Diff line
@@ -894,6 +894,9 @@ static bool gic_dist_security_disabled(void)
static int gic_cpu_pm_notifier(struct notifier_block *self,
static int gic_cpu_pm_notifier(struct notifier_block *self,
			       unsigned long cmd, void *v)
			       unsigned long cmd, void *v)
{
{
	if (from_suspend)
		return NOTIFY_OK;

	if (cmd == CPU_PM_EXIT) {
	if (cmd == CPU_PM_EXIT) {
		if (gic_dist_security_disabled())
		if (gic_dist_security_disabled())
			gic_enable_redist(true);
			gic_enable_redist(true);
+4 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,8 @@
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/syscore_ops.h>
#include <linux/syscore_ops.h>


bool from_suspend;

static ATOMIC_NOTIFIER_HEAD(cpu_pm_notifier_chain);
static ATOMIC_NOTIFIER_HEAD(cpu_pm_notifier_chain);


static int cpu_pm_notify(enum cpu_pm_event event, int nr_to_call, int *nr_calls)
static int cpu_pm_notify(enum cpu_pm_event event, int nr_to_call, int *nr_calls)
@@ -181,6 +183,7 @@ static int cpu_pm_suspend(void)
{
{
	int ret;
	int ret;


	from_suspend = true;
	ret = cpu_pm_enter();
	ret = cpu_pm_enter();
	if (ret)
	if (ret)
		return ret;
		return ret;
@@ -191,6 +194,7 @@ static int cpu_pm_suspend(void)


static void cpu_pm_resume(void)
static void cpu_pm_resume(void)
{
{
	from_suspend = false;
	cpu_cluster_pm_exit();
	cpu_cluster_pm_exit();
	cpu_pm_exit();
	cpu_pm_exit();
}
}