Home
last modified time | relevance | path

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

12345678

/linux-6.12.1/lib/math/
Ddiv64.c138 #ifndef div64_u64
139 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() function
158 EXPORT_SYMBOL(div64_u64);
166 quot = div64_u64(abs(dividend), abs(divisor)); in div64_s64()
190 return div64_u64(a * b, c); in mul_u64_u64_div_u64()
228 return div64_u64(n, c >> shift); in mul_u64_u64_div_u64()
/linux-6.12.1/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()
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.12.1/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);
298 ({ u64 _tmp = (d); div64_u64((ll) + _tmp - 1, _tmp); })
324 ({ u64 _tmp = (divisor); div64_u64((dividend) + _tmp / 2, _tmp); })
/linux-6.12.1/drivers/gpu/drm/amd/display/modules/freesync/
Dfreesync.c96 ((unsigned int)(div64_u64((1000000000ULL * 1000000),
106 ((unsigned int)(div64_u64((1000000000ULL * 1000), in calc_duration_in_us_from_refresh_in_uhz()
117 (unsigned int)(div64_u64(((unsigned long long)(v_total) in calc_duration_in_us_from_v_total()
132 ((unsigned int)(div64_u64((1000000000ULL * 1000000), in mod_freesync_calc_v_total_from_refresh()
135 v_total = div64_u64(div64_u64(((unsigned long long)( in mod_freesync_calc_v_total_from_refresh()
169 v_total = div64_u64(div64_u64(((unsigned long long)( in calc_v_total_from_duration()
200 unsigned int frame_duration_ratio = div64_u64(1000000, in update_v_total_for_static_ramp()
201 (1000 + div64_u64(((unsigned long long)( in update_v_total_for_static_ramp()
207 unsigned int frame_duration_delta = div64_u64(((unsigned long long)( in update_v_total_for_static_ramp()
214 unsigned int ramp_rate_interpolated = div64_u64(((unsigned long long)( in update_v_total_for_static_ramp()
[all …]
/linux-6.12.1/drivers/pwm/
Dpwm-bcm-iproc.c104 state->period = div64_u64(tmp, rate); in iproc_pwmc_get_state()
108 state->duty_cycle = div64_u64(tmp, rate); in iproc_pwmc_get_state()
138 period = div64_u64(value, div); in iproc_pwmc_apply()
140 duty = div64_u64(value, div); in iproc_pwmc_apply()
Dpwm-lpc32xx.c40 period_cycles = div64_u64(c * period_ns, in lpc32xx_pwm_config()
48 duty_cycles = div64_u64((unsigned long long)(period_ns - duty_ns) * 256, in lpc32xx_pwm_config()
Dpwm-spear.c98 pv = div64_u64(val, div); in spear_pwm_config()
100 dc = div64_u64(val, div); in spear_pwm_config()
/linux-6.12.1/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()
254 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval()
351 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init()
387 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval()
/linux-6.12.1/tools/testing/selftests/bpf/progs/
Dbpf_cc_cubic.c42 static __u64 div64_u64(__u64 dividend, __u64 divisor) in div64_u64() function
71 rate = div64_u64(rate, (__u64)tp->srtt_us); in tcp_update_pacing_rate()
92 sndcnt = (__u32)div64_u64(dividend, (__u64)tp->prior_cwnd) - tp->prr_out; in tcp_cwnd_reduction()
Dbpf_cubic.c123 static __u64 div64_u64(__u64 dividend, __u64 divisor) in div64_u64() function
128 #define div64_ul div64_u64
264 x = (2 * x + (__u32)div64_u64(a, (__u64)x * (__u64)(x - 1))); in cubic_root()
/linux-6.12.1/kernel/dma/
Dmap_benchmark.c179 map->bparam.avg_map_100ns = div64_u64(sum_map, loops); in do_map_benchmark()
180 map->bparam.avg_unmap_100ns = div64_u64(sum_unmap, loops); in do_map_benchmark()
183 map_variance = div64_u64(sum_sq_map, loops) - in do_map_benchmark()
186 unmap_variance = div64_u64(sum_sq_unmap, loops) - in do_map_benchmark()
/linux-6.12.1/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.12.1/fs/bcachefs/
Dutil.c67 if (*res > div64_u64(U64_MAX, n)) in bch2_pow()
143 if (v > div64_u64(U64_MAX, b)) in __bch2_strtou64_h()
147 if (f_n > div64_u64(U64_MAX, b)) in __bch2_strtou64_h()
150 f_n = div64_u64(f_n * b, f_d); in __bch2_strtou64_h()
363 prt_printf(out, "%llu %s", div64_u64(ns, u->nsecs), u->name); in bch2_pr_time_units()
370 prt_printf(out, "%llu \r%s", div64_u64(ns, u->nsecs), u->name); in bch2_pr_time_units_aligned()
480 prt_printf(out, "%llu ", div64_u64(q, u->nsecs)); in bch2_time_stats_to_text()
/linux-6.12.1/drivers/gpu/drm/amd/display/amdgpu_dm/
Damdgpu_dm_psr.c160 vsync_rate_hz = div64_u64(div64_u64(( in amdgpu_dm_psr_enable()
/linux-6.12.1/arch/arm64/kernel/
Dtopology.c144 ratio = div64_u64(ratio, max_rate); in freq_inv_set_max_ratio()
180 scale = div64_u64(scale >> SCHED_CAPACITY_SHIFT, in amu_scale_freq_tick()
/linux-6.12.1/drivers/gpu/drm/amd/display/dc/
Ddc_dmub_srv.c591 drr_frame_us = div64_u64(((uint64_t)drr_timing->v_total * drr_timing->h_total * 1000000), in populate_subvp_cmd_drr_info()
594 …mall_region_us = div64_u64(((uint64_t)phantom_timing->v_addressable * phantom_timing->h_total * 10… in populate_subvp_cmd_drr_info()
597 …min_vtotal_supported = div64_u64(((uint64_t)drr_timing->pix_clk_100hz * 100 * min_drr_supported_us… in populate_subvp_cmd_drr_info()
600 …prefetch_us = div64_u64(((uint64_t)(phantom_timing->v_total - phantom_timing->v_front_porch) * pha… in populate_subvp_cmd_drr_info()
602 …subvp_active_us = div64_u64(((uint64_t)main_timing->v_addressable * main_timing->h_total * 1000000… in populate_subvp_cmd_drr_info()
604 drr_active_us = div64_u64(((uint64_t)drr_timing->v_addressable * drr_timing->h_total * 1000000), in populate_subvp_cmd_drr_info()
606 max_drr_vblank_us = div64_u64((subvp_active_us - prefetch_us - in populate_subvp_cmd_drr_info()
610 …max_vtotal_supported = div64_u64(((uint64_t)drr_timing->pix_clk_100hz * 100 * max_drr_supported_us… in populate_subvp_cmd_drr_info()
720 …subvp0_prefetch_us = div64_u64(((uint64_t)(phantom_timing0->v_total - phantom_timing0->v_front_por… in update_subvp_prefetch_end_to_mall_start()
723 …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.12.1/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.12.1/drivers/gpu/drm/amd/display/dc/spl/
Dspl_os_types.h35 return div64_u64(dividend, divisor); in spl_div64_u64()
/linux-6.12.1/net/dccp/ccids/lib/
Dtfrc.h30 return div64_u64(a * 1000000, b); in scaled_div()
/linux-6.12.1/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.12.1/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.12.1/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()
/linux-6.12.1/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.12.1/drivers/hwmon/
Daspeed-g6-pwm-tach.c195 expect_period = div64_u64(ULLONG_MAX, (u64)priv->clk_rate); in aspeed_pwm_apply()
210 div_l = div64_u64(priv->clk_rate * expect_period, divisor); in aspeed_pwm_apply()
223 duty_pt = div64_u64(state->duty_cycle * priv->clk_rate, in aspeed_pwm_apply()

12345678