| From | Arnd Bergmann <> | Subject | Re: [patch 08/36] Hexagon: Add delay functions | Date | Wed, 17 Aug 2011 21:38:35 +0200 |
| |
On Wednesday 17 August 2011 11:35:05 Richard Kuo wrote: > +#include <asm/param.h> > + > +extern void __udelay(unsigned long usecs); > + > +#define udelay(usecs) __udelay((usecs)) > + > +extern void __delay(unsigned long loops);
If you have any kind of reliable timer register, it's better to poll that than to rely on a delay loop that is especially inaccurate when running under a hypervisor.
That also speeds up boot time because you no longer need to calibrate the delay loop.
Arnd
|