]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86/kernel/tsc.c
Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86...
[mv-sheeva.git] / arch / x86 / kernel / tsc.c
index ee01cd96b5e12e6b94a7f5d7c20f6f839b4a8d10..599e58168631e22e5ff69e15c365273bd2f9b03c 100644 (file)
@@ -57,7 +57,7 @@ u64 native_sched_clock(void)
        rdtscll(this_offset);
 
        /* return the value in ns */
-       return cycles_2_ns(this_offset);
+       return __cycles_2_ns(this_offset);
 }
 
 /* We need to define a real function for sched_clock, to override the
@@ -829,10 +829,6 @@ void __init tsc_init(void)
                cpu_khz = calibrate_cpu();
 #endif
 
-       lpj = ((u64)tsc_khz * 1000);
-       do_div(lpj, HZ);
-       lpj_fine = lpj;
-
        printk("Detected %lu.%03lu MHz processor.\n",
                        (unsigned long)cpu_khz / 1000,
                        (unsigned long)cpu_khz % 1000);
@@ -852,6 +848,10 @@ void __init tsc_init(void)
        /* now allow native_sched_clock() to use rdtsc */
        tsc_disabled = 0;
 
+       lpj = ((u64)tsc_khz * 1000);
+       do_div(lpj, HZ);
+       lpj_fine = lpj;
+
        use_tsc_delay();
        /* Check and install the TSC clocksource */
        dmi_check_system(bad_tsc_dmi_table);