Lines Matching full:mult

24  * clocks_calc_mult_shift - calculate mult/shift factors for scaled math of clocks
25 * @mult: pointer to mult variable
31 * The function evaluates the shift/mult pair for the scaled math
40 * calculated mult and shift factors. This guarantees that no 64bit
42 * multiplied with the calculated mult factor. Larger ranges may
43 * reduce the conversion accuracy by choosing smaller mult and shift
47 clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec) in clocks_calc_mult_shift() argument
63 * Find the conversion shift/mult pair which has the best in clocks_calc_mult_shift()
73 *mult = tmp; in clocks_calc_mult_shift()
222 wd_delay = clocksource_cyc2ns(wd_delta, watchdog->mult, in cs_watchdog_read()
333 cs_nsec = clocksource_cyc2ns(delta, cs->mult, cs->shift); in clocksource_verify_percpu()
392 wd_nsec = clocksource_cyc2ns(delta, watchdog->mult, in clocksource_watchdog()
396 cs_nsec = clocksource_cyc2ns(delta, cs->mult, cs->shift); in clocksource_watchdog()
764 nsec = mul_u64_u32_shr(delta, suspend_clocksource->mult, in clocksource_stop_suspend_timing()
827 ret = (u64)cs->mult * 11; in clocksource_max_adjustment()
834 * @mult: cycle to nanosecond multiplier
836 * @maxadj: maximum adjustment value to mult (~11%)
847 u64 clocks_calc_max_nsecs(u32 mult, u32 shift, u32 maxadj, u64 mask, u64 *max_cyc) in clocks_calc_max_nsecs() argument
856 do_div(max_cycles, mult+maxadj); in clocks_calc_max_nsecs()
865 max_nsecs = clocksource_cyc2ns(max_cycles, mult - maxadj, shift); in clocks_calc_max_nsecs()
884 cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, in clocksource_update_max_deferment()
1036 * Default clocksources are *special* and self-define their mult/shift. in __clocksource_update_freq_scale()
1057 clocks_calc_mult_shift(&cs->mult, &cs->shift, freq, in __clocksource_update_freq_scale()
1081 * Ensure clocksources that have large 'mult' values don't overflow in __clocksource_update_freq_scale()
1085 while (freq && ((cs->mult + cs->maxadj < cs->mult) in __clocksource_update_freq_scale()
1086 || (cs->mult - cs->maxadj > cs->mult))) { in __clocksource_update_freq_scale()
1087 cs->mult >>= 1; in __clocksource_update_freq_scale()
1094 * their mult/shift values and don't specify a freq. in __clocksource_update_freq_scale()
1096 WARN_ONCE(cs->mult + cs->maxadj < cs->mult, in __clocksource_update_freq_scale()
1133 /* Initialize mult/shift and max_idle_ns */ in __clocksource_register_scale()