* [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode
@ 2013-05-27 14:32 Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi Sanjay Singh Rawat
` (7 more replies)
0 siblings, 8 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
With this patch set we make use of cpu_do_idle to enter WFI mode,
many platform are not clearing the data buffer before WFI or
directly using the address instead of opcode. For the rest its good
to have a common approach.
Sanjay Singh Rawat (8):
ARM: EXYNOS: use generic cpu idle function for wfi
ARM: RealView: use generic cpu idle function for wfi
ARM: SPEAr: use generic cpu idle function for wfi
ARM: vexpress: use generic cpu idle function for wfi
ARM: zynq: use generic cpu idle function for wfi
ARM: ux500: use generic cpu idle function for wfi
ARM: msm: use generic cpu idle function for wfi
ARM: PRIMA2: use generic cpu idle function for wfi
arch/arm/mach-exynos/hotplug.c | 9 ++-------
arch/arm/mach-msm/hotplug.c | 9 ++-------
arch/arm/mach-prima2/hotplug.c | 4 ++--
arch/arm/mach-realview/hotplug.c | 9 ++-------
arch/arm/mach-spear/hotplug.c | 3 ++-
arch/arm/mach-ux500/hotplug.c | 5 +++--
arch/arm/mach-vexpress/hotplug.c | 3 ++-
arch/arm/mach-zynq/hotplug.c | 4 ++--
8 files changed, 17 insertions(+), 29 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-06-04 15:25 ` Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 2/8] ARM: RealView: " Sanjay Singh Rawat
` (6 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the WFI mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-exynos/hotplug.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index af90cfa..7fcedd8 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -98,13 +98,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
if (cpu == 1)
__raw_writel(0, S5P_ARM_CORE1_CONFIGURATION);
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
- :
- :
- : "memory", "cc");
+ /* enter WFI mode */
+ cpu_do_idle();
if (pen_release == cpu_logical_map(cpu)) {
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/8] ARM: RealView: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-06-04 15:20 ` Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 3/8] ARM: SPEAr: " Sanjay Singh Rawat
` (5 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-realview/hotplug.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
index ac22dd4..c42022b 100644
--- a/arch/arm/mach-realview/hotplug.c
+++ b/arch/arm/mach-realview/hotplug.c
@@ -59,13 +59,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
- :
- :
- : "memory", "cc");
+ /* enter WFI mode */
+ cpu_do_idle();
if (pen_release == cpu_logical_map(cpu)) {
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/8] ARM: SPEAr: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 2/8] ARM: RealView: " Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-05-28 9:55 ` Viresh Kumar
2013-05-27 14:32 ` [PATCH 4/8] ARM: vexpress: " Sanjay Singh Rawat
` (4 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-spear/hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-spear/hotplug.c b/arch/arm/mach-spear/hotplug.c
index d97749c..6dbd3dc 100644
--- a/arch/arm/mach-spear/hotplug.c
+++ b/arch/arm/mach-spear/hotplug.c
@@ -55,7 +55,8 @@ static inline void cpu_leave_lowpower(void)
static inline void spear13xx_do_lowpower(unsigned int cpu, int *spurious)
{
for (;;) {
- wfi();
+ /* enter WFI mode */
+ cpu_do_idle();
if (pen_release == cpu) {
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
` (2 preceding siblings ...)
2013-05-27 14:32 ` [PATCH 3/8] ARM: SPEAr: " Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-06-04 15:23 ` Sanjay Singh Rawat
2013-06-07 15:11 ` Pawel Moll
2013-05-27 14:32 ` [PATCH 5/8] ARM: zynq: " Sanjay Singh Rawat
` (3 subsequent siblings)
7 siblings, 2 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-vexpress/hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index f0ce6b8..b3dffc2 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- wfi();
+ /* enter WFI mode */
+ cpu_do_idle();
if (pen_release == cpu_logical_map(cpu)) {
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 5/8] ARM: zynq: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
` (3 preceding siblings ...)
2013-05-27 14:32 ` [PATCH 4/8] ARM: vexpress: " Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-05-29 5:39 ` Michal Simek
2013-05-27 14:32 ` [PATCH 6/8] ARM: ux500: " Sanjay Singh Rawat
` (2 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-zynq/hotplug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c
index c89672b..ef0d65d 100644
--- a/arch/arm/mach-zynq/hotplug.c
+++ b/arch/arm/mach-zynq/hotplug.c
@@ -64,8 +64,8 @@ static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- dsb();
- wfi();
+ /* enter WFI mode */
+ cpu_do_idle();
/*
* Getting here, means that we have come out of WFI without
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 6/8] ARM: ux500: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
` (4 preceding siblings ...)
2013-05-27 14:32 ` [PATCH 5/8] ARM: zynq: " Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-05-30 7:26 ` Srinidhi Kasagar
2013-05-27 14:32 ` [PATCH 7/8] ARM: msm: " Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 8/8] ARM: PRIMA2: " Sanjay Singh Rawat
7 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-ux500/hotplug.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index 2bc00b0..f4ded92 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -25,8 +25,9 @@ void __ref ux500_cpu_die(unsigned int cpu)
{
/* directly enter low power state, skipping secure registers */
for (;;) {
- __asm__ __volatile__("dsb\n\t" "wfi\n\t"
- : : : "memory");
+ /* enter WFI mode */
+ cpu_do_idle();
+
if (pen_release == cpu_logical_map(cpu)) {
/*
* OK, proper wakeup, we're done
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 7/8] ARM: msm: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
` (5 preceding siblings ...)
2013-05-27 14:32 ` [PATCH 6/8] ARM: ux500: " Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-05-28 18:50 ` David Brown
2013-05-30 16:42 ` David Brown
2013-05-27 14:32 ` [PATCH 8/8] ARM: PRIMA2: " Sanjay Singh Rawat
7 siblings, 2 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-msm/hotplug.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index 326a872..1b03e5f 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -26,13 +26,8 @@ static inline void platform_do_lowpower(unsigned int cpu)
{
/* Just enter wfi for now. TODO: Properly shut off the cpu. */
for (;;) {
- /*
- * here's the WFI
- */
- asm("wfi"
- :
- :
- : "memory", "cc");
+ /* enter WFI mode */
+ cpu_do_idle();
if (pen_release == cpu_logical_map(cpu)) {
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 8/8] ARM: PRIMA2: use generic cpu idle function for wfi
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
` (6 preceding siblings ...)
2013-05-27 14:32 ` [PATCH 7/8] ARM: msm: " Sanjay Singh Rawat
@ 2013-05-27 14:32 ` Sanjay Singh Rawat
2013-06-04 15:28 ` Sanjay Singh Rawat
7 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-05-27 14:32 UTC (permalink / raw)
To: linux-arm-kernel
use cpu_do_idle for entering the wfi mode.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
---
arch/arm/mach-prima2/hotplug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-prima2/hotplug.c b/arch/arm/mach-prima2/hotplug.c
index 0ab2f8b..68d2903 100644
--- a/arch/arm/mach-prima2/hotplug.c
+++ b/arch/arm/mach-prima2/hotplug.c
@@ -16,8 +16,8 @@ static inline void platform_do_lowpower(unsigned int cpu)
{
/* we put the platform to just WFI */
for (;;) {
- __asm__ __volatile__("dsb\n\t" "wfi\n\t"
- : : : "memory");
+ cpu_do_idle();
+
if (pen_release == cpu_logical_map(cpu)) {
/*
* OK, proper wakeup, we're done
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/8] ARM: SPEAr: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 3/8] ARM: SPEAr: " Sanjay Singh Rawat
@ 2013-05-28 9:55 ` Viresh Kumar
0 siblings, 0 replies; 24+ messages in thread
From: Viresh Kumar @ 2013-05-28 9:55 UTC (permalink / raw)
To: linux-arm-kernel
On 27 May 2013 20:02, Sanjay Singh Rawat <sanjay.rawat@linaro.org> wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-spear/hotplug.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-spear/hotplug.c b/arch/arm/mach-spear/hotplug.c
> index d97749c..6dbd3dc 100644
> --- a/arch/arm/mach-spear/hotplug.c
> +++ b/arch/arm/mach-spear/hotplug.c
> @@ -55,7 +55,8 @@ static inline void cpu_leave_lowpower(void)
> static inline void spear13xx_do_lowpower(unsigned int cpu, int *spurious)
> {
> for (;;) {
> - wfi();
> + /* enter WFI mode */
> + cpu_do_idle();
>
> if (pen_release == cpu) {
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 7/8] ARM: msm: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 7/8] ARM: msm: " Sanjay Singh Rawat
@ 2013-05-28 18:50 ` David Brown
2013-05-30 16:42 ` David Brown
1 sibling, 0 replies; 24+ messages in thread
From: David Brown @ 2013-05-28 18:50 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 27, 2013 at 08:02:44PM +0530, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-msm/hotplug.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
Acked-by: David Brown <davidb@codeaurora.org>
--
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 5/8] ARM: zynq: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 5/8] ARM: zynq: " Sanjay Singh Rawat
@ 2013-05-29 5:39 ` Michal Simek
0 siblings, 0 replies; 24+ messages in thread
From: Michal Simek @ 2013-05-29 5:39 UTC (permalink / raw)
To: linux-arm-kernel
On 05/27/2013 04:32 PM, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-zynq/hotplug.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c
> index c89672b..ef0d65d 100644
> --- a/arch/arm/mach-zynq/hotplug.c
> +++ b/arch/arm/mach-zynq/hotplug.c
> @@ -64,8 +64,8 @@ static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious)
> * code will have already disabled interrupts
> */
> for (;;) {
> - dsb();
> - wfi();
> + /* enter WFI mode */
> + cpu_do_idle();
>
> /*
> * Getting here, means that we have come out of WFI without
>
Applied to zynq/cleanup branch.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130529/663c5f5e/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 6/8] ARM: ux500: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 6/8] ARM: ux500: " Sanjay Singh Rawat
@ 2013-05-30 7:26 ` Srinidhi Kasagar
0 siblings, 0 replies; 24+ messages in thread
From: Srinidhi Kasagar @ 2013-05-30 7:26 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 27, 2013 at 16:32:43 +0200, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-ux500/hotplug.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
> index 2bc00b0..f4ded92 100644
> --- a/arch/arm/mach-ux500/hotplug.c
> +++ b/arch/arm/mach-ux500/hotplug.c
> @@ -25,8 +25,9 @@ void __ref ux500_cpu_die(unsigned int cpu)
> {
> /* directly enter low power state, skipping secure registers */
> for (;;) {
> - __asm__ __volatile__("dsb\n\t" "wfi\n\t"
> - : : : "memory");
> + /* enter WFI mode */
> + cpu_do_idle();
> +
Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
srinidhi
> if (pen_release == cpu_logical_map(cpu)) {
> /*
> * OK, proper wakeup, we're done
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 7/8] ARM: msm: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 7/8] ARM: msm: " Sanjay Singh Rawat
2013-05-28 18:50 ` David Brown
@ 2013-05-30 16:42 ` David Brown
1 sibling, 0 replies; 24+ messages in thread
From: David Brown @ 2013-05-30 16:42 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 27, 2013 at 08:02:44PM +0530, Sanjay Singh Rawat wrote:
>use cpu_do_idle for entering the wfi mode.
>
>Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
>---
> arch/arm/mach-msm/hotplug.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
Acked-by: David Brown <davidb@codeaurora.org>
--
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 2/8] ARM: RealView: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 2/8] ARM: RealView: " Sanjay Singh Rawat
@ 2013-06-04 15:20 ` Sanjay Singh Rawat
0 siblings, 0 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-06-04 15:20 UTC (permalink / raw)
To: linux-arm-kernel
Hello Russell,
can you please review this patch?
On Monday 27 May 2013 08:02 PM, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-realview/hotplug.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
> index ac22dd4..c42022b 100644
> --- a/arch/arm/mach-realview/hotplug.c
> +++ b/arch/arm/mach-realview/hotplug.c
> @@ -59,13 +59,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> * code will have already disabled interrupts
> */
> for (;;) {
> - /*
> - * here's the WFI
> - */
> - asm(".word 0xe320f003\n"
> - :
> - :
> - : "memory", "cc");
> + /* enter WFI mode */
> + cpu_do_idle();
>
> if (pen_release == cpu_logical_map(cpu)) {
> /*
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 4/8] ARM: vexpress: " Sanjay Singh Rawat
@ 2013-06-04 15:23 ` Sanjay Singh Rawat
2013-06-07 9:17 ` Linus Walleij
2013-06-07 15:11 ` Pawel Moll
1 sibling, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-06-04 15:23 UTC (permalink / raw)
To: linux-arm-kernel
hello Russell, Nicolas,
can you please review this patch?
On Monday 27 May 2013 08:02 PM, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat<sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-vexpress/hotplug.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> index f0ce6b8..b3dffc2 100644
> --- a/arch/arm/mach-vexpress/hotplug.c
> +++ b/arch/arm/mach-vexpress/hotplug.c
> @@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> * code will have already disabled interrupts
> */
> for (;;) {
> - wfi();
> + /* enter WFI mode */
> + cpu_do_idle();
>
> if (pen_release == cpu_logical_map(cpu)) {
> /*
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi Sanjay Singh Rawat
@ 2013-06-04 15:25 ` Sanjay Singh Rawat
0 siblings, 0 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-06-04 15:25 UTC (permalink / raw)
To: linux-arm-kernel
Hello Kukjin,
can you please review the patch?
On Monday 27 May 2013 08:02 PM, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the WFI mode.
>
> Signed-off-by: Sanjay Singh Rawat<sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-exynos/hotplug.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
> index af90cfa..7fcedd8 100644
> --- a/arch/arm/mach-exynos/hotplug.c
> +++ b/arch/arm/mach-exynos/hotplug.c
> @@ -98,13 +98,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> if (cpu == 1)
> __raw_writel(0, S5P_ARM_CORE1_CONFIGURATION);
>
> - /*
> - * here's the WFI
> - */
> - asm(".word 0xe320f003\n"
> - :
> - :
> - : "memory", "cc");
> + /* enter WFI mode */
> + cpu_do_idle();
>
> if (pen_release == cpu_logical_map(cpu)) {
> /*
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 8/8] ARM: PRIMA2: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 8/8] ARM: PRIMA2: " Sanjay Singh Rawat
@ 2013-06-04 15:28 ` Sanjay Singh Rawat
0 siblings, 0 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-06-04 15:28 UTC (permalink / raw)
To: linux-arm-kernel
Hello Barry,
Sorry i missed you in the initial mail. Can you please review the patch.
thanks,
sanjay
On Monday 27 May 2013 08:02 PM, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-prima2/hotplug.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-prima2/hotplug.c b/arch/arm/mach-prima2/hotplug.c
> index 0ab2f8b..68d2903 100644
> --- a/arch/arm/mach-prima2/hotplug.c
> +++ b/arch/arm/mach-prima2/hotplug.c
> @@ -16,8 +16,8 @@ static inline void platform_do_lowpower(unsigned int cpu)
> {
> /* we put the platform to just WFI */
> for (;;) {
> - __asm__ __volatile__("dsb\n\t" "wfi\n\t"
> - : : : "memory");
> + cpu_do_idle();
> +
> if (pen_release == cpu_logical_map(cpu)) {
> /*
> * OK, proper wakeup, we're done
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-06-04 15:23 ` Sanjay Singh Rawat
@ 2013-06-07 9:17 ` Linus Walleij
0 siblings, 0 replies; 24+ messages in thread
From: Linus Walleij @ 2013-06-07 9:17 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 4, 2013 at 5:23 PM, Sanjay Singh Rawat
<sanjay.rawat@linaro.org> wrote:
> hello Russell, Nicolas,
>
> can you please review this patch?
I think you may want Pawel to look at this, he usually looks
after the Vexpress.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-05-27 14:32 ` [PATCH 4/8] ARM: vexpress: " Sanjay Singh Rawat
2013-06-04 15:23 ` Sanjay Singh Rawat
@ 2013-06-07 15:11 ` Pawel Moll
2013-06-11 5:33 ` Sanjay Singh Rawat
1 sibling, 1 reply; 24+ messages in thread
From: Pawel Moll @ 2013-06-07 15:11 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 2013-05-27 at 15:32 +0100, Sanjay Singh Rawat wrote:
> use cpu_do_idle for entering the wfi mode.
>
> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> ---
> arch/arm/mach-vexpress/hotplug.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> index f0ce6b8..b3dffc2 100644
> --- a/arch/arm/mach-vexpress/hotplug.c
> +++ b/arch/arm/mach-vexpress/hotplug.c
> @@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> * code will have already disabled interrupts
> */
> for (;;) {
> - wfi();
> + /* enter WFI mode */
> + cpu_do_idle();
>
> if (pen_release == cpu_logical_map(cpu)) {
> /*
I probably don't get the whole picture, but may I ask what is the
rationale behind this change? As in: why cpu_do_idle() is better?
Pawe?
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-06-07 15:11 ` Pawel Moll
@ 2013-06-11 5:33 ` Sanjay Singh Rawat
2013-06-11 10:07 ` Pawel Moll
0 siblings, 1 reply; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-06-11 5:33 UTC (permalink / raw)
To: linux-arm-kernel
commit: 8553cb67d2318db327071018fc81084cbabccc46 explains that
-sanjay
On Friday 07 June 2013 08:41 PM, Pawel Moll wrote:
> On Mon, 2013-05-27 at 15:32 +0100, Sanjay Singh Rawat wrote:
>> use cpu_do_idle for entering the wfi mode.
>>
>> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
>> ---
>> arch/arm/mach-vexpress/hotplug.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
>> index f0ce6b8..b3dffc2 100644
>> --- a/arch/arm/mach-vexpress/hotplug.c
>> +++ b/arch/arm/mach-vexpress/hotplug.c
>> @@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
>> * code will have already disabled interrupts
>> */
>> for (;;) {
>> - wfi();
>> + /* enter WFI mode */
>> + cpu_do_idle();
>>
>> if (pen_release == cpu_logical_map(cpu)) {
>> /*
>
> I probably don't get the whole picture, but may I ask what is the
> rationale behind this change? As in: why cpu_do_idle() is better?
>
> Pawe?
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-06-11 5:33 ` Sanjay Singh Rawat
@ 2013-06-11 10:07 ` Pawel Moll
2013-06-11 15:30 ` Nicolas Pitre
0 siblings, 1 reply; 24+ messages in thread
From: Pawel Moll @ 2013-06-11 10:07 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2013-06-11 at 06:33 +0100, Sanjay Singh Rawat wrote:
> >> use cpu_do_idle for entering the wfi mode.
> >>
> >> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> >> ---
> >> arch/arm/mach-vexpress/hotplug.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> >> index f0ce6b8..b3dffc2 100644
> >> --- a/arch/arm/mach-vexpress/hotplug.c
> >> +++ b/arch/arm/mach-vexpress/hotplug.c
> >> @@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> >> * code will have already disabled interrupts
> >> */
> >> for (;;) {
> >> - wfi();
> >> + /* enter WFI mode */
> >> + cpu_do_idle();
> >>
> >> if (pen_release == cpu_logical_map(cpu)) {
> >> /*
> >
> > I probably don't get the whole picture, but may I ask what is the
> > rationale behind this change? As in: why cpu_do_idle() is better?
>
> commit: 8553cb67d2318db327071018fc81084cbabccc46 explains that
Oh, I've noticed the dsb there, I'm just asking why is it necessary in
the cpu_die() case? The core is going down anyway, it left the coherency
domain and we could cut the power now (if only it was possible). All
cache maintenance (which undoubtedly included dsb) has been long done.
Now, don't get me wrong - I'm not saying it's wrong to do the dsb. I
simply would like to know if and why is required (I'm admitting my
ignorance here ;-) But if you simply grep-ed for "wfi()" in the whole
kernel and automatically replaced them with "cpu_do_idle()", it doesn't
make sense.
Regards
Pawel
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-06-11 10:07 ` Pawel Moll
@ 2013-06-11 15:30 ` Nicolas Pitre
2013-06-12 5:34 ` Sanjay Singh Rawat
0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Pitre @ 2013-06-11 15:30 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 11 Jun 2013, Pawel Moll wrote:
> On Tue, 2013-06-11 at 06:33 +0100, Sanjay Singh Rawat wrote:
> > >> use cpu_do_idle for entering the wfi mode.
> > >>
> > >> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
> > >> ---
> > >> arch/arm/mach-vexpress/hotplug.c | 3 ++-
> > >> 1 file changed, 2 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> > >> index f0ce6b8..b3dffc2 100644
> > >> --- a/arch/arm/mach-vexpress/hotplug.c
> > >> +++ b/arch/arm/mach-vexpress/hotplug.c
> > >> @@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> > >> * code will have already disabled interrupts
> > >> */
> > >> for (;;) {
> > >> - wfi();
> > >> + /* enter WFI mode */
> > >> + cpu_do_idle();
> > >>
> > >> if (pen_release == cpu_logical_map(cpu)) {
> > >> /*
> > >
> > > I probably don't get the whole picture, but may I ask what is the
> > > rationale behind this change? As in: why cpu_do_idle() is better?
> >
> > commit: 8553cb67d2318db327071018fc81084cbabccc46 explains that
>
> Oh, I've noticed the dsb there, I'm just asking why is it necessary in
> the cpu_die() case? The core is going down anyway, it left the coherency
> domain and we could cut the power now (if only it was possible). All
> cache maintenance (which undoubtedly included dsb) has been long done.
>
> Now, don't get me wrong - I'm not saying it's wrong to do the dsb. I
> simply would like to know if and why is required (I'm admitting my
> ignorance here ;-) But if you simply grep-ed for "wfi()" in the whole
> kernel and automatically replaced them with "cpu_do_idle()", it doesn't
> make sense.
That's my feeling too. There is a semantic difference between calling
cpu_do_idle() and executing a WFI inline. I'd use cpu_do_idle() only in
those cases where the call is expected to return and keep the inlined
WFI otherwise (with the added DSB when necessary which is not all cases
as explained above).
Nicolas
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 4/8] ARM: vexpress: use generic cpu idle function for wfi
2013-06-11 15:30 ` Nicolas Pitre
@ 2013-06-12 5:34 ` Sanjay Singh Rawat
0 siblings, 0 replies; 24+ messages in thread
From: Sanjay Singh Rawat @ 2013-06-12 5:34 UTC (permalink / raw)
To: linux-arm-kernel
Pawel, Nicolas,
Thanks for the clarification :), dropping.
sanjay
On Tuesday 11 June 2013 09:00 PM, Nicolas Pitre wrote:
> On Tue, 11 Jun 2013, Pawel Moll wrote:
>
>> On Tue, 2013-06-11 at 06:33 +0100, Sanjay Singh Rawat wrote:
>>>>> use cpu_do_idle for entering the wfi mode.
>>>>>
>>>>> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
>>>>> ---
>>>>> arch/arm/mach-vexpress/hotplug.c | 3 ++-
>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
>>>>> index f0ce6b8..b3dffc2 100644
>>>>> --- a/arch/arm/mach-vexpress/hotplug.c
>>>>> +++ b/arch/arm/mach-vexpress/hotplug.c
>>>>> @@ -60,7 +60,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
>>>>> * code will have already disabled interrupts
>>>>> */
>>>>> for (;;) {
>>>>> - wfi();
>>>>> + /* enter WFI mode */
>>>>> + cpu_do_idle();
>>>>>
>>>>> if (pen_release == cpu_logical_map(cpu)) {
>>>>> /*
>>>>
>>>> I probably don't get the whole picture, but may I ask what is the
>>>> rationale behind this change? As in: why cpu_do_idle() is better?
>>>
>>> commit: 8553cb67d2318db327071018fc81084cbabccc46 explains that
>>
>> Oh, I've noticed the dsb there, I'm just asking why is it necessary in
>> the cpu_die() case? The core is going down anyway, it left the coherency
>> domain and we could cut the power now (if only it was possible). All
>> cache maintenance (which undoubtedly included dsb) has been long done.
>>
>> Now, don't get me wrong - I'm not saying it's wrong to do the dsb. I
>> simply would like to know if and why is required (I'm admitting my
>> ignorance here ;-) But if you simply grep-ed for "wfi()" in the whole
>> kernel and automatically replaced them with "cpu_do_idle()", it doesn't
>> make sense.
>
> That's my feeling too. There is a semantic difference between calling
> cpu_do_idle() and executing a WFI inline. I'd use cpu_do_idle() only in
> those cases where the call is expected to return and keep the inlined
> WFI otherwise (with the added DSB when necessary which is not all cases
> as explained above).
>
> Nicolas
>
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2013-06-12 5:34 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27 14:32 [PATCH 0/8] ARM: use cpu_do_idle for entering wfi mode Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 1/8] ARM: EXYNOS: use generic cpu idle function for wfi Sanjay Singh Rawat
2013-06-04 15:25 ` Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 2/8] ARM: RealView: " Sanjay Singh Rawat
2013-06-04 15:20 ` Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 3/8] ARM: SPEAr: " Sanjay Singh Rawat
2013-05-28 9:55 ` Viresh Kumar
2013-05-27 14:32 ` [PATCH 4/8] ARM: vexpress: " Sanjay Singh Rawat
2013-06-04 15:23 ` Sanjay Singh Rawat
2013-06-07 9:17 ` Linus Walleij
2013-06-07 15:11 ` Pawel Moll
2013-06-11 5:33 ` Sanjay Singh Rawat
2013-06-11 10:07 ` Pawel Moll
2013-06-11 15:30 ` Nicolas Pitre
2013-06-12 5:34 ` Sanjay Singh Rawat
2013-05-27 14:32 ` [PATCH 5/8] ARM: zynq: " Sanjay Singh Rawat
2013-05-29 5:39 ` Michal Simek
2013-05-27 14:32 ` [PATCH 6/8] ARM: ux500: " Sanjay Singh Rawat
2013-05-30 7:26 ` Srinidhi Kasagar
2013-05-27 14:32 ` [PATCH 7/8] ARM: msm: " Sanjay Singh Rawat
2013-05-28 18:50 ` David Brown
2013-05-30 16:42 ` David Brown
2013-05-27 14:32 ` [PATCH 8/8] ARM: PRIMA2: " Sanjay Singh Rawat
2013-06-04 15:28 ` Sanjay Singh Rawat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).