| /linux/include/linux/ |
| H A D | math64.h | 16 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder 19 * @remainder: pointer to unsigned 32bit remainder 21 * Return: sets ``*remainder``, then returns dividend / divisor 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() 33 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder 36 * @remainder: pointer to signed 32bit remainder 38 * Return: sets ``*remainder``, then returns dividend / divisor 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() [all …]
|
| /linux/lib/math/ |
| H A D | div64.c | 11 * 64bit result and 32bit remainder. 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() 88 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder 91 * @remainder: 64bit remainder 94 * But this operation, which includes math for calculating the remainder, 99 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument 107 *remainder = rem32; in div64_u64_rem() [all …]
|
| /linux/drivers/acpi/acpica/ |
| H A D | utmath.c | 245 * out_remainder - Pointer to where the remainder is returned 251 * 32-bit remainder. 275 * The quotient is 64 bits, the remainder is always 32 bits, in acpi_ut_short_divide() 303 * out_remainder - Pointer to where the remainder is returned 318 union uint64_overlay remainder; in acpi_ut_divide() local 341 remainder.part.hi = 0; in acpi_ut_divide() 344 * The quotient is 64 bits, the remainder is always 32 bits, in acpi_ut_divide() 351 quotient.part.lo, remainder.part.lo); in acpi_ut_divide() 382 * adjustment. The 64-bit remainder must be generated. in acpi_ut_divide() 388 remainder.part.hi = partial3.part.lo; in acpi_ut_divide() [all …]
|
| /linux/arch/nios2/kernel/ |
| H A D | insnemu.S | 223 * remainder dividend:quotient 227 * remainder >= divisor? no 00000000 0101011:0 229 * remainder >= divisor? no 00000000 101011:00 231 * remainder >= divisor? no 00000001 01011:000 233 * remainder >= divisor? no 00000010 1011:0000 235 * remainder >= divisor? no 00000101 011:00000 237 * remainder >= divisor? yes 00001010 11:000001 238 * remainder -= divisor - 00000111 242 * remainder >= divisor? yes 00000111 1:0000011 243 * remainder -= divisor - 00000111 [all …]
|
| /linux/arch/powerpc/math-emu/ |
| H A D | udivmodti4.c | 27 /* Remainder in n0. */ in _fp_udivmodti4() 39 /* Remainder in n0. */ in _fp_udivmodti4() 66 /* Remainder in n0 >> bm. */ in _fp_udivmodti4() 109 /* Remainder in n0 >> bm. */ in _fp_udivmodti4() 125 /* Remainder in n1n0. */ in _fp_udivmodti4() 182 /* Remainder in (n1n0 - m1m0) >> bm. */ in _fp_udivmodti4()
|
| /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/lib/crypto/mpi/ |
| H A D | mpi-div.c | 25 /* We need the original value of the divisor after the remainder has been in mpi_fdiv_r() 76 /* Ensure space is enough for quotient and remainder. in mpi_tdiv_qr() 77 * We need space for an extra limb in the remainder, because it's in mpi_tdiv_qr() 143 } else /* Put quotient at top of remainder. */ in mpi_tdiv_qr() 167 * significant word. Move the shifted numerator in the remainder in mpi_tdiv_qr() 178 * temporary space if it overlaps with the quotient or remainder. in mpi_tdiv_qr() 190 /* Move the numerator to the remainder. */ in mpi_tdiv_qr()
|
| /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() 191 * Compare the remainder with the best remainder found until in clk_pll_get_best_div_mul() 193 * current remainder is smaller than the best one. 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/arch/parisc/math-emu/ |
| H A D | sfrem.c | 15 * Single Precision Floating-point Remainder 34 * Single Precision Floating-point Remainder 204 * Do iterative subtract until remainder is less than operand 2. in sgl_frem() 212 * Do last subtract, then determine which way to round if remainder in sgl_frem() 220 /* division is exact, remainder is zero */ in sgl_frem() 237 /* check for remainder being exactly 1/2 of opnd2 */ in sgl_frem()
|
| H A D | dfrem.c | 15 * Double Precision Floating-point Remainder 34 * Double Precision Floating-point Remainder 208 * Do iterative subtract until remainder is less than operand 2. in dbl_frem() 217 * Do last subtract, then determine which way to round if remainder in dbl_frem() 225 /* division is exact, remainder is zero */ in dbl_frem() 243 /* check for remainder being exactly 1/2 of opnd2 */ in dbl_frem()
|
| /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/arch/x86/include/asm/ |
| H A D | div64.h | 12 * two values (the quotient and the remainder), but 17 * - returns the 32-bit remainder 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/arch/powerpc/lib/ |
| H A D | div64.S | 8 * On exit, r3 contains the remainder. 49 mullw r10,r0,r4 # and get the remainder 54 mr r3,r6 # return the remainder in r3
|
| /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() 412 /* remainder signifies number of data bytes in last payload dword */ 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() [all …]
|
| /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/arch/powerpc/boot/ |
| H A D | div64.S | 8 * On exit, r3 contains the remainder. 49 mullw r10,r0,r4 # and get the remainder 54 mr r3,r6 # return the remainder in r3
|
| /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/arch/arm/lib/ |
| H A D | div64.S | 40 * xh = remainder 114 @ The top part of remainder became zero. If carry is set 138 @ Current remainder is now 1. It is worthless to compare with
|
| /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/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/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/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/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() 64 /* remainder is within tolerance */ in pde_get_multiple()
|
| /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()
|