search for: cyc2us_scale

Displaying 2 results from an estimated 2 matches for "cyc2us_scale".

Did you mean: cyc2ns_scale
2007 Apr 18
0
[RFC, PATCH 22/24] i386 Consolidate redundant timer code
...=========== --- linux-2.6.16-rc6.orig/arch/i386/kernel/timers/common.c 2006-01-02 19:21:10.000000000 -0800 +++ linux-2.6.16-rc6/arch/i386/kernel/timers/common.c 2006-03-12 19:57:42.000000000 -0800 @@ -14,6 +14,15 @@ #include "mach_timer.h" +unsigned long cyc2ns_scale; +unsigned long cyc2us_scale; + +void set_cyc_scales(unsigned long cpu_mhz) +{ + cyc2ns_scale = (1000 << CYC2NS_SCALE_FACTOR)/cpu_mhz; + cyc2us_scale = (1 << CYC2US_SCALE_FACTOR)/cpu_mhz; +} + /* ------ Calibrate the TSC ------- * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). * Too mu...
2007 Apr 18
0
[RFC, PATCH 22/24] i386 Consolidate redundant timer code
...=========== --- linux-2.6.16-rc6.orig/arch/i386/kernel/timers/common.c 2006-01-02 19:21:10.000000000 -0800 +++ linux-2.6.16-rc6/arch/i386/kernel/timers/common.c 2006-03-12 19:57:42.000000000 -0800 @@ -14,6 +14,15 @@ #include "mach_timer.h" +unsigned long cyc2ns_scale; +unsigned long cyc2us_scale; + +void set_cyc_scales(unsigned long cpu_mhz) +{ + cyc2ns_scale = (1000 << CYC2NS_SCALE_FACTOR)/cpu_mhz; + cyc2us_scale = (1 << CYC2US_SCALE_FACTOR)/cpu_mhz; +} + /* ------ Calibrate the TSC ------- * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). * Too mu...