[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1553692845-20983-7-git-send-email-abel.vesa@nxp.com>
Date: Wed, 27 Mar 2019 13:21:16 +0000
From: Abel Vesa <abel.vesa@....com>
To: Sudeep Holla <sudeep.holla@....com>,
Marc Zyngier <marc.zyngier@....com>,
Rob Herring <robh@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
"catalin.marinas@....com" <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Fabio Estevam <fabio.estevam@....com>,
Lucas Stach <l.stach@...gutronix.de>,
Aisheng Dong <aisheng.dong@....com>
CC: dl-linux-imx <linux-imx@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Abel Vesa <abel.vesa@....com>
Subject: [RFC 6/7] cpuidle-arm: Add arm64 wake helper for cpu_poke op
When the arm_poke_idle_state gets called, the poking
cpu_ops of the current core gets called, passing on the
the index of the core to be poked.
Signed-off-by: Abel Vesa <abel.vesa@....com>
---
arch/arm64/include/asm/cpuidle.h | 6 ++++++
arch/arm64/kernel/cpuidle.c | 8 ++++++++
drivers/cpuidle/cpuidle-arm.c | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/cpuidle.h b/arch/arm64/include/asm/cpuidle.h
index 3c5ddb4..e637d4d 100644
--- a/arch/arm64/include/asm/cpuidle.h
+++ b/arch/arm64/include/asm/cpuidle.h
@@ -7,6 +7,7 @@
#ifdef CONFIG_CPU_IDLE
extern int arm_cpuidle_init(unsigned int cpu);
extern int arm_cpuidle_suspend(int index);
+extern int arm_cpuidle_wake(int index);
#else
static inline int arm_cpuidle_init(unsigned int cpu)
{
@@ -17,5 +18,10 @@ static inline int arm_cpuidle_suspend(int index)
{
return -EOPNOTSUPP;
}
+
+static inline int arm_cpuidle_wake(int index)
+{
+ return -EOPNOTSUPP;
+}
#endif
#endif
diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c
index f2d1381..af00955 100644
--- a/arch/arm64/kernel/cpuidle.c
+++ b/arch/arm64/kernel/cpuidle.c
@@ -43,6 +43,14 @@ int arm_cpuidle_suspend(int index)
return cpu_ops[cpu]->cpu_suspend(index);
}
+int arm_cpuidle_wake(int index)
+{
+ int cpu = smp_processor_id();
+
+ return cpu_ops[cpu]->cpu_poke(index);
+}
+
+
#ifdef CONFIG_ACPI
#include <acpi/processor.h>
diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c
index 76ee7ac..d5d3eef 100644
--- a/drivers/cpuidle/cpuidle-arm.c
+++ b/drivers/cpuidle/cpuidle-arm.c
@@ -48,7 +48,7 @@ static int arm_enter_idle_state(struct cpuidle_device *dev,
static int arm_poke_idle_state(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int cpu)
{
- return 0;
+ return arm_cpuidle_wake(cpu);
}
static struct cpuidle_driver arm_idle_driver __initdata = {
--
2.7.4
Powered by blists - more mailing lists