All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 15:26 ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

This series cleans up all remaining ARM subarchitectures that I could
find to use the generic wfi macro.  As I don't have any of the boards in
question, I've only compile-tested these patches to the extent that I
was able.

See the previous discussion in https://lkml.org/lkml/2011/8/19/433 for
more background.

Nick Bowler (5):
  ARM: realview: Use wfi macro in platform_do_lowpower.
  ARM: exynos4: Use wfi macro in platform_do_lowpower.
  ARM: shmobile: Use wfi macro in platform_cpu_die.
  ARM: tegra: Use wfi macro in platform_do_lowpower.
  ARM: omap4: Kill private do_wfi macro.

 arch/arm/mach-exynos4/hotplug.c                 |    9 ++-------
 arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
 arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
 arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
 arch/arm/mach-realview/hotplug.c                |    9 ++-------
 arch/arm/mach-shmobile/hotplug.c                |   10 +++-------
 arch/arm/mach-tegra/hotplug.c                   |    9 ++-------
 7 files changed, 15 insertions(+), 44 deletions(-)

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 15:26 ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Kukjin Kim, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Paul Mundt,
	Magnus Damm, linux-sh-u79uwXL29TY76Z2rM5mHXA, Colin Cross,
	Erik Gilling, Olof Johansson, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	Tony Lindgren, Kevin Hilman, linux-omap-u79uwXL29TY76Z2rM5mHXA

This series cleans up all remaining ARM subarchitectures that I could
find to use the generic wfi macro.  As I don't have any of the boards in
question, I've only compile-tested these patches to the extent that I
was able.

See the previous discussion in https://lkml.org/lkml/2011/8/19/433 for
more background.

Nick Bowler (5):
  ARM: realview: Use wfi macro in platform_do_lowpower.
  ARM: exynos4: Use wfi macro in platform_do_lowpower.
  ARM: shmobile: Use wfi macro in platform_cpu_die.
  ARM: tegra: Use wfi macro in platform_do_lowpower.
  ARM: omap4: Kill private do_wfi macro.

 arch/arm/mach-exynos4/hotplug.c                 |    9 ++-------
 arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
 arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
 arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
 arch/arm/mach-realview/hotplug.c                |    9 ++-------
 arch/arm/mach-shmobile/hotplug.c                |   10 +++-------
 arch/arm/mach-tegra/hotplug.c                   |    9 ++-------
 7 files changed, 15 insertions(+), 44 deletions(-)

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 15:26 ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

This series cleans up all remaining ARM subarchitectures that I could
find to use the generic wfi macro.  As I don't have any of the boards in
question, I've only compile-tested these patches to the extent that I
was able.

See the previous discussion in https://lkml.org/lkml/2011/8/19/433 for
more background.

Nick Bowler (5):
  ARM: realview: Use wfi macro in platform_do_lowpower.
  ARM: exynos4: Use wfi macro in platform_do_lowpower.
  ARM: shmobile: Use wfi macro in platform_cpu_die.
  ARM: tegra: Use wfi macro in platform_do_lowpower.
  ARM: omap4: Kill private do_wfi macro.

 arch/arm/mach-exynos4/hotplug.c                 |    9 ++-------
 arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
 arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
 arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
 arch/arm/mach-realview/hotplug.c                |    9 ++-------
 arch/arm/mach-shmobile/hotplug.c                |   10 +++-------
 arch/arm/mach-tegra/hotplug.c                   |    9 ++-------
 7 files changed, 15 insertions(+), 44 deletions(-)

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/5] ARM: realview: Use wfi macro in platform_do_lowpower.
  2011-09-09 15:26 ` Nick Bowler
  (?)
  (?)
@ 2011-09-09 15:26 ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Current Realview CPU hotplug code includes a hardcoded WFI instruction,
in ARM encoding.  The hardcoded instruction is both hard to understand
and doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode.
---
 arch/arm/mach-realview/hotplug.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
index a87523d..6d19377 100644
--- a/arch/arm/mach-realview/hotplug.c
+++ b/arch/arm/mach-realview/hotplug.c
@@ -13,6 +13,7 @@
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
 
 extern volatile int pen_release;
 
@@ -61,13 +62,7 @@ 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");
+		wfi();
 
 		if (pen_release == cpu) {
 			/*
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/5] ARM: exynos4: Use wfi macro in platform_do_lowpower.
  2011-09-09 15:26 ` Nick Bowler
