Home
last modified time | relevance | path

Searched refs:divisor (Results 1 – 25 of 222) sorted by relevance

123456789

/linux-6.3-rc2/arch/arm/lib/
A Dlib1funcs.S48 mov \divisor, \divisor, lsl \result
59 moveq \divisor, \divisor, lsl #3
69 movlo \divisor, \divisor, lsl #4
77 movlo \divisor, \divisor, lsl #1
100 movne \divisor, \divisor, lsr #4
116 movhs \divisor, \divisor, lsr #16
121 movhs \divisor, \divisor, lsr #8
125 movhs \divisor, \divisor, lsr #4
156 movlo \divisor, \divisor, lsl #4
164 movlo \divisor, \divisor, lsl #1
[all …]
/linux-6.3-rc2/lib/math/
A Ddiv64.c74 if (divisor > 0) in div_s64_rem()
78 if (divisor < 0) in div_s64_rem()
100 u32 high = divisor >> 32; in div64_u64_rem()
115 if (*remainder >= divisor) { in div64_u64_rem()
117 *remainder -= divisor; in div64_u64_rem()
138 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument
140 u32 high = divisor >> 32; in div64_u64()
144 quot = div_u64(dividend, divisor); in div64_u64()
151 if ((dividend - quot * divisor) >= divisor) in div64_u64()
161 s64 div64_s64(s64 dividend, s64 divisor) in div64_s64() argument
[all …]
/linux-6.3-rc2/include/linux/
A Dmath64.h28 *remainder = dividend % divisor; in div_u64_rem()
29 return dividend / divisor; in div_u64_rem()
42 *remainder = dividend % divisor; in div_s64_rem()
43 return dividend / divisor; in div_s64_rem()
56 *remainder = dividend % divisor; in div64_u64_rem()
57 return dividend / divisor; in div64_u64_rem()
69 return dividend / divisor; in div64_u64()
81 return dividend / divisor; in div64_s64()
279 rl.l.high = do_div(rh.ll, divisor); in mul_u64_u32_div()
282 do_div(rl.ll, divisor); in mul_u64_u32_div()
[all …]
A Dmath.h86 #define DIV_ROUND_CLOSEST(x, divisor)( \ argument
89 typeof(divisor) __d = divisor; \
91 ((typeof(divisor))-1) > 0 || \
101 #define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ argument
103 typeof(divisor) __d = divisor; \
/linux-6.3-rc2/arch/alpha/lib/
A Ddivide.S56 #define divisor $1 macro
104 bis $25,$25,divisor
109 LONGIFY(divisor)
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
142 subq modulus,divisor,tmp1
[all …]
A Dev6-divide.S66 #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 */
145 s8addq divisor,$31,divisor # E :
152 blt divisor, 2f # U : U L U L
154 addq divisor,divisor,divisor # E :
172 cmpule divisor,modulus,compare # E :
173 subq modulus,divisor,tmp1 # E :
178 srl divisor,1,divisor # U :
[all …]
/linux-6.3-rc2/drivers/cpufreq/
A Dsparc-us2e-cpufreq.c125 if (old_divisor == 2 && divisor == 1) { 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()
142 2, divisor); in us2e_transition()
143 } else if (old_divisor < divisor) { in us2e_transition()
146 } else if (old_divisor > divisor) { in us2e_transition()
254 divisor = index_to_divisor(*index); in __us2e_freq_target()
255 new_freq /= divisor; in __us2e_freq_target()
261 if (old_divisor != divisor) { in __us2e_freq_target()
[all …]
/linux-6.3-rc2/lib/mpi/
A Dmpi-div.c22 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()
52 int divisor_sign = divisor->sign; in mpi_fdiv_qr()
55 if (quot == divisor || rem == divisor) { in mpi_fdiv_qr()
56 temp_divisor = mpi_copy(divisor); in mpi_fdiv_qr()
57 divisor = temp_divisor; in mpi_fdiv_qr()
[all …]
/linux-6.3-rc2/drivers/acpi/acpica/
A Dutmath.c267 if (divisor == 0) { 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()
361 normalized_divisor = divisor; in acpi_ut_divide()
384 partial1 = quotient.part.lo * divisor.part.hi; in acpi_ut_divide()
396 remainder.full -= divisor.full; in acpi_ut_divide()
400 remainder.full -= divisor.full; in acpi_ut_divide()
452 if (divisor == 0) { in acpi_ut_short_divide()
460 *out_quotient = in_dividend / divisor; in acpi_ut_short_divide()
[all …]
/linux-6.3-rc2/drivers/iio/common/hid-sensors/
A Dhid-sensor-attributes.c78 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()
97 *val1 = no / divisor; in split_micro_fraction()
133 int divisor; in convert_to_vtf_format() local
358 int divisor; in adjust_exponent_nano() local
373 x = scale1 / divisor; in adjust_exponent_nano()
386 *val0 = scale0 / divisor; in adjust_exponent_nano()
387 rem = scale0 % divisor; in adjust_exponent_nano()
[all …]
/linux-6.3-rc2/Documentation/devicetree/bindings/clock/ti/
A Ddivider.txt8 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-6.3-rc2/arch/mips/cavium-octeon/executive/
A Dcvmx-helper-jtag.c50 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()
/linux-6.3-rc2/sound/soc/codecs/
A Dtlv320aic26.c70 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 …]
/linux-6.3-rc2/drivers/net/wireless/realtek/rtw89/
A Dutil.h23 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-6.3-rc2/arch/x86/include/asm/
A Ddiv64.h43 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()
/linux-6.3-rc2/drivers/clk/
A Dclk-vt8500.c135 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()
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()
170 divisor = 0; in vt8500_dclk_set_rate()
178 divisor = 0x20 + (divisor / 64); in vt8500_dclk_set_rate()
[all …]
/linux-6.3-rc2/arch/powerpc/lib/
A Ddiv64.S22 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-6.3-rc2/arch/x86/kernel/
A Dearly_printk.c130 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()
/linux-6.3-rc2/drivers/comedi/drivers/
A Dcomedi_8254.c339 i8254->divisor = i8254->next_div & 0xffff; in comedi_8254_update_divisors()
439 unsigned int divisor; in comedi_8254_ns_to_timer() local
444 divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base); in comedi_8254_ns_to_timer()
447 divisor = DIV_ROUND_UP(*nanosec, i8254->osc_base); in comedi_8254_ns_to_timer()
450 divisor = *nanosec / i8254->osc_base; in comedi_8254_ns_to_timer()
453 if (divisor < 2) in comedi_8254_ns_to_timer()
454 divisor = 2; in comedi_8254_ns_to_timer()
455 if (divisor > I8254_MAX_COUNT) in comedi_8254_ns_to_timer()
456 divisor = I8254_MAX_COUNT; in comedi_8254_ns_to_timer()
458 *nanosec = divisor * i8254->osc_base; in comedi_8254_ns_to_timer()
[all …]
A Dadv_pci1760.c178 unsigned int divisor; in pci1760_pwm_ns_to_div() local
182 divisor = DIV_ROUND_CLOSEST(ns, PCI1760_PWM_TIMEBASE); in pci1760_pwm_ns_to_div()
185 divisor = DIV_ROUND_UP(ns, PCI1760_PWM_TIMEBASE); in pci1760_pwm_ns_to_div()
188 divisor = ns / PCI1760_PWM_TIMEBASE; in pci1760_pwm_ns_to_div()
194 if (divisor < 1) in pci1760_pwm_ns_to_div()
195 divisor = 1; in pci1760_pwm_ns_to_div()
196 if (divisor > 0xffff) in pci1760_pwm_ns_to_div()
197 divisor = 0xffff; in pci1760_pwm_ns_to_div()
199 return divisor; in pci1760_pwm_ns_to_div()
/linux-6.3-rc2/drivers/cpuidle/governors/
A Dmenu.c172 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()
/linux-6.3-rc2/arch/x86/boot/
A Dstring.c201 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()
/linux-6.3-rc2/include/vdso/
A Dmath64.h6 __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()
/linux-6.3-rc2/Documentation/devicetree/bindings/clock/
A Dvt8500.txt44 - 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-6.3-rc2/drivers/usb/serial/
A Doti6858.c114 (((a)->divisor == (priv)->pending_setup.divisor) \
182 __le16 divisor; member
229 new_setup->divisor = priv->pending_setup.divisor; in setup_line()
406 __le16 divisor; in oti6858_set_termios() local
412 divisor = priv->pending_setup.divisor; in oti6858_set_termios()
441 divisor = 0; in oti6858_set_termios()
449 divisor = cpu_to_le16(new_divisor); in oti6858_set_termios()
491 if (divisor != priv->pending_setup.divisor in oti6858_set_termios()
494 priv->pending_setup.divisor = divisor; in oti6858_set_termios()
524 buf->divisor = cpu_to_le16(0x009c); /* 38400 bps */ in oti6858_open()
[all …]

Completed in 61 milliseconds

123456789