Lines Matching full:mult
22 * clocks_calc_mult_shift - calculate mult/shift factors for scaled math of clocks
23 * @mult: pointer to mult variable
29 * The function evaluates the shift/mult pair for the scaled math
38 * calculated mult and shift factors. This guarantees that no 64bit
40 * multiplied with the calculated mult factor. Larger ranges may
41 * reduce the conversion accuracy by chosing smaller mult and shift
45 clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec) in clocks_calc_mult_shift() argument
61 * Find the conversion shift/mult pair which has the best in clocks_calc_mult_shift()
71 *mult = tmp; in clocks_calc_mult_shift()
224 wd_nsec = clocksource_cyc2ns(delta, watchdog->mult, in clocksource_watchdog()
228 cs_nsec = clocksource_cyc2ns(delta, cs->mult, cs->shift); in clocksource_watchdog()
583 nsec = mul_u64_u32_shr(delta, suspend_clocksource->mult, in clocksource_stop_suspend_timing()
646 ret = (u64)cs->mult * 11; in clocksource_max_adjustment()
653 * @mult: cycle to nanosecond multiplier
655 * @maxadj: maximum adjustment value to mult (~11%)
666 u64 clocks_calc_max_nsecs(u32 mult, u32 shift, u32 maxadj, u64 mask, u64 *max_cyc) in clocks_calc_max_nsecs() argument
675 do_div(max_cycles, mult+maxadj); in clocks_calc_max_nsecs()
684 max_nsecs = clocksource_cyc2ns(max_cycles, mult - maxadj, shift); in clocks_calc_max_nsecs()
703 cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, in clocksource_update_max_deferment()
863 * Default clocksources are *special* and self-define their mult/shift. in __clocksource_update_freq_scale()
884 clocks_calc_mult_shift(&cs->mult, &cs->shift, freq, in __clocksource_update_freq_scale()
888 * Ensure clocksources that have large 'mult' values don't overflow in __clocksource_update_freq_scale()
892 while (freq && ((cs->mult + cs->maxadj < cs->mult) in __clocksource_update_freq_scale()
893 || (cs->mult - cs->maxadj > cs->mult))) { in __clocksource_update_freq_scale()
894 cs->mult >>= 1; in __clocksource_update_freq_scale()
901 * their mult/shift values and don't specify a freq. in __clocksource_update_freq_scale()
903 WARN_ONCE(cs->mult + cs->maxadj < cs->mult, in __clocksource_update_freq_scale()
938 /* Initialize mult/shift and max_idle_ns */ in __clocksource_register_scale()