All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] ARM: add wfi assembly macro
Date: Mon, 3 Dec 2012 15:39:22 +0100	[thread overview]
Message-ID: <201212031539.22757.marex@denx.de> (raw)
In-Reply-To: <50BCA9E2.1000001@gmail.com>

Dear Rob Herring,

> On 12/02/2012 10:58 PM, Marek Vasut wrote:
> > Dear Rob Herring,
> > 
> >> From: Rob Herring <rob.herring@calxeda.com>
> >> 
> >> Since wfi instruction is only available on ARMv7, add a conditional
> >> macro for it.
> >> 
> >> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> >> ---
> >> 
> >>  arch/arm/include/asm/system.h |    6 ++++++
> >>  1 file changed, 6 insertions(+)
> >> 
> >> diff --git a/arch/arm/include/asm/system.h
> >> b/arch/arm/include/asm/system.h index 2b28a26..2f6aecd 100644
> >> --- a/arch/arm/include/asm/system.h
> >> +++ b/arch/arm/include/asm/system.h
> >> @@ -61,6 +61,12 @@
> >> 
> >>  #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
> >> 
> >> +#ifdef __ARM_ARCH_7A__
> >> +#define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
> >> +#else
> >> +#define wfi()
> >> +#endif
> > 
> > Won't this break other (non-arm) systems? Moreover, maybe you can make
> > this an (inline) function instead?
> 
> How? It is in an ARM specific header and empty on anything but ARMv7
> enabled compiler. This follows the kernel implementation and the nop above.

Ok, I missed the arch/arm. It's ok then, sorry for the noise.
[...]

Best regards,
Marek Vasut

  reply	other threads:[~2012-12-03 14:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03  3:06 [U-Boot] [PATCH 1/2] ARM: add wfi assembly macro Rob Herring
2012-12-03  3:06 ` [U-Boot] [PATCH 2/2] ARM: highbank: use wfi macro instead of inline asm Rob Herring
2013-02-03 14:29   ` Albert ARIBAUD
2012-12-03  4:58 ` [U-Boot] [PATCH 1/2] ARM: add wfi assembly macro Marek Vasut
2012-12-03 13:32   ` Rob Herring
2012-12-03 14:39     ` Marek Vasut [this message]
2013-02-03 14:29 ` Albert ARIBAUD

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=201212031539.22757.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.