From: Ingo Molnar Date: Wed, 25 Jun 2008 10:30:10 +0000 (+0200) Subject: Merge branch 'linus' into x86/delay X-Git-Tag: v2.6.27-rc1~1106^2~249^3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28f73e51d0f64a5b896ad816ab8df6f3bcec5810;p=linux-2.6 Merge branch 'linus' into x86/delay Conflicts: arch/x86/kernel/tsc_32.c Signed-off-by: Ingo Molnar --- 28f73e51d0f64a5b896ad816ab8df6f3bcec5810 diff --cc arch/x86/kernel/tsc_32.c index 048baab772,65b70637ad..0065426f15 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c @@@ -402,13 -404,9 +405,10 @@@ static inline void check_geode_tsc_reli void __init tsc_init(void) { int cpu; + u64 lpj; - if (!cpu_has_tsc || tsc_disabled) { - /* Disable the TSC in case of !cpu_has_tsc */ - tsc_disabled = 1; + if (!cpu_has_tsc || tsc_disabled > 0) return; - } cpu_khz = calculate_cpu_khz(); tsc_khz = cpu_khz; @@@ -418,15 -416,9 +418,13 @@@ return; } + lpj = ((u64)tsc_khz * 1000); + do_div(lpj, HZ); + lpj_fine = lpj; + + /* now allow native_sched_clock() to use rdtsc */ + tsc_disabled = 0; + printk("Detected %lu.%03lu MHz processor.\n", (unsigned long)cpu_khz / 1000, (unsigned long)cpu_khz % 1000);