fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / asm-ia64 / delay.h
index 1b9df23..a30a62f 100644 (file)
@@ -12,7 +12,6 @@
  * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/compiler.h>
@@ -44,6 +43,12 @@ ia64_set_itv (unsigned long val)
        ia64_srlz_d();
 }
 
+static __inline__ unsigned long
+ia64_get_itv (void)
+{
+       return ia64_getreg(_IA64_REG_CR_ITV);
+}
+
 static __inline__ void
 ia64_set_itc (unsigned long val)
 {
@@ -78,14 +83,6 @@ __delay (unsigned long loops)
        ia64_delay_loop (loops - 1);
 }
 
-static __inline__ void
-udelay (unsigned long usecs)
-{
-       unsigned long start = ia64_get_itc();
-       unsigned long cycles = usecs*local_cpu_data->cyc_per_usec;
-
-       while (ia64_get_itc() - start < cycles)
-               /* skip */;
-}
+extern void udelay (unsigned long usecs);
 
 #endif /* _ASM_IA64_DELAY_H */