public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 2011-09-09 15:26 Nick Bowler
       [not found] ` <1315582012-23507-1-git-send-email-nbowler-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
  2011-09-09 15:42 ` [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
  0 siblings, 2 replies; 4+ 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] 4+ messages in thread

* [PATCH 4/5] ARM: tegra: Use wfi macro in platform_do_lowpower.
       [not found] ` <1315582012-23507-1-git-send-email-nbowler-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
@ 2011-09-09 15:26   ` Nick Bowler
  0 siblings, 0 replies; 4+ 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] 4+ 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
       [not found] ` <1315582012-23507-1-git-send-email-nbowler-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
@ 2011-09-09 15:42 ` Nick Bowler
  2011-09-09 19:02   ` Russell King - ARM Linux
  1 sibling, 1 reply; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread

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

Thread overview: 4+ 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
     [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: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