From: Nick Bowler <nbowler@elliptictech.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die.
Date: Fri, 09 Sep 2011 15:26:50 +0000 [thread overview]
Message-ID: <1315582012-23507-4-git-send-email-nbowler@elliptictech.com> (raw)
In-Reply-To: <1315582012-23507-1-git-send-email-nbowler@elliptictech.com>
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
next prev parent reply other threads:[~2011-09-09 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 15:26 [PATCH 0/5] Convert ARM subarchitectures to generic wfi macro Nick Bowler
2011-09-09 15:26 ` Nick Bowler [this message]
2011-09-09 15:42 ` Nick Bowler
2011-09-09 19:02 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315582012-23507-4-git-send-email-nbowler@elliptictech.com \
--to=nbowler@elliptictech.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox