* [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro.
@ 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: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
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 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die.
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:42 ` [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
1 sibling, 0 replies; 4+ 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] 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
2011-09-09 15:26 ` [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die Nick Bowler
@ 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
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: 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] 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
2011-09-09 15:26 ` [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die 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