@ 2011-09-09 15:26   ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-samsung-soc, Kukjin Kim

Current Exynos4 CPU hotplug code includes a hardcoded WFI instruction,
in ARM encoding.  The hardcoded instruction is both hard to understand
and doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode.
---
 arch/arm/mach-exynos4/hotplug.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-exynos4/hotplug.c b/arch/arm/mach-exynos4/hotplug.c
index 7490789..8724227 100644
--- a/arch/arm/mach-exynos4/hotplug.c
+++ b/arch/arm/mach-exynos4/hotplug.c
@@ -16,6 +16,7 @@
 #include <linux/io.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
 
 #include <mach/regs-pmu.h>
 
@@ -67,13 +68,7 @@ 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");
+		wfi();
 
 		if (pen_release == cpu) {
 			/*
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/5] ARM: exynos4: Use wfi macro in platform_do_lowpower.
@ 2011-09-09 15:26   ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Current Exynos4 CPU hotplug code includes a hardcoded WFI instruction,
in ARM encoding.  The hardcoded instruction is both hard to understand
and doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode.
---
 arch/arm/mach-exynos4/hotplug.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-exynos4/hotplug.c b/arch/arm/mach-exynos4/hotplug.c
index 7490789..8724227 100644
--- a/arch/arm/mach-exynos4/hotplug.c
+++ b/arch/arm/mach-exynos4/hotplug.c
@@ -16,6 +16,7 @@
 #include <linux/io.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
 
 #include <mach/regs-pmu.h>
 
@@ -67,13 +68,7 @@ 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");
+		wfi();
 
 		if (pen_release == cpu) {
 			/*
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die.
  2011-09-09 15:26 ` Nick Bowler
@ 2011-09-09 15:26   ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Current Shmobile CPU hotplug code includes a hardcoded WFI instruction,
in ARM encoding.  The hardcoded instruction is both hard to understand
and doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode, and the resulting hotplug.o
contains the correct instruction sequence, but the final kernel failed
to link for apparently unrelated reasons:

In ARM mode:

    LD      .tmp_vmlinux1
  arch/arm/kernel/built-in.o: In function `twd_timer_setup':
  io.c:(.cpuinit.text+0x600): undefined reference to `gic_enable_ppi'
  arch/arm/mach-shmobile/built-in.o: In function `smp_init_cpus':
  pfc-sh7372.c:(.init.text+0xbb0): undefined reference to `gic_raise_softirq'

In Thumb-2 mode:

    LD      .tmp_vmlinux1
  arch/arm/kernel/built-in.o: In function `get_wchan':
  io.c:(.text+0x1542): undefined reference to `unwind_frame'
  arch/arm/kernel/built-in.o: In function `walk_stackframe':
  io.c:(.text+0x27f0): undefined reference to `unwind_frame'
  arch/arm/kernel/built-in.o: In function `profile_pc':
  io.c:(.text+0x2828): undefined reference to `unwind_frame'
  arch/arm/kernel/built-in.o: In function `twd_timer_setup':
  io.c:(.cpuinit.text+0x42e): undefined reference to `gic_enable_ppi'
  arch/arm/mach-shmobile/built-in.o: In function `smp_init_cpus':
  pfc-sh7372.c:(.init.text+0x8e8): undefined reference to `gic_raise_softirq'
---
 arch/arm/mach-shmobile/hotplug.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c
index 238a0d9..1e83087 100644
--- a/arch/arm/mach-shmobile/hotplug.c
+++ b/arch/arm/mach-shmobile/hotplug.c
@@ -13,6 +13,8 @@
 #include <linux/errno.h>
 #include <linux/smp.h>
 
+#include <asm/system.h>
+
 int platform_cpu_kill(unsigned int cpu)
 {
 	return 1;
@@ -21,13 +23,7 @@ int platform_cpu_kill(unsigned int cpu)
 void platform_cpu_die(unsigned int cpu)
 {
 	while (1) {
-		/*
-		 * here's the WFI
-		 */
-		asm(".word	0xe320f003\n"
-		    :
-		    :
-		    : "memory", "cc");
+		wfi();
 	}
 }
 
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die.
@ 2011-09-09 15:26   ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Current Shmobile CPU hotplug code includes a hardcoded WFI instruction,
in ARM encoding.  The hardcoded instruction is both hard to understand
and doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode, and the resulting hotplug.o
contains the correct instruction sequence, but the final kernel failed
to link for apparently unrelated reasons:

