Home
last modified time | relevance | path

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

1234567

/linux-6.1.9/lib/math/
Ddiv64.c143 #ifndef div64_u64
144 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() function
163 EXPORT_SYMBOL(div64_u64);
176 quot = div64_u64(abs(dividend), abs(divisor)); in div64_s64()
233 return res + div64_u64(a * b, c); in mul_u64_u64_div_u64()
/linux-6.1.9/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.1.9/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);
288 ({ u64 _tmp = (d); div64_u64((ll) + _tmp - 1, _tmp); })
301 ({ u64 _tmp = (divisor); div64_u64((dividend) + _tmp / 2, _tmp); })
/linux-6.1.9/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 - drr_active_us), 2) + drr_active_us; in populate_subvp_cmd_drr_info()
488 …max_vtotal_supported = div64_u64(((uint64_t)drr_timing->pix_clk_100hz * 100 * max_drr_supported_us… in populate_subvp_cmd_drr_info()
583 …subvp0_prefetch_us = div64_u64(((uint64_t)(phantom_timing0->v_total - phantom_timing0->v_front_por… in update_subvp_prefetch_end_to_mall_start()
586 …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.1.9/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.1.9/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()
137 period = div64_u64(value, div); in iproc_pwmc_apply()
139 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()
Dpwm-meson.c176 pre_div = div64_u64(fin_freq * (u64)period, NSEC_PER_SEC * 0xffffLL); in meson_pwm_calc()
182 cnt = div64_u64(fin_freq * (u64)period, NSEC_PER_SEC * (pre_div + 1)); in meson_pwm_calc()
201 duty_cnt = div64_u64(fin_freq * (u64)duty, in meson_pwm_calc()
/linux-6.1.9/net/netfilter/
Dnft_limit.c83 tokens = div64_u64(priv->nsecs, priv->rate) * priv->burst; in nft_limit_init()
89 tokens = div64_u64(priv->nsecs * (priv->rate + priv->burst), in nft_limit_init()
192 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init()
238 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval()
334 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init()
370 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval()
/linux-6.1.9/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.1.9/drivers/gpu/drm/amd/display/amdgpu_dm/
Damdgpu_dm_psr.c154 vsync_rate_hz = div64_u64(div64_u64(( in amdgpu_dm_psr_enable()
/linux-6.1.9/drivers/acpi/
Dacpi_lpit.c37 *counter = div64_u64(count * 1000000ULL, residency_info_mem.frequency); in lpit_read_residency_counter_us()
49 *counter = div64_u64(*counter * 1000000ULL, residency_info_ffh.frequency); in lpit_read_residency_counter_us()
/linux-6.1.9/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.1.9/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.1.9/drivers/cpufreq/
Dcppc_cpufreq.c131 local_freq_scale = div64_u64(perf, cpu_data->perf_caps.highest_perf); in cppc_scale_freq_workfn()
339 offset = caps->nominal_freq - div64_u64(caps->nominal_perf * mul, div); in cppc_cpufreq_perf_to_khz()
347 retval = offset + div64_u64(perf * mul, div); in cppc_cpufreq_perf_to_khz()
364 offset = caps->nominal_perf - div64_u64(caps->nominal_freq * mul, div); in cppc_cpufreq_khz_to_perf()
372 retval = offset + div64_u64(freq * mul, div); in cppc_cpufreq_khz_to_perf()
/linux-6.1.9/net/dccp/ccids/lib/
Dtfrc.h30 return div64_u64(a * 1000000, b); in scaled_div()
/linux-6.1.9/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.1.9/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.1.9/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.1.9/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()
442 samples_thresh = max(1ULL, div64_u64(samples_thresh, 100)); in check_scale_change()
946 avg_lat = div64_u64(iolat->lat_avg, NSEC_PER_USEC); in iolatency_pd_stat()
947 cur_win = div64_u64(iolat->cur_win_nsec, NSEC_PER_MSEC); in iolatency_pd_stat()
Dblk-iocost.c794 ioc->timer_slack_ns = div64_u64( in ioc_refresh_period_us()
824 vrate_pct = div64_u64(ioc->vtime_base_rate * 100, VTIME_PER_USEC); in ioc_autop_idx()
926 ioc->vrate_max = div64_u64((u64)ioc->params.qos[QOS_MAX] * in ioc_refresh_params()
991 vrate = div64_u64(vrate * (100 + VRATE_CLAMP_ADJ_PCT), 100); in ioc_adjust_base_vrate()
994 vrate = div64_u64(vrate * (100 - VRATE_CLAMP_ADJ_PCT), 100); in ioc_adjust_base_vrate()
1179 hwa = div64_u64((u64)hwa * active, active_sum); in current_hweight()
1182 hwi = div64_u64((u64)hwi * inuse, inuse_sum); in current_hweight()
1213 hwm = div64_u64((u64)hwm * inuse, child_inuse_sum); in current_hweight_max()
1334 delay = iocg->delay >> div64_u64(tdelta, USEC_PER_SEC); in iocg_kick_delay()
1591 *rq_wait_pct_p = div64_u64(rq_wait_ns * 100, in ioc_lat_stat()
[all …]
/linux-6.1.9/arch/x86/kernel/cpu/
Daperfmperf.c354 freq_scale = div64_u64(acnt, mcnt); in scale_freq_tick()
429 return div64_u64((cpu_khz * acnt), mcnt); in arch_freq_get_on_cpu()
/linux-6.1.9/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()

1234567