linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 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:42 ` [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
  0 siblings, 2 replies; 6+ 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] 6+ messages in thread

* [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
  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 17:04   ` Santosh
  2011-09-09 15:42 ` [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
  1 sibling, 1 reply; 6+ 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] 6+ messages in thread

* Re: [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
  2011-09-09 15:26 [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
  2011-09-09 15:26 ` [PATCH 5/5] ARM: omap4: Kill private do_wfi macro Nick Bowler
@ 2011-09-09 15:42 ` Nick Bowler
  2011-09-09 19:02   ` Russell King - ARM Linux
  1 sibling, 1 reply; 6+ 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] 6+ messages in thread

* Re: [PATCH 5/5] ARM: omap4: Kill private do_wfi macro.
  2011-09-09 15:26 ` [PATCH 5/5] ARM: omap4: Kill private do_wfi macro Nick Bowler
@ 2011-09-09 17:04   ` Santosh
  2011-09-09 17:18     ` Nick Bowler
  0 siblings, 1 reply; 6+ 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] 6+ 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
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

* Re: [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
  2011-09-09 15:42 ` [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
@ 2011-09-09 19:02   ` Russell King - ARM Linux
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

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

Thread overview: 6+ 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 ` [PATCH 5/5] ARM: omap4: Kill private do_wfi macro Nick Bowler
2011-09-09 17:04   ` Santosh
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 19:02   ` Russell King - ARM Linux

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).