]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/i386/kernel/tsc.c
[PATCH] vmi: sched clock paravirt op fix
[net-next-2.6.git] / arch / i386 / kernel / tsc.c
index 3082a418635c11d6f3cdce2b53d3499a3124c075..c9c9d54c91f6589e0f5ded11d7de863c2b2c76be 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/delay.h>
 #include <asm/tsc.h>
 #include <asm/io.h>
+#include <asm/timer.h>
 
 #include "mach_timer.h"
 
@@ -102,9 +103,6 @@ unsigned long long sched_clock(void)
 {
        unsigned long long this_offset;
 
-       if (unlikely(custom_sched_clock))
-               return (*custom_sched_clock)();
-
        /*
         * Fall back to jiffies if there's no TSC available:
         */
@@ -113,7 +111,7 @@ unsigned long long sched_clock(void)
                return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
 
        /* read the Time Stamp Counter: */
-       rdtscll(this_offset);
+       get_scheduled_cycles(this_offset);
 
        /* return the value in ns */
        return cycles_2_ns(this_offset);