aboutsummaryrefslogtreecommitdiff
path: root/include/asm-powerpc/delay.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-06-25 15:57:32 +0000
committerSteve French <sfrench@us.ibm.com>2006-06-25 15:57:32 +0000
commitbbe5d235ee201705530a7153b57e141cd77d818b (patch)
treee98c31b4cb2ced6357a87a02596f9ecdbd6dbb26 /include/asm-powerpc/delay.h
parent189acaaef81b1d71aedd0d28810de24160c2e781 (diff)
parentdfd8317d3340f03bc06eba6b58f0ec0861da4a13 (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/asm-powerpc/delay.h')
-rw-r--r--include/asm-powerpc/delay.h13
1 files changed, 13 insertions, 0 deletions
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 */