Lines Matching refs:u64
17 const PIT_TICK_RATE: u64 = 1193182;
22 static mut TSC_KHZ: u64 = 0;
23 static mut CPU_KHZ: u64 = 0;
26 const DEFAULT_THRESHOLD: u64 = 0x20000;
106 fn calibrate_cpu_by_pit_hpet_ptimer() -> Result<u64, SystemError> { in calibrate_cpu_by_pit_hpet_ptimer()
113 let mut tsc_pit_min = u64::MAX; in calibrate_cpu_by_pit_hpet_ptimer()
114 let mut tsc_ref_min = u64::MAX; in calibrate_cpu_by_pit_hpet_ptimer()
137 let tsc_pit_khz = Self::pit_calibrate_tsc(latch, ms, loopmin).unwrap_or(u64::MAX); in calibrate_cpu_by_pit_hpet_ptimer()
154 if tsc1 == u64::MAX || tsc2 == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
183 if i == 1 && tsc_pit_min == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
190 if tsc_pit_min == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
199 if tsc_ref_min == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
218 if tsc_ref_min == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
241 fn pit_calibrate_tsc(latch: u64, ms: u64, loopmin: u64) -> Option<u64> { in pit_calibrate_tsc() argument
266 let mut tsc = CurrentTimeArch::get_cycles() as u64; in pit_calibrate_tsc()
271 let mut tscmin = u64::MAX; in pit_calibrate_tsc()
273 t2 = CurrentTimeArch::get_cycles() as u64; in pit_calibrate_tsc()
311 fn read_refs(hpet_enabled: bool) -> (u64, u64) { in read_refs() argument
320 let t1 = CurrentTimeArch::get_cycles() as u64; in read_refs()
326 let t2 = CurrentTimeArch::get_cycles() as u64; in read_refs()
333 return (u64::MAX, ref_ret); in read_refs()
339 fn calc_hpet_ref(mut deltatsc: u64, ref1: u64, mut ref2: u64) -> u64 { in calc_hpet_ref() argument
355 fn calc_pmtimer_ref(mut deltatsc: u64, ref1: u64, mut ref2: u64) -> u64 { in calc_pmtimer_ref() argument
357 return u64::MAX; in calc_pmtimer_ref()
375 pub fn tsc_khz() -> u64 { in tsc_khz()
379 pub fn cpu_khz() -> u64 { in cpu_khz()
383 fn set_cpu_khz(khz: u64) { in set_cpu_khz() argument
389 fn set_tsc_khz(khz: u64) { in set_tsc_khz() argument