Home
last modified time | relevance | path

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

1234567

/linux-6.6.21/lib/math/
Ddiv64.c137 #ifndef div64_u64
138 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() function
157 EXPORT_SYMBOL(div64_u64);
165 quot = div64_u64(abs(dividend), abs(divisor)); in div64_s64()
222 return res + div64_u64(a * b, c); in mul_u64_u64_div_u64()
/linux-6.6.21/drivers/clk/
Dclk-si570.c149 data->fxtal = div64_u64(fdco << 24, data->rfreq >> 4); in si570_get_defaults()
151 data->fxtal = div64_u64(fdco << 28, data->rfreq); in si570_get_defaults()
211 *out_rfreq = div64_u64(fdco << 28, data->fxtal); in si570_calc_divs()
255 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_round_rate()
257 rfreq = div64_u64((data->rfreq * rate) + in si570_round_rate()
258 div64_u64(data->frequency, 2), data->frequency); in si570_round_rate()
325 data->rfreq = div64_u64((data->rfreq * frequency) + in si570_set_frequency_small()
350 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_set_rate()
Dclk-versaclock7.c743 refin_div = div64_u64(xtal_rate, vc7->clk_apll.xo_ib_h_div); in vc7_get_apll_rate()
777 *div_frac = div64_u64(rem << VC7_FOD_DENOMINATOR_BITS, rate); in vc7_calc_fod_1st_stage()
794 return div64_u64(parent_rate, fod_1st_int); in vc7_calc_fod_1st_stage_rate()
812 return div64_u64(fod_1st_stage_rate >> 1, fod_2nd_int); in vc7_calc_fod_2nd_stage_rate()
973 iod_rate = div64_u64(parent_rate, iod->iod_int); in vc7_iod_recalc_rate()
990 iod_rate = div64_u64(*parent_rate, iod->iod_int); in vc7_iod_round_rate()
1016 iod_rate = div64_u64(parent_rate, iod->iod_int); in vc7_iod_set_rate()
/linux-6.6.21/include/linux/
Dmath64.h13 #define div64_ul(x, y) div64_u64((x), (y))
67 static inline u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() function
105 #ifndef div64_u64
106 extern u64 div64_u64(u64 dividend, u64 divisor);
302 ({ u64 _tmp = (d); div64_u64((ll) + _tmp - 1, _tmp); })
315 ({ u64 _tmp = (divisor); div64_u64((dividend) + _tmp / 2, _tmp); })
/linux-6.6.21/drivers/gpu/drm/amd/display/modules/freesync/
Dfreesync.c95 ((unsigned int)(div64_u64((1000000000ULL * 1000000),
105 ((unsigned int)(div64_u64((1000000000ULL * 1000), in calc_duration_in_us_from_refresh_in_uhz()
116 (unsigned int)(div64_u64(((unsigned long long)(v_total) in calc_duration_in_us_from_v_total()
131 ((unsigned int)(div64_u64((1000000000ULL * 1000000), in mod_freesync_calc_v_total_from_refresh()
134 v_total = div64_u64(div64_u64(((unsigned long long)( in mod_freesync_calc_v_total_from_refresh()
168 v_total = div64_u64(div64_u64(((unsigned long long)( in calc_v_total_from_duration()
199 unsigned int frame_duration_ratio = div64_u64(1000000, in update_v_total_for_static_ramp()
200 (1000 + div64_u64(((unsigned long long)( in update_v_total_for_static_ramp()
206 unsigned int frame_duration_delta = div64_u64(((unsigned long long)( in update_v_total_for_static_ramp()
213 unsigned int ramp_rate_interpolated = div64_u64(((unsigned long long)( in update_v_total_for_static_ramp()
[all …]
/linux-6.6.21/drivers/gpu/drm/amd/display/dc/
Ddc_dmub_srv.c470 drr_frame_us = div64_u64(((uint64_t)drr_timing->v_total * drr_timing->h_total * 1000000), in populate_subvp_cmd_drr_info()
473 …mall_region_us = div64_u64(((uint64_t)phantom_timing->v_addressable * phantom_timing->h_total * 10… in populate_subvp_cmd_drr_info()
476 …min_vtotal_supported = div64_u64(((uint64_t)drr_timing->pix_clk_100hz * 100 * min_drr_supported_us… in populate_subvp_cmd_drr_info()
479 …prefetch_us = div64_u64(((uint64_t)(phantom_timing->v_total - phantom_timing->v_front_porch) * pha… in populate_subvp_cmd_drr_info()
481 …subvp_active_us = div64_u64(((uint64_t)main_timing->v_addressable * main_timing->h_total * 1000000… in populate_subvp_cmd_drr_info()
483 drr_active_us = div64_u64(((uint64_t)drr_timing->v_addressable * drr_timing->h_total * 1000000), in populate_subvp_cmd_drr_info()
485 max_drr_vblank_us = div64_u64((subvp_active_us - prefetch_us - in populate_subvp_cmd_drr_info()
489 …max_vtotal_supported = div64_u64(((uint64_t)drr_timing->pix_clk_100hz * 100 * max_drr_supported_us… in populate_subvp_cmd_drr_info()
585 …subvp0_prefetch_us = div64_u64(((uint64_t)(phantom_timing0->v_total - phantom_timing0->v_front_por… in update_subvp_prefetch_end_to_mall_start()
588 …subvp1_prefetch_us = div64_u64(((uint64_t)(phantom_timing1->v_total - phantom_timing1->v_front_por… in update_subvp_prefetch_end_to_mall_start()
[all …]
/linux-6.6.21/drivers/pwm/
Dpwm-bcm-iproc.c105 state->period = div64_u64(tmp, rate); in iproc_pwmc_get_state()
109 state->duty_cycle = div64_u64(tmp, rate); in iproc_pwmc_get_state()
139 period = div64_u64(value, div); in iproc_pwmc_apply()
141 duty = div64_u64(value, div); in iproc_pwmc_apply()
Dpwm-lpc32xx.c39 period_cycles = div64_u64(c * period_ns, in lpc32xx_pwm_config()
47 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()
/linux-6.6.21/net/netfilter/
Dnft_limit.c86 u64 tmp = div64_u64(priv->nsecs, priv->rate); in nft_limit_init()
100 tokens = div64_u64(tmp, priv->rate); in nft_limit_init()
206 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init()
253 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval()
349 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init()
385 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval()
/linux-6.6.21/kernel/dma/
Dmap_benchmark.c158 map->bparam.avg_map_100ns = div64_u64(sum_map, loops); in do_map_benchmark()
159 map->bparam.avg_unmap_100ns = div64_u64(sum_unmap, loops); in do_map_benchmark()
162 map_variance = div64_u64(sum_sq_map, loops) - in do_map_benchmark()
165 unmap_variance = div64_u64(sum_sq_unmap, loops) - in do_map_benchmark()
/linux-6.6.21/drivers/acpi/
Dacpi_lpit.c38 *counter = div64_u64(count * 1000000ULL, residency_info_mem.frequency); in lpit_read_residency_counter_us()
50 *counter = div64_u64(*counter * 1000000ULL, residency_info_ffh.frequency); in lpit_read_residency_counter_us()
/linux-6.6.21/drivers/gpu/drm/amd/display/amdgpu_dm/
Damdgpu_dm_psr.c158 vsync_rate_hz = div64_u64(div64_u64(( in amdgpu_dm_psr_enable()
/linux-6.6.21/arch/arm64/kernel/
Dtopology.c139 ratio = div64_u64(ratio, max_rate); in freq_inv_set_max_ratio()
177 scale = div64_u64(scale >> SCHED_CAPACITY_SHIFT, in amu_scale_freq_tick()
/linux-6.6.21/drivers/gpu/drm/i915/gt/
Dselftest_rc6.c77 rc0_power = div64_u64(NSEC_PER_SEC * rc0_power, in live_rc6_manual()
106 rc6_power = div64_u64(NSEC_PER_SEC * rc6_power, in live_rc6_manual()
/linux-6.6.21/drivers/cpufreq/
Dcppc_cpufreq.c131 local_freq_scale = div64_u64(perf, cpu_data->perf_caps.highest_perf); in cppc_scale_freq_workfn()
342 offset = caps->nominal_freq - div64_u64(caps->nominal_perf * mul, div); in cppc_cpufreq_perf_to_khz()
350 retval = offset + div64_u64(perf * mul, div); in cppc_cpufreq_perf_to_khz()
367 offset = caps->nominal_perf - div64_u64(caps->nominal_freq * mul, div); in cppc_cpufreq_khz_to_perf()
375 retval = offset + div64_u64(freq * mul, div); in cppc_cpufreq_khz_to_perf()
/linux-6.6.21/net/dccp/ccids/lib/
Dtfrc.h30 return div64_u64(a * 1000000, b); in scaled_div()
/linux-6.6.21/drivers/iio/common/ssp_sensors/
Dssp_iio_sensor.h70 return div64_u64((u64)SSP_FACTOR_WITH_MS, value); in ssp_convert_to_time()
/linux-6.6.21/scripts/coccinelle/misc/
Ddo_div.cocci120 coccilib.org.print_todo(p[0], construct_warnings("div64_u64"))
155 coccilib.report.print_report(p[0], construct_warnings("div64_u64"))
/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dbpf_cubic.c115 static __always_inline __u64 div64_u64(__u64 dividend, __u64 divisor) in div64_u64() function
120 #define div64_ul div64_u64
258 x = (2 * x + (__u32)div64_u64(a, (__u64)x * (__u64)(x - 1))); in cubic_root()
/linux-6.6.21/block/
Dblk-iolatency.c236 u64 thresh = div64_u64(stat->ps.total, 10); in latency_sum_ok()
267 div64_u64(iolat->cur_win_nsec, in iolat_update_total_lat_avg()
441 samples_thresh = max(1ULL, div64_u64(samples_thresh, 100)); in check_scale_change()
955 avg_lat = div64_u64(iolat->lat_avg, NSEC_PER_USEC); in iolatency_pd_stat()
956 cur_win = div64_u64(iolat->cur_win_nsec, NSEC_PER_MSEC); in iolatency_pd_stat()
Dblk-iocost.c797 ioc->timer_slack_ns = div64_u64( in ioc_refresh_period_us()
831 vrate_pct = div64_u64(ioc->vtime_base_rate * 100, VTIME_PER_USEC); in ioc_autop_idx()
1015 vrate = div64_u64(vrate * (100 + VRATE_CLAMP_ADJ_PCT), 100); in ioc_adjust_base_vrate()
1018 vrate = div64_u64(vrate * (100 - VRATE_CLAMP_ADJ_PCT), 100); in ioc_adjust_base_vrate()
1204 hwa = div64_u64((u64)hwa * active, active_sum); in current_hweight()
1207 hwi = div64_u64((u64)hwi * inuse, inuse_sum); in current_hweight()
1238 hwm = div64_u64((u64)hwm * inuse, child_inuse_sum); in current_hweight_max()
1366 delay = iocg->delay >> div64_u64(tdelta, USEC_PER_SEC); in iocg_kick_delay()
1623 *rq_wait_pct_p = div64_u64(rq_wait_ns * 100, in ioc_lat_stat()
1709 iocg->usage_delta_us = div64_u64(vusage_delta, ioc->vtime_base_rate); in iocg_flush_stat_leaf()
[all …]
/linux-6.6.21/arch/x86/kernel/cpu/
Daperfmperf.c363 freq_scale = div64_u64(acnt, mcnt); in scale_freq_tick()
438 return div64_u64((cpu_khz * acnt), mcnt); in arch_freq_get_on_cpu()
/linux-6.6.21/drivers/clk/pistachio/
Dclk-pll.c97 return div64_u64(dividend, divisor); in do_div_round_closest()
212 vco = div64_u64(vco, params->refdiv << 24); in pll_gf40lp_frac_set_rate()
218 val = div64_u64(params->fref, params->refdiv); in pll_gf40lp_frac_set_rate()
/linux-6.6.21/drivers/cpuidle/governors/
Dmenu.c343 interactivity_req = div64_u64(predicted_ns, in menu_select()
525 new_factor += div64_u64(RESOLUTION * measured_ns, in menu_update()

1234567