In ARM mode:

    LD      .tmp_vmlinux1
  arch/arm/kernel/built-in.o: In function `twd_timer_setup':
  io.c:(.cpuinit.text+0x600): undefined reference to `gic_enable_ppi'
  arch/arm/mach-shmobile/built-in.o: In function `smp_init_cpus':
  pfc-sh7372.c:(.init.text+0xbb0): undefined reference to `gic_raise_softirq'

In Thumb-2 mode:

    LD      .tmp_vmlinux1
  arch/arm/kernel/built-in.o: In function `get_wchan':
  io.c:(.text+0x1542): undefined reference to `unwind_frame'
  arch/arm/kernel/built-in.o: In function `walk_stackframe':
  io.c:(.text+0x27f0): undefined reference to `unwind_frame'
  arch/arm/kernel/built-in.o: In function `profile_pc':
  io.c:(.text+0x2828): undefined reference to `unwind_frame'
  arch/arm/kernel/built-in.o: In function `twd_timer_setup':
  io.c:(.cpuinit.text+0x42e): undefined reference to `gic_enable_ppi'
  arch/arm/mach-shmobile/built-in.o: In function `smp_init_cpus':
  pfc-sh7372.c:(.init.text+0x8e8): undefined reference to `gic_raise_softirq'
---
 arch/arm/mach-shmobile/hotplug.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c
index 238a0d9..1e83087 100644
--- a/arch/arm/mach-shmobile/hotplug.c
+++ b/arch/arm/mach-shmobile/hotplug.c
@@ -13,6 +13,8 @@
 #include <linux/errno.h>
 #include <linux/smp.h>
 
