Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / x86_64 / lib / delay.c
index 05689cc..03c460c 100644 (file)
 #include <linux/sched.h>
 #include <linux/delay.h>
 #include <asm/delay.h>
+#include <asm/msr.h>
 
 #ifdef CONFIG_SMP
 #include <asm/smp.h>
 #endif
 
-int x86_udelay_tsc = 0;                /* Delay via TSC */
+int read_current_timer(unsigned long *timer_value)
+{
+       rdtscll(*timer_value);
+       return 0;
+}
 
 void __delay(unsigned long loops)
 {
-       unsigned long bclock, now;
+       unsigned bclock, now;
        
        rdtscl(bclock);
        do
@@ -34,7 +39,7 @@ void __delay(unsigned long loops)
 
 inline void __const_udelay(unsigned long xloops)
 {
-       __delay(((xloops * cpu_data[_smp_processor_id()].loops_per_jiffy) >> 32) * HZ);
+       __delay((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32);
 }
 
 void __udelay(unsigned long usecs)