| /linux/drivers/acpi/acpica/ |
| H A D | utmath.c | 318 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/include/linux/ |
| H A D | math64.h | 26 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument 28 *remainder = dividend % divisor; in div_u64_rem() 40 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument 42 *remainder = dividend % divisor; in div_s64_rem() 54 static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument 56 *remainder = dividend % divisor; in div64_u64_rem() 90 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument 92 *remainder = do_div(dividend, divisor); in div_u64_rem() 98 extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); 102 extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder); [all …]
|
| /linux/lib/math/ |
| H A D | div64.c | 68 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument 73 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 74 *remainder = -*remainder; in div_s64_rem() 78 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 99 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument 107 *remainder = rem32; in div64_u64_rem() 115 *remainder = dividend - quot * divisor; in div64_u64_rem() 116 if (*remainder >= divisor) { in div64_u64_rem() 118 *remainder -= divisor; in div64_u64_rem() 181 u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) in iter_div_u64_rem() argument [all …]
|
| /linux/drivers/gpu/drm/amd/display/dc/basics/ |
| H A D | bw_fixed.c | 65 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 D | socklib.c | 223 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/kernel/time/ |
| H A D | timeconv.c | 53 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 D | clk-pll.c | 175 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/include/vdso/ |
| H A D | math64.h | 6 __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/pci/ |
| H A D | doe.c | 301 size_t length, remainder; in pci_doe_send_req() local 350 remainder = task->request_pl_sz % sizeof(__le32); in pci_doe_send_req() 351 if (remainder) { in pci_doe_send_req() 353 memcpy(&val, &task->request_pl[i], remainder); in pci_doe_send_req() 377 size_t length, payload_length, remainder, received; in pci_doe_recv_resp() local 410 remainder = task->response_pl_sz % sizeof(__le32); in pci_doe_recv_resp() 413 if (!remainder) in pci_doe_recv_resp() 414 remainder = sizeof(__le32); in pci_doe_recv_resp() 419 remainder = sizeof(__le32); in pci_doe_recv_resp() 434 memcpy(&task->response_pl[i], &val, remainder); in pci_doe_recv_resp()
|
| /linux/drivers/video/fbdev/ |
| H A D | asiliantfb.c | 118 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/drivers/dma/qcom/ |
| H A D | qcom_adm.c | 236 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/drivers/clk/rockchip/ |
| H A D | clk-mmc-phase.c | 86 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/media/tuners/ |
| H A D | max2165.c | 152 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/watchdog/ |
| H A D | kempld_wdt.c | 136 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/video/fbdev/aty/ |
| H A D | mach64_gx.c | 503 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/arch/x86/include/asm/ |
| H A D | div64.h | 43 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/drivers/ptp/ |
| H A D | ptp_qoriq.c | 379 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/gpib/fmh_gpib/ |
| H A D | fmh_gpib.c | 484 size_t remainder = length; in fmh_gpib_accel_write() local 487 size_t dma_remainder = remainder; in fmh_gpib_accel_write() 519 remainder -= num_bytes; in fmh_gpib_accel_write() 530 if (WARN_ON_ONCE(remainder != 1)) in fmh_gpib_accel_write() 545 retval = fmh_gpib_dma_write(board, buffer, remainder, &num_bytes); in fmh_gpib_accel_write() 549 remainder -= num_bytes; in fmh_gpib_accel_write() 604 unsigned int remainder; in fmh_gpib_fifo_write_countable() local 615 remainder = length; in fmh_gpib_fifo_write_countable() 616 while (remainder > 0) { in fmh_gpib_fifo_write_countable() 624 for (i = 0; i < fmh_gpib_half_fifo_size(e_priv) && remainder > 0; ++i) { in fmh_gpib_fifo_write_countable() [all …]
|
| /linux/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/ |
| H A D | dml2_core_utils.c | 7 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/powerpc/lib/ |
| H A D | div64.S | 49 mullw r10,r0,r4 # and get the remainder 54 mr r3,r6 # return the remainder in r3
|
| /linux/drivers/net/wireless/ath/ |
| H A D | dfs_pri_detector.c | 46 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/tools/testing/selftests/drivers/net/ |
| H A D | gro.c | |
| /linux/arch/m68k/ifpsp060/src/ |
| H A D | ilsp.S | 77 # 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/drivers/dma/ |
| H A D | amba-pl08x.c | 1110 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 …]
|
| /linux/arch/powerpc/perf/ |
| H A D | hv-24x7-catalog.h | 51 __u8 remainder[]; member
|