From: Prarit Bhargava <prarit@redhat.com> Date: Thu, 23 Apr 2009 14:10:53 -0400 Subject: [x86_64] more cpu_khz to tsc_khz conversions Message-id: 20090423181052.14616.8785.sendpatchset@prarit.bos.redhat.com O-Subject: [RHEL5 PATCH]: More x86_64 cpu_khz to tsc_khz conversions Bugzilla: 483300 RH-Acked-by: Brian Maly <bmaly@redhat.com> RH-Acked-by: Rik van Riel <riel@redhat.com> Fix some additional cpu_khz to tsc_khz issues. RHEL5 commit bff2a8b50e255b474aa8e06e1be1ad6a513284ef converted a bunch of these but a few were left out. Patch is from HP Engineering by way of tcamuso. Successfully compiled and tested by me on an HP AMD, an HP Intel, and several random AMD and Intel boxes in RHTS. Resolves BZ 483300. diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 7670151..ed66286 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -1192,10 +1192,10 @@ void time_init_gtod(void) printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000); vxtime.quot = (NSEC_PER_SEC << NS_SCALE) / vxtime_hz; - vxtime.tsc_quot = (NSEC_PER_MSEC << NS_SCALE) / cpu_khz; + vxtime.tsc_quot = (NSEC_PER_MSEC << NS_SCALE) / tsc_khz; vxtime.last_tsc = get_cycles_sync(); - set_cyc2ns_scale(cpu_khz); + set_cyc2ns_scale(tsc_khz); } __setup("report_lost_ticks", time_setup);