Home
last modified time | relevance | path

Searched refs:remainder (Results 1 – 25 of 135) sorted by relevance

123456

/linux/drivers/acpi/acpica/
H A Dutmath.c318 union uint64_overlay remainder; in acpi_ut_divide() local
341 remainder.part.hi = 0; in acpi_ut_divide()
351 quotient.part.lo, remainder.part.lo); in acpi_ut_divide()
388 remainder.part.hi = partial3.part.lo; in acpi_ut_divide()
389 remainder.part.lo = partial2.part.lo; in acpi_ut_divide()
396 remainder.full -= divisor.full; in acpi_ut_divide()
400 remainder.full -= divisor.full; in acpi_ut_divide()
404 remainder.full = remainder.full - dividend.full; in acpi_ut_divide()
405 remainder.part.hi = (u32)-((s32)remainder.part.hi); in acpi_ut_divide()
406 remainder.part.lo = (u32)-((s32)remainder.part.lo); in acpi_ut_divide()
[all …]
/linux/drivers/gpu/drm/amd/display/dc/basics/
H A Dbw_fixed.c65 uint64_t remainder; in bw_frc_to_fixed() local
74 res_value = div64_u64_rem(arg1_value, arg2_value, &remainder); in bw_frc_to_fixed()
83 remainder <<= 1; in bw_frc_to_fixed()
87 if (remainder >= arg2_value) { in bw_frc_to_fixed()
89 remainder -= arg2_value; in bw_frc_to_fixed()
96 uint64_t summand = (remainder << 1) >= arg2_value; in bw_frc_to_fixed()
/linux/net/sunrpc/
H A Dsocklib.c223 unsigned int remainder = rmsize + xdr->len - base; in xprt_sock_sendmsg() local
237 remainder -= len; in xprt_sock_sendmsg()
238 if (remainder == 0) in xprt_sock_sendmsg()
245 if (remainder == 0 || err != len) in xprt_sock_sendmsg()
256 remainder -= len; in xprt_sock_sendmsg()
257 if (remainder == 0) in xprt_sock_sendmsg()
260 if (remainder == 0 || err != len) in xprt_sock_sendmsg()
/linux/drivers/pwm/
H A Dpwm-gpio.c43 u32 remainder; in pwm_gpio_round() local
49 remainder = do_div(dividend, hrtimer_resolution); in pwm_gpio_round()
50 dest->period -= remainder; in pwm_gpio_round()
53 remainder = do_div(dividend, hrtimer_resolution); in pwm_gpio_round()
54 dest->duty_cycle -= remainder; in pwm_gpio_round()
/linux/kernel/time/
H A Dtimeconv.c53 int remainder; in time64_to_tm() local
55 days = div_s64_rem(totalsecs, SECS_PER_DAY, &remainder); in time64_to_tm()
56 rem = remainder; in time64_to_tm()
/linux/drivers/clk/at91/
H A Dclk-pll.c175 unsigned long remainder; in clk_pll_get_best_div_mul() local
186 remainder = tmprate - rate; in clk_pll_get_best_div_mul()
188 remainder = rate - tmprate; in clk_pll_get_best_div_mul()
195 if (remainder < bestremainder) { in clk_pll_get_best_div_mul()
196 bestremainder = remainder; in clk_pll_get_best_div_mul()
206 if (!remainder) in clk_pll_get_best_div_mul()
/linux/drivers/video/fbdev/
H A Dasiliantfb.c118 unsigned remainder; in asiliant_calc_dclk2() local
123 remainder = 1000000 % pixclock; in asiliant_calc_dclk2()
124 Ftarget = 1000000 * ratio + (1000000 * remainder) / pixclock; in asiliant_calc_dclk2()
132 remainder = Ftarget % Fref; in asiliant_calc_dclk2()
137 unsigned m = n * ratio + (n * remainder) / Fref; in asiliant_calc_dclk2()
227 unsigned long Ftarget, ratio, remainder; in asiliantfb_check_var() local
233 remainder = 1000000 % var->pixclock; in asiliantfb_check_var()
234 Ftarget = 1000000 * ratio + (1000000 * remainder) / var->pixclock; in asiliantfb_check_var()
/linux/arch/x86/boot/
H A Dstring.c200 static inline u64 __div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in __div_u64_rem() argument
214 asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) : in __div_u64_rem()
221 u32 remainder; in __div_u64() local
223 return __div_u64_rem(dividend, divisor, &remainder); in __div_u64()
/linux/drivers/dma/qcom/
H A Dqcom_adm.c236 u32 remainder = sg_dma_len(sg); in adm_process_fc_descriptors() local
254 while (remainder >= burst) { in adm_process_fc_descriptors()
261 rows = remainder / burst; in adm_process_fc_descriptors()
267 remainder -= burst * rows; in adm_process_fc_descriptors()
272 if (remainder) { in adm_process_fc_descriptors()
275 single_desc->len = remainder; in adm_process_fc_descriptors()
303 u32 remainder = sg_dma_len(sg); in adm_process_non_fc_descriptors() local
321 single_desc->len = (remainder > ADM_MAX_XFER) ? in adm_process_non_fc_descriptors()
322 ADM_MAX_XFER : remainder; in adm_process_non_fc_descriptors()
324 remainder -= single_desc->len; in adm_process_non_fc_descriptors()
[all …]
/linux/include/vdso/
H A Dmath64.h6 __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) in __iter_div_u64_rem() argument
19 *remainder = dividend; in __iter_div_u64_rem()
/linux/drivers/media/tuners/
H A Dmax2165.c152 u32 remainder; in fixpt_div32() local
160 remainder = dividend - q * divisor; in fixpt_div32()
163 remainder <<= 1; in fixpt_div32()
164 if (remainder >= divisor) { in fixpt_div32()
166 remainder -= divisor; in fixpt_div32()
/linux/drivers/net/usb/
H A Dkalmia.c171 u8 remainder, padlen = 0; in kalmia_tx_fixup() local
216 remainder = skb->len % KALMIA_ALIGN_SIZE; in kalmia_tx_fixup()
217 if (remainder > 0) { in kalmia_tx_fixup()
218 padlen = KALMIA_ALIGN_SIZE - remainder; in kalmia_tx_fixup()
/linux/drivers/watchdog/
H A Dkempld_wdt.c136 u32 remainder; in kempld_wdt_set_stage_timeout() local
145 remainder = do_div(stage_timeout64, prescaler); in kempld_wdt_set_stage_timeout()
146 if (remainder) in kempld_wdt_set_stage_timeout()
176 u32 remainder; in kempld_wdt_get_timeout() local
187 remainder = do_div(stage_timeout, pld->pld_clock); in kempld_wdt_get_timeout()
188 if (remainder) in kempld_wdt_get_timeout()
/linux/drivers/clk/rockchip/
H A Dclk-mmc-phase.c86 u8 nineties, remainder; in rockchip_mmc_set_phase() local
109 remainder = (degrees % 90); in rockchip_mmc_set_phase()
135 delay *= remainder; in rockchip_mmc_set_phase()
/linux/drivers/video/fbdev/aty/
H A Dmach64_gx.c503 u16 remainder, preRemainder; in aty_var_to_pll_1703() local
536 remainder = tempB % mach64RefFreq; in aty_var_to_pll_1703()
540 && (remainder <= preRemainder)) { in aty_var_to_pll_1703()
541 preRemainder = remainder; in aty_var_to_pll_1703()
742 u16 remainder, preRemainder; in aty_var_to_pll_408() local
774 remainder = tempB % mach64RefFreq; in aty_var_to_pll_408()
777 && (remainder <= preRemainder)) { in aty_var_to_pll_408()
778 preRemainder = remainder; in aty_var_to_pll_408()
/linux/drivers/ptp/
H A Dptp_qoriq.c379 u32 remainder = 0; in ptp_qoriq_nominal_freq() local
382 remainder = clk_src % 100; in ptp_qoriq_nominal_freq()
383 if (remainder) { in ptp_qoriq_nominal_freq()
384 clk_src -= remainder; in ptp_qoriq_nominal_freq()
421 u32 remainder = 0; in ptp_qoriq_auto_config() local
449 freq_comp = div_u64_rem(freq_comp, clk_src, &remainder); in ptp_qoriq_auto_config()
450 if (remainder) in ptp_qoriq_auto_config()
/linux/drivers/pci/
H A Dsetup-res.c274 resource_size_t remainder, start_addr; in pci_align_resource() local
282 remainder = size - ALIGN_DOWN(size, align); in pci_align_resource()
284 if (!IS_ALIGNED(remainder, pci_min_window_alignment(dev->bus, res->flags))) in pci_align_resource()
287 if (res->start < remainder) in pci_align_resource()
289 start_addr = res->start - remainder; in pci_align_resource()
/linux/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/
H A Ddml2_core_utils.c7 double dml2_core_utils_div_rem(double dividend, unsigned int divisor, unsigned int *remainder) in dml2_core_utils_div_rem() argument
9 *remainder = ((dividend / divisor) - (int)(dividend / divisor) > 0); in dml2_core_utils_div_rem()
372 unsigned int remainder; in dml2_core_utils_round_to_multiple() local
377 remainder = num % multiple; in dml2_core_utils_round_to_multiple()
378 if (remainder == 0) in dml2_core_utils_round_to_multiple()
382 return (num + multiple - remainder); in dml2_core_utils_round_to_multiple()
384 return (num - remainder); in dml2_core_utils_round_to_multiple()
/linux/arch/x86/include/asm/
H A Ddiv64.h43 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
57 asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) : in div_u64_rem()
/linux/tools/testing/selftests/drivers/net/
H A Dgro.c
/linux/drivers/iio/light/
H A Dapds9999.c185 u32 remainder; in apds9999_read_raw() local
201 *val = (int)div_u64_rem(scale_nano, NSEC_PER_SEC, &remainder); in apds9999_read_raw()
202 *val2 = (int)remainder; in apds9999_read_raw()
/linux/drivers/net/wireless/ath/
H A Ddfs_pri_detector.c46 u32 remainder; in pde_get_multiple() local
60 remainder = val % fraction; in pde_get_multiple()
61 if (remainder > tolerance) { in pde_get_multiple()
63 if ((fraction - remainder) <= tolerance) in pde_get_multiple()
/linux/arch/m68k/ifpsp060/src/
H A Dilsp.S77 # 0x10(sp) = pointer to location to place quotient/remainder #
80 # 0x10(sp) = points to location of remainder/quotient. #
81 # remainder is in first longword, quotient is in 2nd. #
199 tst.b NDIVIDEND(%a6) # remainder has same sign
278 # The quotient is returned in %d6, remainder in %d5, unless the #
295 # longword of the dividend as (0) remainder (see Knuth) and merely complete
296 # the last two divisions to get a quotient longword and word remainder:
314 swap %d5 # now remainder
355 andi.l &0x0000ffff, %d1 # zero any remainder
429 # add 2nd word to quotient, get the remainder.
[all …]
/linux/arch/powerpc/lib/
H A Ddiv64.S49 mullw r10,r0,r4 # and get the remainder
54 mr r3,r6 # return the remainder in r3
/linux/drivers/dma/
H A Damba-pl08x.c1110 size_t remainder; member
1200 BUG_ON(bd->remainder < len); in pl08x_fill_lli_for_desc()
1202 bd->remainder -= len; in pl08x_fill_lli_for_desc()
1290 bd.remainder = dsg->len; in pl08x_fill_llis_for_desc()
1304 bd.remainder); in pl08x_fill_llis_for_desc()
1330 if (!bd.remainder) { in pl08x_fill_llis_for_desc()
1368 if (bd.remainder < mbus->buswidth) in pl08x_fill_llis_for_desc()
1369 early_bytes = bd.remainder; in pl08x_fill_llis_for_desc()
1373 if ((bd.remainder - early_bytes) < mbus->buswidth) in pl08x_fill_llis_for_desc()
1374 early_bytes = bd.remainder; in pl08x_fill_llis_for_desc()
[all …]

123456