Re: [patch 08/36] Hexagon: Add delay functions

From: Arnd Bergmann
Date: Wed Aug 17 2011 - 16:41:35 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/