From: Tim Deegan <tim@xen.org>
To: David Vrabel <dvrabel@cantab.net>
Cc: xen-devel@lists.xensource.com,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH 02 of 10] arm: implement udelay()
Date: Mon, 27 Feb 2012 19:19:28 +0000 [thread overview]
Message-ID: <20120227191928.GA98737@ocelot.phlegethon.org> (raw)
In-Reply-To: <4F468D9A.3050000@cantab.net>
At 19:03 +0000 on 23 Feb (1330023834), David Vrabel wrote:
> On 23/02/12 17:40, Tim Deegan wrote:
> > arm: implement udelay()
> >
> > Signed-off-by: Tim Deegan <tim@xen.org>
> >
> [...]
> > diff -r 4a7c14209131 -r ec051056db2b xen/arch/arm/time.c
> > --- a/xen/arch/arm/time.c Thu Feb 23 17:39:59 2012 +0000
> > +++ b/xen/arch/arm/time.c Thu Feb 23 17:39:59 2012 +0000
> > @@ -171,6 +171,16 @@ void __cpuinit init_timer_interrupt(void
> > request_irq(30, timer_interrupt, 0, "phytimer", NULL);
> > }
> >
> > +/* Wait a set number of microseconds */
> > +void udelay(unsigned long usecs)
> > +{
> > + s_time_t deadline = get_s_time() + 1000 * (s_time_t) usecs;
> > + do {
> > + dsb();
> > + isb();
>
> What are these barriers for?
To make sure the CPU doesn't hoist any instructions past the wait
loop. :) They don't really have to be inside the loop body; I can
change that if you like.
Tim.
next prev parent reply other threads:[~2012-02-27 19:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 17:40 [PATCH 00 of 10] arm: SMP boot Tim Deegan
2012-02-23 17:40 ` [PATCH 01 of 10] arm: strip xen binary Tim Deegan
2012-02-23 17:40 ` [PATCH 02 of 10] arm: implement udelay() Tim Deegan
2012-02-23 19:03 ` David Vrabel
2012-02-27 19:19 ` Tim Deegan [this message]
2012-02-23 17:40 ` [PATCH 03 of 10] arm: Move some GIC distributor init out of the per-CPU init function Tim Deegan
2012-02-27 17:32 ` Ian Campbell
2012-02-27 19:30 ` Tim Deegan
2012-02-28 10:24 ` Ian Campbell
2012-02-23 17:40 ` [PATCH 04 of 10] arm: Handle booting on SMP platforms Tim Deegan
2012-02-23 17:40 ` [PATCH 05 of 10] arm: More SMP bringup Tim Deegan
2012-02-23 19:16 ` Ian Campbell
2012-02-27 19:20 ` Tim Deegan
2012-02-23 17:40 ` [PATCH 06 of 10] arm: per-cpu areas Tim Deegan
2012-02-28 10:25 ` Ian Campbell
2012-02-23 17:40 ` [PATCH 07 of 10] arm: start plumbing in SMP bringup in C Tim Deegan
2012-02-28 10:27 ` Ian Campbell
2012-02-23 17:40 ` [PATCH 08 of 10] arm: Boot secondary CPUs into C Tim Deegan
2012-02-28 10:34 ` Ian Campbell
2012-02-23 17:40 ` [PATCH 09 of 10] arm: SMP CPU shutdown Tim Deegan
2012-02-28 10:38 ` Ian Campbell
2012-02-28 18:13 ` Tim Deegan
2012-02-23 17:40 ` [PATCH 10 of 10] arm: Shutdown and reboot Tim Deegan
2012-02-28 10:39 ` Ian Campbell
2012-02-28 10:18 ` [PATCH 00 of 10] arm: SMP boot Ian Campbell
2012-02-29 14:36 ` Ian Campbell
2012-02-29 22:22 ` Tim Deegan
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=20120227191928.GA98737@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=dvrabel@cantab.net \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).