linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nbowler@elliptictech.com (Nick Bowler)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
Date: Fri, 19 Aug 2011 15:26:38 -0400	[thread overview]
Message-ID: <20110819192638.GA21043@elliptictech.com> (raw)
In-Reply-To: <20110819181514.GA12654@gallagher>

On 2011-08-19 19:15 +0100, Jamie Iles wrote:
> On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
[...]
> > -		/*
> > -		 * here's the WFI
> > -		 */
> > -		asm(".word	0xe320f003\n"
> > +		asm("wfi\n"
> >  		    :
> >  		    :
> >  		    : "memory", "cc");
> 
> There's a wfi() macro defined in arch/arm/include/asm/system.h that 
> could be used here.

Indeed, thanks for pointing that out.

I'm a little wary, however: the wfi macro does not include the "cc"
clobber that this code has currently, and I don't know what the
implications of removing it are.  There appears to be no current
users of the wfi macro.

Taking a closer look, there appear to be five platforms that have a
hardcoded WFI just like the above (including the "cc" clobber):
exynos4, realview, shmobile, tegra and vexpress.  omap defines its
own do_wfi macro, *without* the "cc" clobber.

Nevertheless, using the macro seems to work just fine, so I can
certainly re-spin the patch with that instead.

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

  reply	other threads:[~2011-08-19 19:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 18:03 [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower Nick Bowler
2011-08-19 18:15 ` Jamie Iles
2011-08-19 19:26   ` Nick Bowler [this message]
2011-08-19 21:14     ` Jamie Iles
2011-08-22  9:43       ` Catalin Marinas
2011-08-22 13:54         ` [PATCH v2] ARM: vexpress: Use wfi macro " Nick Bowler
2011-08-22 13:59           ` Jamie Iles
2011-08-24 17:51             ` Nick Bowler

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=20110819192638.GA21043@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).