[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 02 of 10] arm: implement udelay()
On 23/02/12 17:40, Tim Deegan wrote: > arm: implement udelay() > > Signed-off-by: Tim Deegan <tim@xxxxxxx> > [...] > 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? David > + } while ( get_s_time() - deadline < 0 ); > +} > + > /* > * Local variables: > * mode: C _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |