/kernel/linux/linux-5.10/arch/arm/lib/ |
D | lib1funcs.S | 40 .macro ARM_DIV_BODY dividend, divisor, result, curbit 44 clz \curbit, \divisor 48 mov \divisor, \divisor, lsl \result 54 @ Initially shift the divisor left 3 bits if possible, 58 tst \divisor, #0xe0000000 59 moveq \divisor, \divisor, lsl #3 63 @ Unless the divisor is very big, shift it up in multiples of 65 @ division loop. Continue shifting until the divisor is 67 1: cmp \divisor, #0x10000000 68 cmplo \divisor, \dividend [all …]
|
/kernel/linux/linux-5.10/lib/math/ |
D | div64.c | 71 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument 76 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 78 if (divisor > 0) in div_s64_rem() 81 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 82 if (divisor < 0) in div_s64_rem() 102 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument 104 u32 high = divisor >> 32; in div64_u64_rem() 109 quot = div_u64_rem(dividend, divisor, &rem32); in div64_u64_rem() 113 quot = div_u64(dividend >> n, divisor >> n); in div64_u64_rem() 118 *remainder = dividend - quot * divisor; in div64_u64_rem() [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | math64.h | 25 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument 27 *remainder = dividend % divisor; in div_u64_rem() 28 return dividend / divisor; in div_u64_rem() 39 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument 41 *remainder = dividend % divisor; in div_s64_rem() 42 return dividend / divisor; in div_s64_rem() 53 static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument 55 *remainder = dividend % divisor; in div64_u64_rem() 56 return dividend / divisor; in div64_u64_rem() 66 static inline u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument [all …]
|
/kernel/linux/linux-5.10/arch/alpha/lib/ |
D | divide.S | 56 #define divisor $1 macro 104 bis $25,$25,divisor 109 LONGIFY(divisor) 114 beq divisor, 9f /* div by zero */ 125 1: cmpult divisor,modulus,compare 126 s8addq divisor,$31,divisor 130 1: cmpult divisor,modulus,compare 131 blt divisor, 2f 132 addq divisor,divisor,divisor 141 cmpule divisor,modulus,compare [all …]
|
D | ev6-divide.S | 66 #define divisor $1 macro 114 bis $25,$25,divisor # E : 120 LONGIFY(divisor) # E : U L L U 127 beq divisor, 9f /* div by zero */ 144 1: cmpult divisor,modulus,compare # E : 145 s8addq divisor,$31,divisor # E : 149 1: cmpult divisor,modulus,compare # E : 152 blt divisor, 2f # U : U L U L 154 addq divisor,divisor,divisor # E : 172 cmpule divisor,modulus,compare # E : [all …]
|
/kernel/linux/linux-5.10/drivers/cpufreq/ |
D | sparc-us2e-cpufreq.c | 88 unsigned long old_divisor, unsigned long divisor) in frob_mem_refresh() argument 93 refr_count /= (MCTRL0_REFR_CLKS_P_CNT * divisor * 1000000000UL); in frob_mem_refresh() 120 unsigned long old_divisor, unsigned long divisor) in us2e_transition() argument 125 if (old_divisor == 2 && divisor == 1) { in us2e_transition() 128 frob_mem_refresh(0, clock_tick, old_divisor, divisor); in us2e_transition() 129 } else if (old_divisor == 1 && divisor == 2) { in us2e_transition() 130 frob_mem_refresh(1, clock_tick, old_divisor, divisor); in us2e_transition() 133 } else if (old_divisor == 1 && divisor > 2) { in us2e_transition() 137 2, divisor); in us2e_transition() 138 } else if (old_divisor > 2 && divisor == 1) { in us2e_transition() [all …]
|
/kernel/linux/linux-5.10/lib/mpi/ |
D | mpi-div.c | 18 void mpi_fdiv_qr(MPI quot, MPI rem, MPI dividend, MPI divisor); 20 void mpi_fdiv_r(MPI rem, MPI dividend, MPI divisor) in mpi_fdiv_r() argument 22 int divisor_sign = divisor->sign; in mpi_fdiv_r() 29 if (rem == divisor) { in mpi_fdiv_r() 30 temp_divisor = mpi_copy(divisor); in mpi_fdiv_r() 31 divisor = temp_divisor; in mpi_fdiv_r() 34 mpi_tdiv_r(rem, dividend, divisor); in mpi_fdiv_r() 37 mpi_add(rem, rem, divisor); in mpi_fdiv_r() 43 void mpi_fdiv_q(MPI quot, MPI dividend, MPI divisor) in mpi_fdiv_q() argument 46 mpi_fdiv_qr(quot, tmp, dividend, divisor); in mpi_fdiv_q() [all …]
|
/kernel/uniproton/src/arch/cpu/armv7-m/cortex-m4/ |
D | prt_div64.c | 40 OS_SEC_TEXT void OsU64Div(U64 dividend, U64 divisor, U64 *quotient, U64 *remainder) in OsU64Div() argument 48 if (divisor == 0) { in OsU64Div() 52 if (dividend < divisor) { in OsU64Div() 59 alignShift = OsleadingZeroCount(divisor) - OsleadingZeroCount(dividend); in OsU64Div() 60 tmpDivisor = divisor << alignShift; in OsU64Div() 79 OS_SEC_TEXT U64 OsU64DivGetQuotient(U64 dividend, U64 divisor) in OsU64DivGetQuotient() argument 84 OsU64Div(dividend, divisor, "ient, &remainder); in OsU64DivGetQuotient() 89 OS_SEC_TEXT U64 OsU64DivGetRemainder(U64 dividend, U64 divisor) in OsU64DivGetRemainder() argument 94 OsU64Div(dividend, divisor, "ient, &remainder); in OsU64DivGetRemainder()
|
/kernel/linux/linux-5.10/drivers/iio/common/hid-sensors/ |
D | hid-sensor-attributes.c | 76 static void simple_div(int dividend, int divisor, int *whole, in simple_div() argument 83 if (divisor == 0) { in simple_div() 87 *whole = dividend/divisor; in simple_div() 88 rem = dividend % divisor; in simple_div() 90 while (rem <= divisor) { in simple_div() 94 *micro_frac = (rem / divisor) * int_pow(10, 6 - exp); in simple_div() 100 int divisor = int_pow(10, exp); in split_micro_fraction() local 102 *val1 = no / divisor; in split_micro_fraction() 103 *val2 = no % divisor * int_pow(10, 6 - exp); in split_micro_fraction() 138 int divisor; in convert_to_vtf_format() local [all …]
|
/kernel/linux/linux-5.10/drivers/acpi/acpica/ |
D | utmath.c | 257 u32 divisor, u64 *out_quotient, u32 *out_remainder) in acpi_ut_short_divide() argument 267 if (divisor == 0) { in acpi_ut_short_divide() 278 ACPI_DIV_64_BY_32(0, dividend_ovl.part.hi, divisor, in acpi_ut_short_divide() 281 ACPI_DIV_64_BY_32(remainder32, dividend_ovl.part.lo, divisor, in acpi_ut_short_divide() 316 union uint64_overlay divisor; in acpi_ut_divide() local 334 divisor.full = in_divisor; in acpi_ut_divide() 336 if (divisor.part.hi == 0) { in acpi_ut_divide() 347 ACPI_DIV_64_BY_32(0, dividend.part.hi, divisor.part.lo, in acpi_ut_divide() 350 ACPI_DIV_64_BY_32(partial1, dividend.part.lo, divisor.part.lo, in acpi_ut_divide() 361 normalized_divisor = divisor; in acpi_ut_divide() [all …]
|
/kernel/linux/linux-5.10/arch/c6x/kernel/ |
D | c6x_ksyms.c | 15 extern int __c6xabi_divi(int dividend, int divisor); 18 extern unsigned __c6xabi_divu(unsigned dividend, unsigned divisor); 21 extern int __c6xabi_remi(int dividend, int divisor); 24 extern unsigned __c6xabi_remu(unsigned dividend, unsigned divisor); 27 extern int __c6xabi_divremi(int dividend, int divisor); 30 extern unsigned __c6xabi_divremu(unsigned dividend, unsigned divisor);
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/clock/ti/ |
D | divider.txt | 8 the register is one less than the actual divisor value. E.g: 10 register value actual divisor value 17 ti,index-starts-at-one - valid divisor values start at 1, not the default 19 register value actual divisor value 24 ti,index-power-of-two - valid divisor values are powers of two. E.g: 25 register value actual divisor value 34 Which will map the resulting values to a divisor table by their index: 35 register value actual divisor value 38 2 <invalid divisor, skipped> 65 - ti,min-div : min divisor for dividing the input clock rate, only [all …]
|
/kernel/linux/linux-5.10/arch/mips/cavium-octeon/executive/ |
D | cvmx-helper-jtag.c | 50 uint32_t divisor = cvmx_sysinfo_get()->cpu_clock_hz / (25 * 1000000); in cvmx_helper_qlm_jtag_init() local 51 divisor = (divisor - 1) >> 2; in cvmx_helper_qlm_jtag_init() 53 while (divisor) { in cvmx_helper_qlm_jtag_init() 55 divisor = divisor >> 1; in cvmx_helper_qlm_jtag_init()
|
/kernel/linux/linux-5.10/arch/h8300/lib/ |
D | udivsi3.S | 31 shlr.l er2 ; make divisor < 2^16 35 shlr.l #2,er2 ; make divisor < 2^16 41 shlr.l #2,er2 ; make divisor < 2^16 56 ;; er1 contains divisor 57 ;; er2 contains shifted divisor 64 mulxu.w r0,er2 ; er2 = upper (AQ - 1) * divisor 68 sub.l er2,er3 ; er3 = dividend - (AQ - 1) * divisor 70 cmp.l er1,er3 ; is divisor < remainder?
|
/kernel/linux/linux-5.10/sound/soc/codecs/ |
D | tlv320aic26.c | 70 int fsref, divisor, wlen, pval, jval, dval, qval; in aic26_hw_params() local 79 case 8000: fsref = 48000; divisor = AIC26_DIV_6; break; in aic26_hw_params() 80 case 11025: fsref = 44100; divisor = AIC26_DIV_4; break; in aic26_hw_params() 81 case 12000: fsref = 48000; divisor = AIC26_DIV_4; break; in aic26_hw_params() 82 case 16000: fsref = 48000; divisor = AIC26_DIV_3; break; in aic26_hw_params() 83 case 22050: fsref = 44100; divisor = AIC26_DIV_2; break; in aic26_hw_params() 84 case 24000: fsref = 48000; divisor = AIC26_DIV_2; break; in aic26_hw_params() 85 case 32000: fsref = 48000; divisor = AIC26_DIV_1_5; break; in aic26_hw_params() 86 case 44100: fsref = 44100; divisor = AIC26_DIV_1; break; in aic26_hw_params() 87 case 48000: fsref = 48000; divisor = AIC26_DIV_1; break; in aic26_hw_params() [all …]
|
/kernel/linux/linux-5.10/arch/x86/include/asm/ |
D | div64.h | 43 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument 53 if (upper >= divisor) { in div_u64_rem() 54 d.v32[1] = upper / divisor; in div_u64_rem() 55 upper %= divisor; in div_u64_rem() 58 "rm" (divisor), "0" (d.v32[0]), "1" (upper)); in div_u64_rem()
|
/kernel/linux/linux-5.10/arch/powerpc/lib/ |
D | div64.S | 22 divwu r7,r5,r4 # if dividend.hi >= divisor, 23 mullw r0,r7,r4 # quotient.hi = dividend.hi / divisor 24 subf. r5,r0,r5 # dividend.hi %= divisor 31 srw r10,r10,r0 # the divisor right the same amount, 41 mulhwu r9,r11,r4 # multiply the estimate by the divisor, 42 subfc r6,r10,r6 # take the product from the divisor,
|
/kernel/linux/linux-5.10/drivers/clk/ |
D | clk-vt8500.c | 135 u32 divisor; in vt8500_dclk_round_rate() local 140 divisor = *prate / rate; in vt8500_dclk_round_rate() 143 if (rate * divisor < *prate) in vt8500_dclk_round_rate() 144 divisor++; in vt8500_dclk_round_rate() 150 if ((cdev->div_mask == 0x3F) && (divisor > 31)) { in vt8500_dclk_round_rate() 151 divisor = 64 * ((divisor / 64) + 1); in vt8500_dclk_round_rate() 154 return *prate / divisor; in vt8500_dclk_round_rate() 161 u32 divisor; in vt8500_dclk_set_rate() local 167 divisor = parent_rate / rate; in vt8500_dclk_set_rate() 169 if (divisor == cdev->div_mask + 1) in vt8500_dclk_set_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/cpuidle/governors/ |
D | menu.c | 172 int i, divisor; in get_typical_interval() local 184 divisor = 0; in get_typical_interval() 189 divisor++; in get_typical_interval() 205 if (divisor == INTERVALS) in get_typical_interval() 208 avg = div_u64(sum, divisor); in get_typical_interval() 219 if (divisor == INTERVALS) in get_typical_interval() 222 do_div(variance, divisor); in get_typical_interval() 237 if ((((u64)avg*avg > variance*36) && (divisor * 4 >= INTERVALS * 3)) in get_typical_interval() 252 if ((divisor * 4) <= INTERVALS * 3) in get_typical_interval()
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
D | early_printk.c | 130 static __init void early_serial_hw_init(unsigned divisor) in early_serial_hw_init() argument 141 serial_out(early_serial_base, DLL, divisor & 0xff); in early_serial_hw_init() 142 serial_out(early_serial_base, DLH, (divisor >> 8) & 0xff); in early_serial_hw_init() 150 unsigned divisor; in early_serial_init() local 184 divisor = 115200 / baud; in early_serial_init() 191 early_serial_hw_init(divisor); in early_serial_init() 219 unsigned divisor; in early_pci_serial_init() local 313 divisor = 115200 / baud; in early_pci_serial_init() 316 early_serial_hw_init(divisor); in early_pci_serial_init()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/basics/ |
D | conversion.c | 40 int32_t divisor = 1 << fractional_bits; in fixed_point_to_int_frac() local 48 if (d <= (uint16_t)(1 << integer_bits) - (1 / (uint16_t)divisor)) in fixed_point_to_int_frac() 52 divisor)); in fixed_point_to_int_frac() 60 divisor)))); in fixed_point_to_int_frac()
|
/kernel/linux/linux-5.10/include/vdso/ |
D | math64.h | 6 __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) in __iter_div_u64_rem() argument 10 while (dividend >= divisor) { in __iter_div_u64_rem() 15 dividend -= divisor; in __iter_div_u64_rem()
|
/kernel/linux/linux-5.10/arch/x86/boot/ |
D | string.c | 201 static inline u64 __div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in __div_u64_rem() argument 211 if (upper >= divisor) { in __div_u64_rem() 212 d.v32[1] = upper / divisor; in __div_u64_rem() 213 upper %= divisor; in __div_u64_rem() 216 "rm" (divisor), "0" (d.v32[0]), "1" (upper)); in __div_u64_rem() 220 static inline u64 __div_u64(u64 dividend, u32 divisor) in __div_u64() argument 224 return __div_u64_rem(dividend, divisor, &remainder); in __div_u64()
|
/kernel/linux/linux-5.10/drivers/staging/comedi/drivers/ |
D | comedi_8254.c | 341 i8254->divisor = i8254->next_div & 0xffff; in comedi_8254_update_divisors() 441 unsigned int divisor; in comedi_8254_ns_to_timer() local 446 divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base); in comedi_8254_ns_to_timer() 449 divisor = DIV_ROUND_UP(*nanosec, i8254->osc_base); in comedi_8254_ns_to_timer() 452 divisor = *nanosec / i8254->osc_base; in comedi_8254_ns_to_timer() 455 if (divisor < 2) in comedi_8254_ns_to_timer() 456 divisor = 2; in comedi_8254_ns_to_timer() 457 if (divisor > I8254_MAX_COUNT) in comedi_8254_ns_to_timer() 458 divisor = I8254_MAX_COUNT; in comedi_8254_ns_to_timer() 460 *nanosec = divisor * i8254->osc_base; in comedi_8254_ns_to_timer() [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/clock/ |
D | vt8500.txt | 44 - divisor-reg : shall be the register offset from PMC base for the divisor 47 - divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f 70 divisor-reg = <0x328>; 71 divisor-mask = <0x3f>;
|