+#include <asm/system.h>
+
 int platform_cpu_kill(unsigned int cpu)
 {
 	return 1;
@@ -21,13 +23,7 @@ int platform_cpu_kill(unsigned int cpu)
 void platform_cpu_die(unsigned int cpu)
 {
 	while (1) {
-		/*
-		 * here's the WFI
-		 */
-		asm(".word	0xe320f003\n"
-		    :
-		    :
-		    : "memory", "cc");
+		wfi();
 	}
 }
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/5] ARM: tegra: Use wfi macro in platform_do_lowpower.
  2011-09-09 15:26 ` Nick Bowler
@ 2011-09-09 15:26     ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Colin Cross, Erik Gilling, Olof Johansson,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Current Tegra CPU hotplug code includes a hardcoded WFI instruction, in
ARM encoding.  The hardcoded instruction is both hard to understand and
doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
---
Compile tested in ARM mode only as I could not build for this platform
in Thumb-2 mode:

/scratch_space/linux-2.6/arch/arm/mach-tegra/headsmp.S: Assembler messages:
/scratch_space/linux-2.6/arch/arm/mach-tegra/headsmp.S:51: Error: Thumb encoding does not support an immediate here -- `msr cpsr_fsxc,#0xd3'
---
 arch/arm/mach-tegra/hotplug.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index f329404..4fc72d6 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -13,6 +13,7 @@
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
 
 static inline void cpu_enter_lowpower(void)
 {
@@ -60,13 +61,7 @@ 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");
+		wfi();
 
 		/*if (pen_release == cpu) {*/
 			/*
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/5] ARM: tegra: Use wfi macro in platform_do_lowpower.
@ 2011-09-09 15:26     ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Current Tegra CPU hotplug code includes a hardcoded WFI instruction, in
ARM encoding.  The hardcoded instruction is both hard to understand and
doomed to failure when building the kernel in Thumb-2 mode.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in ARM mode only as I could not build for this platform
in Thumb-2 mode:

/scratch_space/linux-2.6/arch/arm/mach-tegra/headsmp.S: Assembler messages:
/scratch_space/linux-2.6/arch/arm/mach-tegra/headsmp.S:51: Error: Thumb encoding does not support an immediate here -- `msr cpsr_fsxc,#0xd3'
---
 arch/arm/mach-tegra/hotplug.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index f329404..4fc72d6 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -13,6 +13,7 @@
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
 
 static inline void cpu_enter_lowpower(void)
 {
@@ -60,13 +61,7 @@ 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");
+		wfi();
 
 		/*if (pen_release == cpu) {*/
 			/*
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
  2011-09-09 15:26 ` Nick Bowler
@ 2011-09-09 15:26   ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Tony Lindgren, Kevin Hilman, linux-omap

The do_wfi macro duplicates the functionality of the wfi macro in common
ARM code.  Use the common version instead.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode.
---
 arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
 arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
 arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
 3 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h
index e4bd87619..9e8c214 100644
--- a/arch/arm/mach-omap2/include/mach/omap4-common.h
+++ b/arch/arm/mach-omap2/include/mach/omap4-common.h
@@ -13,17 +13,6 @@
 #ifndef OMAP_ARCH_OMAP4_COMMON_H
 #define OMAP_ARCH_OMAP4_COMMON_H
 
-/*
- * wfi used in low power code. Directly opcode is used instead
- * of instruction to avoid mulit-omap build break
- */
-#ifdef CONFIG_THUMB2_KERNEL
-#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
-#else
-#define do_wfi()			\
-		__asm__ __volatile__ (".word	0xe320f003" : : : "memory")
-#endif
-
 #ifdef CONFIG_CACHE_L2X0
 extern void __iomem *l2cache_base;
 #endif
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 4976b93..3a43eb8 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -19,6 +19,8 @@
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
+
 #include <mach/omap4-common.h>
 
 int platform_cpu_kill(unsigned int cpu)
@@ -42,10 +44,7 @@ void platform_cpu_die(unsigned int cpu)
 		printk(KERN_CRIT "Secure clear status failed\n");
 
 	for (;;) {
-		/*
-		 * Execute WFI
-		 */
-		do_wfi();
+		wfi();
 
 		if (omap_read_auxcoreboot0() == cpu) {
 			/*
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 59a870b..c741ad7 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -16,6 +16,8 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 
+#include <asm/system.h>
+
 #include "powerdomain.h"
 #include <mach/omap4-common.h>
 
@@ -33,7 +35,7 @@ static LIST_HEAD(pwrst_list);
 #ifdef CONFIG_SUSPEND
 static int omap4_pm_suspend(void)
 {
-	do_wfi();
+	wfi();
 	return 0;
 }
 
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
@ 2011-09-09 15:26   ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

The do_wfi macro duplicates the functionality of the wfi macro in common
ARM code.  Use the common version instead.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
Compile tested in both ARM and Thumb-2 mode.
---
 arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
 arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
 arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
 3 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h
index e4bd87619..9e8c214 100644
--- a/arch/arm/mach-omap2/include/mach/omap4-common.h
+++ b/arch/arm/mach-omap2/include/mach/omap4-common.h
@@ -13,17 +13,6 @@
 #ifndef OMAP_ARCH_OMAP4_COMMON_H
 #define OMAP_ARCH_OMAP4_COMMON_H
 
-/*
- * wfi used in low power code. Directly opcode is used instead
- * of instruction to avoid mulit-omap build break
- */
-#ifdef CONFIG_THUMB2_KERNEL
-#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
-#else
-#define do_wfi()			\
-		__asm__ __volatile__ (".word	0xe320f003" : : : "memory")
-#endif
-
 #ifdef CONFIG_CACHE_L2X0
 extern void __iomem *l2cache_base;
 #endif
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 4976b93..3a43eb8 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -19,6 +19,8 @@
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>
+#include <asm/system.h>
+
 #include <mach/omap4-common.h>
 
 int platform_cpu_kill(unsigned int cpu)
@@ -42,10 +44,7 @@ void platform_cpu_die(unsigned int cpu)
 		printk(KERN_CRIT "Secure clear status failed\n");
 
 	for (;;) {
-		/*
-		 * Execute WFI
-		 */
-		do_wfi();
+		wfi();
 
 		if (omap_read_auxcoreboot0() == cpu) {
 			/*
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 59a870b..c741ad7 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -16,6 +16,8 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 
+#include <asm/system.h>
+
 #include "powerdomain.h"
 #include <mach/omap4-common.h>
 
@@ -33,7 +35,7 @@ static LIST_HEAD(pwrst_list);
 #ifdef CONFIG_SUSPEND
 static int omap4_pm_suspend(void)
 {
-	do_wfi();
+	wfi();
 	return 0;
 }
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
  2011-09-09 15:26 ` Nick Bowler
  (?)
@ 2011-09-09 15:42   ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

And after all that, I forgot to CC Russell on these patches.  Oops.

On 2011-09-09 11:26 -0400, Nick Bowler wrote:
> This series cleans up all remaining ARM subarchitectures that I could
> find to use the generic wfi macro.  As I don't have any of the boards in
> question, I've only compile-tested these patches to the extent that I
> was able.
> 
> See the previous discussion in https://lkml.org/lkml/2011/8/19/433 for
> more background.
> 
> Nick Bowler (5):
>   ARM: realview: Use wfi macro in platform_do_lowpower.
>   ARM: exynos4: Use wfi macro in platform_do_lowpower.
>   ARM: shmobile: Use wfi macro in platform_cpu_die.
>   ARM: tegra: Use wfi macro in platform_do_lowpower.
>   ARM: omap4: Kill private do_wfi macro.
> 
>  arch/arm/mach-exynos4/hotplug.c                 |    9 ++-------
>  arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
>  arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
>  arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
>  arch/arm/mach-realview/hotplug.c                |    9 ++-------
>  arch/arm/mach-shmobile/hotplug.c                |   10 +++-------
>  arch/arm/mach-tegra/hotplug.c                   |    9 ++-------
>  7 files changed, 15 insertions(+), 44 deletions(-)

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 15:42   ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:42 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Russell King, Kukjin Kim, linux-samsung-soc, Paul Mundt,
	Magnus Damm, linux-sh, Colin Cross, Erik Gilling, Olof Johansson,
	linux-tegra, Tony Lindgren, Kevin Hilman, linux-omap

And after all that, I forgot to CC Russell on these patches.  Oops.

On 2011-09-09 11:26 -0400, Nick Bowler wrote:
> This series cleans up all remaining ARM subarchitectures that I could
> find to use the generic wfi macro.  As I don't have any of the boards in
> question, I've only compile-tested these patches to the extent that I
> was able.
> 
> See the previous discussion in https://lkml.org/lkml/2011/8/19/433 for
> more background.
> 
> Nick Bowler (5):
>   ARM: realview: Use wfi macro in platform_do_lowpower.
>   ARM: exynos4: Use wfi macro in platform_do_lowpower.
>   ARM: shmobile: Use wfi macro in platform_cpu_die.
>   ARM: tegra: Use wfi macro in platform_do_lowpower.
>   ARM: omap4: Kill private do_wfi macro.
> 
>  arch/arm/mach-exynos4/hotplug.c                 |    9 ++-------
>  arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
>  arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
>  arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
>  arch/arm/mach-realview/hotplug.c                |    9 ++-------
>  arch/arm/mach-shmobile/hotplug.c                |   10 +++-------
>  arch/arm/mach-tegra/hotplug.c                   |    9 ++-------
>  7 files changed, 15 insertions(+), 44 deletions(-)

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 15:42   ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

And after all that, I forgot to CC Russell on these patches.  Oops.

On 2011-09-09 11:26 -0400, Nick Bowler wrote:
> This series cleans up all remaining ARM subarchitectures that I could
> find to use the generic wfi macro.  As I don't have any of the boards in
> question, I've only compile-tested these patches to the extent that I
> was able.
> 
> See the previous discussion in https://lkml.org/lkml/2011/8/19/433 for
> more background.
> 
> Nick Bowler (5):
>   ARM: realview: Use wfi macro in platform_do_lowpower.
>   ARM: exynos4: Use wfi macro in platform_do_lowpower.
>   ARM: shmobile: Use wfi macro in platform_cpu_die.
>   ARM: tegra: Use wfi macro in platform_do_lowpower.
>   ARM: omap4: Kill private do_wfi macro.
> 
>  arch/arm/mach-exynos4/hotplug.c                 |    9 ++-------
>  arch/arm/mach-omap2/include/mach/omap4-common.h |   11 -----------
>  arch/arm/mach-omap2/omap-hotplug.c              |    7 +++----
>  arch/arm/mach-omap2/pm44xx.c                    |    4 +++-
>  arch/arm/mach-realview/hotplug.c                |    9 ++-------
>  arch/arm/mach-shmobile/hotplug.c                |   10 +++-------
>  arch/arm/mach-tegra/hotplug.c                   |    9 ++-------
>  7 files changed, 15 insertions(+), 44 deletions(-)

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
  2011-09-09 15:26   ` Nick Bowler
@ 2011-09-09 17:04     ` Santosh
  -1 siblings, 0 replies; 22+ messages in thread
From: Santosh @ 2011-09-09 17:04 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-arm-kernel, Tony Lindgren, Kevin Hilman, linux-omap

On Friday 09 September 2011 08:56 PM, Nick Bowler wrote:
> The do_wfi macro duplicates the functionality of the wfi macro in common
> ARM code.  Use the common version instead.
>
> Signed-off-by: Nick Bowler<nbowler@elliptictech.com>
> ---
> Compile tested in both ARM and Thumb-2 mode.

Thanks but this is already handle in my PM series.

https://patchwork.kernel.org/patch/624761/

Regards
Santosh

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
@ 2011-09-09 17:04     ` Santosh
  0 siblings, 0 replies; 22+ messages in thread
From: Santosh @ 2011-09-09 17:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 09 September 2011 08:56 PM, Nick Bowler wrote:
> The do_wfi macro duplicates the functionality of the wfi macro in common
> ARM code.  Use the common version instead.
>
> Signed-off-by: Nick Bowler<nbowler@elliptictech.com>
> ---
> Compile tested in both ARM and Thumb-2 mode.

Thanks but this is already handle in my PM series.

https://patchwork.kernel.org/patch/624761/

Regards
Santosh

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
  2011-09-09 17:04     ` Santosh
@ 2011-09-09 17:18       ` Nick Bowler
  -1 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 17:18 UTC (permalink / raw)
  To: Santosh; +Cc: Tony Lindgren, Kevin Hilman, linux-omap, linux-arm-kernel

On 2011-09-09 22:34 +0530, Santosh wrote:
> On Friday 09 September 2011 08:56 PM, Nick Bowler wrote:
> > The do_wfi macro duplicates the functionality of the wfi macro in common
> > ARM code.  Use the common version instead.
> >
> > Signed-off-by: Nick Bowler<nbowler@elliptictech.com>
> > ---
> > Compile tested in both ARM and Thumb-2 mode.
> 
> Thanks but this is already handle in my PM series.

OK, I will drop this patch.

Thanks,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
@ 2011-09-09 17:18       ` Nick Bowler
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Bowler @ 2011-09-09 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

On 2011-09-09 22:34 +0530, Santosh wrote:
> On Friday 09 September 2011 08:56 PM, Nick Bowler wrote:
> > The do_wfi macro duplicates the functionality of the wfi macro in common
> > ARM code.  Use the common version instead.
> >
> > Signed-off-by: Nick Bowler<nbowler@elliptictech.com>
> > ---
> > Compile tested in both ARM and Thumb-2 mode.
> 
> Thanks but this is already handle in my PM series.

OK, I will drop this patch.

Thanks,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
  2011-09-09 15:42   ` Nick Bowler
  (?)
@ 2011-09-09 19:02     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 22+ messages in thread
From: Russell King - ARM Linux @ 2011-09-09 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 09, 2011 at 11:42:54AM -0400, Nick Bowler wrote:
> And after all that, I forgot to CC Russell on these patches.  Oops.

Doesn't matter, I get them anyway (provided lakml is in the cc).

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 19:02     ` Russell King - ARM Linux
  0 siblings, 0 replies; 22+ messages in thread
From: Russell King - ARM Linux @ 2011-09-09 19:02 UTC (permalink / raw)
  To: Nick Bowler
  Cc: linux-arm-kernel, Kukjin Kim, linux-samsung-soc, Paul Mundt,
	Magnus Damm, linux-sh, Colin Cross, Erik Gilling, Olof Johansson,
	linux-tegra, Tony Lindgren, Kevin Hilman, linux-omap

On Fri, Sep 09, 2011 at 11:42:54AM -0400, Nick Bowler wrote:
> And after all that, I forgot to CC Russell on these patches.  Oops.

Doesn't matter, I get them anyway (provided lakml is in the cc).

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 19:02     ` Russell King - ARM Linux
  0 siblings, 0 replies; 22+ messages in thread
From: Russell King - ARM Linux @ 2011-09-09 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 09, 2011 at 11:42:54AM -0400, Nick Bowler wrote:
> And after all that, I forgot to CC Russell on these patches.  Oops.

Doesn't matter, I get them anyway (provided lakml is in the cc).

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-09-09 19:02 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 15:26 [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
2011-09-09 15:26 ` Nick Bowler
2011-09-09 15:26 ` Nick Bowler
2011-09-09 15:26 ` [PATCH 1/5] ARM: realview: Use wfi macro in platform_do_lowpower Nick Bowler
2011-09-09 15:26 ` [PATCH 2/5] ARM: exynos4: " Nick Bowler
2011-09-09 15:26   ` Nick Bowler
2011-09-09 15:26 ` [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die Nick Bowler
2011-09-09 15:26   ` Nick Bowler
     [not found] ` <1315582012-23507-1-git-send-email-nbowler-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
2011-09-09 15:26   ` [PATCH 4/5] ARM: tegra: Use wfi macro in platform_do_lowpower Nick Bowler
2011-09-09 15:26     ` Nick Bowler
2011-09-09 15:26 ` [PATCH 5/5] ARM: omap4: Kill private do_wfi macro Nick Bowler
2011-09-09 15:26   ` Nick Bowler
2011-09-09 17:04   ` Santosh
2011-09-09 17:04     ` Santosh
2011-09-09 17:18     ` Nick Bowler
2011-09-09 17:18       ` Nick Bowler
2011-09-09 15:42 ` [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
2011-09-09 15:42   ` Nick Bowler
2011-09-09 15:42   ` Nick Bowler
2011-09-09 19:02   ` Russell King - ARM Linux
2011-09-09 19:02     ` Russell King - ARM Linux
2011-09-09 19:02     ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.