| /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-6.6/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-6.6/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 …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | math64.h | 15 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder 17 * @divisor: unsigned 32bit divisor 20 * Return: sets ``*remainder``, then returns dividend / divisor 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() 32 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder 34 * @divisor: signed 32bit divisor 37 * Return: sets ``*remainder``, then returns dividend / divisor 39 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument [all …]
|
| /kernel/linux/linux-5.10/lib/math/ |
| D | div64.c | 65 * div_s64_rem - signed 64bit divide with 64bit divisor and remainder 67 * @divisor: 64bit divisor 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() 91 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder 93 * @divisor: 64bit divisor 102 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
| D | verifier_sdiv.c | 11 __description("SDIV32, non-zero imm divisor, check 1") 23 __description("SDIV32, non-zero imm divisor, check 2") 35 __description("SDIV32, non-zero imm divisor, check 3") 47 __description("SDIV32, non-zero imm divisor, check 4") 59 __description("SDIV32, non-zero imm divisor, check 5") 71 __description("SDIV32, non-zero imm divisor, check 6") 83 __description("SDIV32, non-zero imm divisor, check 7") 95 __description("SDIV32, non-zero imm divisor, check 8") 107 __description("SDIV32, non-zero reg divisor, check 1") 120 __description("SDIV32, non-zero reg divisor, check 2") [all …]
|
| /kernel/linux/linux-6.6/lib/math/ |
| D | div64.c | 67 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument 72 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 74 if (divisor > 0) in div_s64_rem() 77 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 78 if (divisor < 0) in div_s64_rem() 87 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder 89 * @divisor: 64bit divisor 98 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument 100 u32 high = divisor >> 32; in div64_u64_rem() 105 quot = div_u64_rem(dividend, divisor, &rem32); in div64_u64_rem() [all …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/lib/crypto/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 …]
|
| /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() 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 …]
|
| /kernel/linux/linux-6.6/drivers/cpufreq/ |
| D | sparc-us2e-cpufreq.c | 86 unsigned long old_divisor, unsigned long divisor) in frob_mem_refresh() argument 91 refr_count /= (MCTRL0_REFR_CLKS_P_CNT * divisor * 1000000000UL); in frob_mem_refresh() 118 unsigned long old_divisor, unsigned long divisor) in us2e_transition() argument 123 if (old_divisor == 2 && divisor == 1) { in us2e_transition() 126 frob_mem_refresh(0, clock_tick, old_divisor, divisor); in us2e_transition() 127 } else if (old_divisor == 1 && divisor == 2) { in us2e_transition() 128 frob_mem_refresh(1, clock_tick, old_divisor, divisor); in us2e_transition() 131 } else if (old_divisor == 1 && divisor > 2) { in us2e_transition() 135 2, divisor); in us2e_transition() 136 } else if (old_divisor > 2 && divisor == 1) { in us2e_transition() [all …]
|
| /kernel/linux/linux-6.6/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/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/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-6.6/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 …]
|
| /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/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 …]
|
| /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/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 …]
|