From: nbowler@elliptictech.com (Nick Bowler)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ARM: tegra: Use wfi macro in platform_do_lowpower.
Date: Fri, 9 Sep 2011 11:26:51 -0400 [thread overview]
Message-ID: <1315582012-23507-5-git-send-email-nbowler@elliptictech.com> (raw)
In-Reply-To: <1315582012-23507-1-git-send-email-nbowler@elliptictech.com>
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
next prev parent reply other threads:[~2011-09-09 15:26 UTC|newest]
Thread overview: 10+ 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 ` [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 ` [PATCH 3/5] ARM: shmobile: Use wfi macro in platform_cpu_die Nick Bowler
2011-09-09 15:26 ` Nick Bowler [this message]
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
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-5-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;
as well as URLs for NNTP newsgroup(s).