linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/5] ARM: omap4: Provide do_wfi() for Thumb-2
Date: Fri,  4 Mar 2011 15:33:53 +0000	[thread overview]
Message-ID: <1299252837-18074-2-git-send-email-dave.martin@linaro.org> (raw)
In-Reply-To: <1299252837-18074-1-git-send-email-dave.martin@linaro.org>

For CONFIG_THUMB2_KERNEL, the existing definition of do_wfi() will
insert invalid code into the instruction stream.

Any assembler which can assemble Thumb-2 is guaranteed to accept
the "wfi" mnemonic, so for the Thumb-2 case, just use the mnemonic.

The ARM case is left as-is.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
 arch/arm/mach-omap2/include/mach/omap4-common.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h
index 5b0270b..de441c0 100644
--- a/arch/arm/mach-omap2/include/mach/omap4-common.h
+++ b/arch/arm/mach-omap2/include/mach/omap4-common.h
@@ -17,8 +17,12 @@
  * 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;
-- 
1.7.1

  reply	other threads:[~2011-03-04 15:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 15:33 [PATCH v5 REPOST 0/5] ARM: omap[34]: Thumb-2 compatibility fixes Dave Martin
2011-03-04 15:33 ` Dave Martin [this message]
2011-03-04 15:33 ` [PATCH v5 2/5] ARM: omap4: Convert END() to ENDPROC() for correct linkage with CONFIG_THUMB2_KERNEL Dave Martin
2011-03-04 15:33 ` [PATCH v5 3/5] ARM: omap3: Remove hand-encoded SMC instructions Dave Martin
2011-03-04 15:33 ` [PATCH v5 4/5] ARM: omap3: Thumb-2 compatibility for sram34xx.S Dave Martin
2011-03-04 15:33 ` [PATCH v5 5/5] ARM: omap3: Thumb-2 compatibility for sleep34xx.S Dave Martin
2011-03-04 17:35 ` [PATCH v5 REPOST 0/5] ARM: omap[34]: Thumb-2 compatibility fixes Dave Martin
2011-03-04 17:38   ` Santosh Shilimkar
2011-03-04 17:47     ` Tony Lindgren
2011-03-04 18:16       ` Dave Martin
2011-03-04 21:42         ` Kevin Hilman
2011-03-04 21:55           ` Nicolas Pitre
2011-03-07 10:26           ` Dave Martin
2011-03-07 21:35     ` Kevin Hilman
2011-03-08  5:53       ` Santosh Shilimkar
2011-03-07 22:09 ` Kevin Hilman
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17 12:42 [PATCH v5 " Dave Martin
2011-02-17 12:42 ` [PATCH v5 1/5] ARM: omap4: Provide do_wfi() for Thumb-2 Dave Martin

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=1299252837-18074-2-git-send-email-dave.martin@linaro.org \
    --to=dave.martin@linaro.org \
    --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).