public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamie Iles <jamie@jamieiles.com>
To: Nick Bowler <nbowler@elliptictech.com>
Cc: Jamie Iles <jamie@jamieiles.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
Date: Fri, 19 Aug 2011 22:14:02 +0100	[thread overview]
Message-ID: <20110819211402.GB12654@gallagher> (raw)
In-Reply-To: <20110819192638.GA21043@elliptictech.com>

On Fri, Aug 19, 2011 at 03:26:38PM -0400, Nick Bowler wrote:
> 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.

As far as I can tell from the ARM ARM, the instruction shouldn't alter 
the condition flags so the cc clobber shouldn't be necessary.  I'm not 
sure that my reading of the ARM ARM should be considered authoritative 
though!

Jamie

  reply	other threads:[~2011-08-19 21:14 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
2011-08-19 21:14     ` Jamie Iles [this message]
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=20110819211402.GB12654@gallagher \
    --to=jamie@jamieiles.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nbowler@elliptictech.com \
    /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