From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] ARM: CSR: add rtc i/o bridge interface for SiRFprimaII
Date: Tue, 23 Aug 2011 17:59:19 +0200 [thread overview]
Message-ID: <201108231759.20014.arnd@arndb.de> (raw)
In-Reply-To: <20110823095354.GK2796@pulham.picochip.com>
On Tuesday 23 August 2011, Jamie Iles wrote:
> On Tue, Aug 23, 2011 at 05:33:39PM +0800, Barry Song wrote:
> > 2011/8/23 Jamie Iles <jamie@jamieiles.com>:
> > > On Mon, Aug 22, 2011 at 11:15:49PM -0700, Barry Song wrote:
> [...]
> > >> +void sirfsoc_rtc_iobrg_wait_sync(void)
> > >> +{
> > >> + while (readl_relaxed(sirfsoc_rtciobrg_base + SIRFSOC_CPUIOBRG_CTRL))
> > >> + continue;
> > >
> > > It might be worth using cpu_relax() here as it includes a memory barrier
> > > that's what many busy wait loops do.
> >
> > yes. generically people add a cpu_relax() in busy wait and that makes
> > lots of senses. it seems readl_relaxed() can keep the execution
> > sequence even without the barrier?
>
> Well readl_relaxed() uses __raw_readl() which marks the dereference as
> volatile, so you should be okay without the cpu_relax() here. Having
> said that, cpu_relax() is a little more explicit, so whatever you think
> most appropriate I guess.
I agree with Jamie, mostly because using cpu_relax in busy loops is
a well-known idiom in the kernel. It's more for documentation purposes
than technically needed here.
Arnd
next prev parent reply other threads:[~2011-08-23 15:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 6:15 [PATCH v2 0/4] ARM: CSR: add rtciobrg and PM support Barry Song
2011-08-23 6:15 ` [PATCH v2 1/4] ARM: CSR: add rtc i/o bridge interface for SiRFprimaII Barry Song
2011-08-23 8:48 ` Jamie Iles
2011-08-23 9:33 ` Barry Song
2011-08-23 9:53 ` Jamie Iles
2011-08-23 15:59 ` Arnd Bergmann [this message]
2011-08-24 1:45 ` Barry Song
2011-08-23 16:01 ` Arnd Bergmann
2011-08-23 16:15 ` Arnd Bergmann
2011-08-24 1:43 ` Barry Song
2011-08-24 1:42 ` Barry Song
2011-08-23 6:15 ` [PATCH v2 2/4] ARM: CSR: add PM sleep entry " Barry Song
2011-08-23 8:50 ` Jamie Iles
2011-08-23 9:08 ` Barry Song
2011-08-23 9:41 ` Russell King - ARM Linux
2011-08-27 9:53 ` Barry Song
2011-08-25 7:27 ` Shawn Guo
2011-08-25 7:30 ` Barry Song
2011-08-25 8:21 ` Shawn Guo
2011-08-25 8:21 ` Barry Song
2011-08-25 8:33 ` Barry Song
2011-08-25 15:56 ` Arnd Bergmann
2011-08-25 22:58 ` Barry Song
2011-08-23 6:15 ` [PATCH v2 3/4] ARM: L2X0: move l2x0_init out of .init section Barry Song
2011-08-23 6:15 ` [PATCH v2 4/4] ARM: CSR: add PM suspend/resume entries for SiRFprimaII L2 cache Barry Song
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=201108231759.20014.arnd@arndb.de \
--to=arnd@arndb.de \
--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).