X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fdelay.h;h=f9200a65c632b9421d02b16106feded2eb3eb4eb;hb=8d2169e8d6b8a91413df33bc402e0f602ceaabcc;hp=057a6095547483e36f96b3ba243ae79a13b5fd36;hpb=e7de369050534025b33aab1033358bf47a577e4d;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-powerpc/delay.h b/include/asm-powerpc/delay.h index 057a6095547..f9200a65c63 100644 --- a/include/asm-powerpc/delay.h +++ b/include/asm-powerpc/delay.h @@ -17,5 +17,18 @@ extern void __delay(unsigned long loops); extern void udelay(unsigned long usecs); +/* + * On shared processor machines the generic implementation of mdelay can + * result in large errors. While each iteration of the loop inside mdelay + * is supposed to take 1ms, the hypervisor could sleep our partition for + * longer (eg 10ms). With the right timing these errors can add up. + * + * Since there is no 32bit overflow issue on 64bit kernels, just call + * udelay directly. + */ +#ifdef CONFIG_PPC64 +#define mdelay(n) udelay((n) * 1000) +#endif + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_DELAY_H */