Home
last modified time | relevance | path

Searched refs:div64_u64 (Results 1 – 25 of 92) sorted by relevance

1234

/Linux-v4.19/lib/
Ddiv64.c141 #ifndef div64_u64
142 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() function
161 EXPORT_SYMBOL(div64_u64);
174 quot = div64_u64(abs(dividend), abs(divisor)); in div64_s64()
/Linux-v4.19/drivers/clk/
Dclk-si570.c154 data->fxtal = div64_u64(fdco << 24, data->rfreq >> 4); in si570_get_defaults()
156 data->fxtal = div64_u64(fdco << 28, data->rfreq); in si570_get_defaults()
216 *out_rfreq = div64_u64(fdco << 28, data->fxtal); in si570_calc_divs()
260 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_round_rate()
262 rfreq = div64_u64((data->rfreq * rate) + in si570_round_rate()
263 div64_u64(data->frequency, 2), data->frequency); in si570_round_rate()
330 data->rfreq = div64_u64((data->rfreq * frequency) + in si570_set_frequency_small()
355 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_set_rate()
/Linux-v4.19/drivers/gpu/drm/amd/display/modules/freesync/
Dfreesync.c444 min_frame_duration_in_ns = ((unsigned int) (div64_u64( in calc_freesync_range()
447 max_frame_duration_in_ns = ((unsigned int) (div64_u64( in calc_freesync_range()
457 state->freesync_range.vmax = div64_u64(div64_u64(((unsigned long long)( in calc_freesync_range()
460 state->freesync_range.vmin = div64_u64(div64_u64(((unsigned long long)( in calc_freesync_range()
497 *v_total_nominal = div64_u64(div64_u64(((unsigned long long)( in calc_v_total_from_duration()
512 unsigned int frame_duration_ratio = div64_u64(1000000, in calc_v_total_for_static_ramp()
513 (1000 + div64_u64(((unsigned long long)( in calc_v_total_for_static_ramp()
519 unsigned int frame_duration_delta = div64_u64(((unsigned long long)( in calc_v_total_for_static_ramp()
526 unsigned int ramp_rate_interpolated = div64_u64(((unsigned long long)( in calc_v_total_for_static_ramp()
537 frame_duration = ((unsigned int) (div64_u64( in calc_v_total_for_static_ramp()
[all …]
/Linux-v4.19/include/linux/
Dmath64.h11 #define div64_ul(x, y) div64_u64((x), (y))
65 static inline u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() function
103 #ifndef div64_u64
104 extern u64 div64_u64(u64 dividend, u64 divisor);
/Linux-v4.19/drivers/pwm/
Dpwm-bcm-iproc.c110 state->period = div64_u64(tmp, rate); in iproc_pwmc_get_state()
114 state->duty_cycle = div64_u64(tmp, rate); in iproc_pwmc_get_state()
142 period = div64_u64(value, div); in iproc_pwmc_apply()
144 duty = div64_u64(value, div); in iproc_pwmc_apply()
Dpwm-lpc32xx.c43 period_cycles = div64_u64(c * period_ns, in lpc32xx_pwm_config()
51 duty_cycles = div64_u64((unsigned long long)(period_ns - duty_ns) * 256, in lpc32xx_pwm_config()
Dpwm-spear.c100 pv = div64_u64(val, div); in spear_pwm_config()
102 dc = div64_u64(val, div); in spear_pwm_config()
Dpwm-mtk-disp.c102 period = div64_u64(rate * period_ns, div); in mtk_disp_pwm_config()
106 high_width = div64_u64(rate * duty_ns, div); in mtk_disp_pwm_config()
Dpwm-bcm-kona.c136 pc = div64_u64(val, div); in kona_pwmc_config()
138 dc = div64_u64(val, div); in kona_pwmc_config()
/Linux-v4.19/net/netfilter/
Dnft_limit.c161 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init()
186 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval()
263 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init()
290 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval()
Dxt_connbytes.c88 what = div64_u64(bytes, pkts); in connbytes_mt()
Dxt_hashlimit.c509 return div64_u64(user, div64_u64(scale, HZ * cpj)); in user2credits()
511 return user * div64_u64(HZ * cpj, scale); in user2credits()
524 return div64_u64(XT_HASHLIMIT_SCALE_v2, user); in user2rate()
/Linux-v4.19/drivers/acpi/
Dacpi_lpit.c45 *counter = div64_u64(count * 1000000ULL, residency_info_mem.frequency); in lpit_read_residency_counter_us()
57 *counter = div64_u64(*counter * 1000000ULL, residency_info_ffh.frequency); in lpit_read_residency_counter_us()
/Linux-v4.19/net/dccp/ccids/lib/
Dtfrc.h34 return div64_u64(a * 1000000, b); in scaled_div()
/Linux-v4.19/drivers/iio/common/ssp_sensors/
Dssp_iio_sensor.h70 return div64_u64((u64)SSP_FACTOR_WITH_MS, value); in ssp_convert_to_time()
/Linux-v4.19/arch/x86/kernel/cpu/
Daperfmperf.c63 s->khz = div64_u64((cpu_khz * aperf_delta), mperf_delta); in aperfmperf_snapshot_khz()
/Linux-v4.19/drivers/clk/pistachio/
Dclk-pll.c100 return div64_u64(dividend, divisor); in do_div_round_closest()
215 vco = div64_u64(vco, params->refdiv << 24); in pll_gf40lp_frac_set_rate()
221 val = div64_u64(params->fref, params->refdiv); in pll_gf40lp_frac_set_rate()
/Linux-v4.19/block/
Dblk-iolatency.c372 samples_thresh = div64_u64(samples_thresh, 100); in check_scale_change()
513 div64_u64(iolat->cur_win_nsec, in iolatency_check_latencies()
842 unsigned long long avg_lat = div64_u64(iolat->lat_avg, NSEC_PER_USEC); in iolatency_pd_stat()
843 unsigned long long cur_win = div64_u64(iolat->cur_win_nsec, NSEC_PER_MSEC); in iolatency_pd_stat()
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dclock.c313 cycles_delta = div64_u64(nsec_delta << clock->cycles.shift, in mlx5_perout_configure()
477 cycles_delta = div64_u64(nsec_delta << clock->cycles.shift, in mlx5_pps_event()
520 overflow_cycles = div64_u64(~0ULL >> 1, clock->cycles.mult); in mlx5_init_clock()
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx4/
Den_clock.c257 u64 max_mul = div64_u64(ULLONG_MAX, max_val_cycles_rounded); in freq_to_shift()
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/dcn10/
Ddcn10_optc.c143 unsigned long long req_delta_tens_of_usec = div64_u64((vsync_delta + 9999), 10000); in optc1_program_vline_interrupt()
144 unsigned long long pix_clk_hundreds_khz = div64_u64((dc_crtc_timing->pix_clk_khz + 99), 100); in optc1_program_vline_interrupt()
145 uint32_t req_delta_lines = (uint32_t) div64_u64( in optc1_program_vline_interrupt()
/Linux-v4.19/drivers/video/fbdev/omap2/omapfb/dss/
Ddsi.c4338 #define TO_DSI_T(x) ((u32)div64_u64((u64)x * 1000000000llu, byteclk)) in print_dsi_vm()
4369 #define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck)) in print_dispc_vm()
4398 pck = (u32)div64_u64(dsi_tput, t->bitspp); in print_dsi_dispc_vm()
4403 vm.hsw = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk); in print_dsi_dispc_vm()
4404 vm.hbp = div64_u64((u64)t->hbp * pck, byteclk); in print_dsi_dispc_vm()
4405 vm.hfp = div64_u64((u64)t->hfp * pck, byteclk); in print_dsi_dispc_vm()
4570 dsi_htot = div64_u64((u64)panel_htot * byteclk, req_pck_nom); in dsi_vm_calc_blanking()
4580 dispc_htot = div64_u64((u64)dsi_htot * dispc_pck, byteclk); in dsi_vm_calc_blanking()
4603 hsa = div64_u64((u64)req_vm->hsw * byteclk, req_pck_nom); in dsi_vm_calc_blanking()
4607 hbp = div64_u64((u64)req_vm->hbp * byteclk, req_pck_nom); in dsi_vm_calc_blanking()
[all …]
/Linux-v4.19/drivers/gpu/drm/omapdrm/dss/
Ddsi.c4339 #define TO_DSI_T(x) ((u32)div64_u64((u64)x * 1000000000llu, byteclk)) in print_dsi_vm()
4370 #define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck)) in print_dispc_vm()
4399 pck = (u32)div64_u64(dsi_tput, t->bitspp); in print_dsi_dispc_vm()
4404 vm.hsync_len = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk); in print_dsi_dispc_vm()
4405 vm.hback_porch = div64_u64((u64)t->hbp * pck, byteclk); in print_dsi_dispc_vm()
4406 vm.hfront_porch = div64_u64((u64)t->hfp * pck, byteclk); in print_dsi_dispc_vm()
4574 dsi_htot = div64_u64((u64)panel_htot * byteclk, req_pck_nom); in dsi_vm_calc_blanking()
4584 dispc_htot = div64_u64((u64)dsi_htot * dispc_pck, byteclk); in dsi_vm_calc_blanking()
4607 hsa = div64_u64((u64)req_vm->hsync_len * byteclk, req_pck_nom); in dsi_vm_calc_blanking()
4611 hbp = div64_u64((u64)req_vm->hback_porch * byteclk, req_pck_nom); in dsi_vm_calc_blanking()
[all …]
/Linux-v4.19/drivers/media/platform/ti-vpe/
Dsc.c205 lin_acc_inc = div64_u64(((u64)(src_w >> dcm_shift) - 1) << 24, lltmp); in sc_config_scaler()
/Linux-v4.19/drivers/powercap/
Dintel_rapl.c735 return div64_u64(value, units) * scale; in rapl_unit_xlate()
739 return div64_u64(value, scale); in rapl_unit_xlate()
1073 f = div64_u64(4 * (value - (1 << y)), 1 << y); in rapl_compute_time_window_core()
1089 value = div64_u64(value, rp->time_unit); in rapl_compute_time_window_atom()

1234