/Linux-v6.1/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 …]
|
D | div64.S | 5 * Optimized computation of 64-bit dividend / 32-bit divisor 29 * __do_div64: perform a division with 64-bit dividend and 32-bit divisor. 36 * r4 = divisor (preserved) 50 bls 9f @ divisor is 0 or 1 52 beq 8f @ divisor is power of 2 59 @ Align divisor with upper part of dividend. 60 @ The aligned divisor is stored in yl preserving the original. 102 @ divisor for comparisons, considering the carry-out bit as well. 139 @ divisor at this point since divisor can not be smaller than 3 here. 147 8: @ Division by a power of 2: determine what that divisor order is
|
/Linux-v6.1/include/linux/ |
D | math64.h | 16 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder 18 * @divisor: unsigned 32bit divisor 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() 29 return dividend / divisor; in div_u64_rem() 33 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder 35 * @divisor: signed 32bit divisor 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 [all …]
|
D | math.h | 81 * Divide positive or negative dividend by positive or negative divisor 84 * dividends if the divisor variable type is unsigned. 86 #define DIV_ROUND_CLOSEST(x, divisor)( \ argument 89 typeof(divisor) __d = divisor; \ 91 ((typeof(divisor))-1) > 0 || \ 98 * Same as above but for u64 dividends. divisor must be a 32-bit 101 #define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ argument 103 typeof(divisor) __d = divisor; \
|
/Linux-v6.1/lib/math/ |
D | div64.c | 67 * div_s64_rem - signed 64bit divide with 64bit divisor and remainder 69 * @divisor: 64bit divisor 73 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument 78 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 80 if (divisor > 0) in div_s64_rem() 83 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 84 if (divisor < 0) in div_s64_rem() 93 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder 95 * @divisor: 64bit divisor 104 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument [all …]
|
/Linux-v6.1/arch/m68k/include/asm/ |
D | mcfpit.h | 25 #define MCFPIT_PCSR_CLK1 0x0000 /* System clock divisor */ 26 #define MCFPIT_PCSR_CLK2 0x0100 /* System clock divisor */ 27 #define MCFPIT_PCSR_CLK4 0x0200 /* System clock divisor */ 28 #define MCFPIT_PCSR_CLK8 0x0300 /* System clock divisor */ 29 #define MCFPIT_PCSR_CLK16 0x0400 /* System clock divisor */ 30 #define MCFPIT_PCSR_CLK32 0x0500 /* System clock divisor */ 31 #define MCFPIT_PCSR_CLK64 0x0600 /* System clock divisor */ 32 #define MCFPIT_PCSR_CLK128 0x0700 /* System clock divisor */ 33 #define MCFPIT_PCSR_CLK256 0x0800 /* System clock divisor */ 34 #define MCFPIT_PCSR_CLK512 0x0900 /* System clock divisor */ [all …]
|
/Linux-v6.1/arch/alpha/lib/ |
D | divide.S | 29 * the divisor is small is handled better by the DEC algorithm 38 * $1 - shifted divisor 43 * $25 - divisor 56 #define divisor $1 macro 104 bis $25,$25,divisor 109 LONGIFY(divisor) 114 beq divisor, 9f /* div by zero */ 118 * shift divisor left, using 3-bit shifts for 125 1: cmpult divisor,modulus,compare 126 s8addq divisor,$31,divisor [all …]
|
D | ev6-divide.S | 29 * the divisor is small is handled better by the DEC algorithm 38 * $1 - shifted divisor 43 * $25 - divisor 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 */ 137 * shift divisor left, using 3-bit shifts for 144 1: cmpult divisor,modulus,compare # E : 145 s8addq divisor,$31,divisor # E : [all …]
|
/Linux-v6.1/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() 25 /* We need the original value of the divisor after the remainder has been 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 [all …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/tools/testing/selftests/tc-testing/tc-tests/filters/ |
D | u32.json | 18 …"matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 … 63 …"matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 … 82 "cmdUnderTest": "$TC filter add dev $DEV1 ingress prio 99 handle 42: u32 divisor 256", 85 "matchPattern": "pref 99 u32 chain (0[ ]+$|0 fh 42: ht divisor 256|0 fh 800: ht divisor 1)", 104 "cmdUnderTest": "$TC filter replace dev $DEV1 ingress prio 99 handle 42:42 u32 divisor 256", 125 "$TC filter add dev $DEV1 ingress prio 99 handle 42: u32 divisor 256" 127 "cmdUnderTest": "$TC filter replace dev $DEV1 ingress prio 99 handle 42:42 u32 divisor 128", 130 "matchPattern": "pref 99 u32 chain (0[ ]+$|0 fh 42: ht divisor 256|0 fh 800: ht divisor 1)", 148 "$TC filter add dev $DEV1 ingress prio 99 handle 43: u32 divisor 256" 153 …"matchPattern": "filter protocol ip pref 98 u32 chain (0[ ]+$|0 fh 801: ht divisor 1|0 fh 801::800… [all …]
|
/Linux-v6.1/drivers/net/wireless/realtek/rtw89/ |
D | util.h | 17 /* The result of negative dividend and positive divisor is undefined, but it 20 * Note: the maximum value of divisor is 0x7FFF_FFFF, because we cast it to 23 static inline s32 s32_div_u32_round_down(s32 dividend, u32 divisor, s32 *remainder) in s32_div_u32_round_down() argument 25 s32 i_divisor = (s32)divisor; in s32_div_u32_round_down() 42 static inline s32 s32_div_u32_round_closest(s32 dividend, u32 divisor) in s32_div_u32_round_closest() argument 44 return s32_div_u32_round_down(dividend + divisor / 2, divisor, NULL); in s32_div_u32_round_closest()
|
/Linux-v6.1/drivers/acpi/acpica/ |
D | utmath.c | 243 * divisor - 32-bit divisor 257 u32 divisor, u64 *out_quotient, u32 *out_remainder) in acpi_ut_short_divide() argument 265 /* Always check for a zero divisor */ in acpi_ut_short_divide() 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() 301 * in_divisor - Divisor 316 union uint64_overlay divisor; in acpi_ut_divide() local 327 /* Always check for a zero divisor */ in acpi_ut_divide() 334 divisor.full = in_divisor; in acpi_ut_divide() [all …]
|
/Linux-v6.1/drivers/iio/common/hid-sensors/ |
D | hid-sensor-attributes.c | 71 static void simple_div(int dividend, int divisor, int *whole, in simple_div() argument 78 if (divisor == 0) { in simple_div() 82 *whole = dividend/divisor; in simple_div() 83 rem = dividend % divisor; in simple_div() 85 while (rem <= divisor) { in simple_div() 89 *micro_frac = (rem / divisor) * int_pow(10, 6 - exp); in simple_div() 95 int divisor = int_pow(10, exp); in split_micro_fraction() local 97 *val1 = no / divisor; in split_micro_fraction() 98 *val2 = no % divisor * int_pow(10, 6 - exp); in split_micro_fraction() 133 int divisor; in convert_to_vtf_format() local [all …]
|
/Linux-v6.1/drivers/clk/ |
D | clk-vt8500.c | 124 /* div == 0 is actually the highest divisor */ in vt8500_dclk_recalc_rate() 135 u32 divisor; in vt8500_dclk_round_rate() local 140 divisor = *prate / rate; in vt8500_dclk_round_rate() 142 /* If prate / rate would be decimal, incr the divisor */ in vt8500_dclk_round_rate() 143 if (rate * divisor < *prate) in vt8500_dclk_round_rate() 144 divisor++; in vt8500_dclk_round_rate() 147 * If this is a request for SDMMC we have to adjust the 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() [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/clock/ |
D | vt8500.txt | 41 Divisor device clocks: 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>;
|
/Linux-v6.1/arch/powerpc/lib/ |
D | div64.S | 7 * the 64-bit quotient, and r4 contains the divisor. 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,
|
/Linux-v6.1/include/linux/comedi/ |
D | comedi_8254.h | 67 * @divisor: divisor for single counter 68 * @divisor1: divisor loaded into first cascaded counter 69 * @divisor2: divisor loaded into second cascaded counter 70 * #next_div: next divisor for single counter 71 * @next_div1: next divisor to use for first cascaded counter 72 * @next_div2: next divisor to use for second cascaded counter 84 unsigned int divisor; member
|
/Linux-v6.1/arch/xtensa/lib/ |
D | udivsi3.S | 12 bltui a3, 2, .Lle_one /* check if the divisor <= 1 */ 16 do_nsau a4, a3, a2, a7 /* divisor_shift = nsau (divisor) */ 21 sll a3, a3 /* divisor <<= count */ 42 addi a2, a2, 1 /* increment quotient if dividend >= divisor */ 47 beqz a3, .Lerror /* if divisor == 1, return the dividend */ 51 /* return dividend >= divisor */
|
/Linux-v6.1/drivers/comedi/drivers/ |
D | comedi_8254.c | 78 * Calculates the divisor value needed for a single counter to generate 82 * Calculates the two divisor values needed to the generate the pacer 86 * Transfers the intermediate divisor values to the current divisors. 90 * divisor values. 298 * @counter1: the counter number for the first divisor 299 * @counter2: the counter number for the second divisor 339 i8254->divisor = i8254->next_div & 0xffff; in comedi_8254_update_divisors() 346 * comedi_8254_cascade_ns_to_timer - calculate the cascaded divisor values 431 * comedi_8254_ns_to_timer - calculate the divisor value for nanosec timing 439 unsigned int divisor; in comedi_8254_ns_to_timer() local [all …]
|
/Linux-v6.1/arch/sh/lib/ |
D | udivsi3_i4i-Os.S | 12 udiv small divisor: 55 cycles 13 udiv large divisor: 52 cycles 14 sdiv small divisor, positive result: 59 cycles 15 sdiv large divisor, positive result: 56 cycles 16 sdiv small divisor, negative result: 65 cycles (*) 17 sdiv large divisor, negative result: 62 cycles (*)
|
/Linux-v6.1/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ |
D | sfq.json | 18 … "matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum.*depth 127 divisor 1024", 64 "matchPattern": "depth 127 divisor 1024 perturb 10sec", 87 … "matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 9000b depth 127 divisor 1024", 96 "name": "Create SFQ with divisor setting", 107 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq divisor 512", 110 … "matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 127 divisor 512", 156 … "matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 64 divisor 1024", 179 …ttern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 127 headdrop divisor 1024", 202 …sc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 127 headdrop divisor 1024 ewma 6 min 8…
|
/Linux-v6.1/arch/x86/kernel/ |
D | early_printk.c | 94 #define DLL 0 /* Divisor Latch Low */ 95 #define DLH 1 /* Divisor latch High */ 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 183 /* Convert from baud to divisor value */ in early_serial_init() 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 [all …]
|
/Linux-v6.1/arch/m68k/lib/ |
D | udivsi3.S | 91 movel sp@(12), d1 /* d1 = divisor */ 94 cmpl IMM (0x10000), d1 /* divisor >= 2 ^ 16 ? */ 107 L3: movel d1, d2 /* use d2 as divisor backup */ 108 L4: lsrl IMM (1), d1 /* shift divisor */ 110 cmpl IMM (0x10000), d1 /* still divisor >= 2 ^ 16 ? */ 112 divu d1, d0 /* now we have 16 bit divisor */ 113 andl IMM (0xffff), d0 /* mask out divisor, ignore remainder */ 115 /* Multiply the 16 bit tentative quotient with the 32 bit divisor. Because of
|