Home
last modified time | relevance | path

Searched refs:BITS_PER_LONG (Results 1 – 25 of 488) sorted by relevance

12345678910>>...20

/Linux-v4.19/arch/s390/lib/
Dfind.c23 while (size & ~(BITS_PER_LONG - 1)) { in find_first_bit_inv()
26 result += BITS_PER_LONG; in find_first_bit_inv()
27 size -= BITS_PER_LONG; in find_first_bit_inv()
31 tmp = (*p) & (~0UL << (BITS_PER_LONG - size)); in find_first_bit_inv()
35 return result + (__fls(tmp) ^ (BITS_PER_LONG - 1)); in find_first_bit_inv()
42 const unsigned long *p = addr + (offset / BITS_PER_LONG); in find_next_bit_inv()
43 unsigned long result = offset & ~(BITS_PER_LONG - 1); in find_next_bit_inv()
49 offset %= BITS_PER_LONG; in find_next_bit_inv()
53 if (size < BITS_PER_LONG) in find_next_bit_inv()
57 size -= BITS_PER_LONG; in find_next_bit_inv()
[all …]
/Linux-v4.19/lib/
Dfind_bit.c43 tmp = addr1[start / BITS_PER_LONG]; in _find_next_bit()
45 tmp &= addr2[start / BITS_PER_LONG]; in _find_next_bit()
50 start = round_down(start, BITS_PER_LONG); in _find_next_bit()
53 start += BITS_PER_LONG; in _find_next_bit()
57 tmp = addr1[start / BITS_PER_LONG]; in _find_next_bit()
59 tmp &= addr2[start / BITS_PER_LONG]; in _find_next_bit()
106 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_bit()
108 return min(idx * BITS_PER_LONG + __ffs(addr[idx]), size); in find_first_bit()
124 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_zero_bit()
126 return min(idx * BITS_PER_LONG + ffz(addr[idx]), size); in find_first_zero_bit()
[all …]
Dbitmap.c53 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_equal()
58 if (bits % BITS_PER_LONG) in __bitmap_equal()
89 unsigned off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_right()
104 upper <<= (BITS_PER_LONG - rem); in __bitmap_shift_right()
135 unsigned int off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_left()
144 lower = src[k - 1] >> (BITS_PER_LONG - rem); in __bitmap_shift_left()
159 unsigned int lim = bits/BITS_PER_LONG; in __bitmap_and()
164 if (bits % BITS_PER_LONG) in __bitmap_and()
197 unsigned int lim = bits/BITS_PER_LONG; in __bitmap_andnot()
202 if (bits % BITS_PER_LONG) in __bitmap_andnot()
[all …]
/Linux-v4.19/arch/s390/include/asm/
Dbitops.h41 #define __BITOPS_WORDS(bits) (((bits) + BITS_PER_LONG - 1) / BITS_PER_LONG)
48 addr = (unsigned long)ptr + ((nr ^ (nr & (BITS_PER_LONG - 1))) >> 3); in __bitops_word()
55 return ((unsigned char *)ptr) + ((nr ^ (BITS_PER_LONG - 8)) >> 3); in __bitops_byte()
75 mask = 1UL << (nr & (BITS_PER_LONG - 1)); in set_bit()
96 mask = ~(1UL << (nr & (BITS_PER_LONG - 1))); in clear_bit()
117 mask = 1UL << (nr & (BITS_PER_LONG - 1)); in change_bit()
127 mask = 1UL << (nr & (BITS_PER_LONG - 1)); in test_and_set_bit()
138 mask = ~(1UL << (nr & (BITS_PER_LONG - 1))); in test_and_clear_bit()
149 mask = 1UL << (nr & (BITS_PER_LONG - 1)); in test_and_change_bit()
214 addr += (nr ^ (BITS_PER_LONG - 8)) >> 3; in test_bit()
[all …]
/Linux-v4.19/include/linux/
Du64_stats_sync.h66 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
74 #if BITS_PER_LONG == 32 && defined(CONFIG_SMP) in u64_stats_init()
81 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in u64_stats_update_begin()
88 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in u64_stats_update_end()
98 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in u64_stats_update_begin_irqsave()
109 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in u64_stats_update_end_irqrestore()
117 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in __u64_stats_fetch_begin()
126 #if BITS_PER_LONG==32 && !defined(CONFIG_SMP) in u64_stats_fetch_begin()
135 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in __u64_stats_fetch_retry()
145 #if BITS_PER_LONG==32 && !defined(CONFIG_SMP) in u64_stats_fetch_retry()
[all …]
Dhash.h14 #if BITS_PER_LONG == 32
17 #elif BITS_PER_LONG == 64
79 #if BITS_PER_LONG == 64 in hash_64_generic()
98 #if BITS_PER_LONG == 64 in hash32_ptr()
Djoystick.h26 #if BITS_PER_LONG == 64
28 #elif BITS_PER_LONG == 32
31 #error Unexpected BITS_PER_LONG
Dcount_zeros.h30 return BITS_PER_LONG - fls(x); in count_leading_zeros()
32 return BITS_PER_LONG - fls64(x); in count_leading_zeros()
35 #define COUNT_LEADING_ZEROS_0 BITS_PER_LONG
Dmod_devicetable.h330 kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
331 kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
332 kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
333 kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
334 kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
335 kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
336 kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
337 kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
338 kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
339 kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1];
Dbits.h8 #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
9 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
20 (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
/Linux-v4.19/tools/lib/
Dfind_bit.c44 tmp = addr1[start / BITS_PER_LONG]; in _find_next_bit()
46 tmp &= addr2[start / BITS_PER_LONG]; in _find_next_bit()
51 start = round_down(start, BITS_PER_LONG); in _find_next_bit()
54 start += BITS_PER_LONG; in _find_next_bit()
58 tmp = addr1[start / BITS_PER_LONG]; in _find_next_bit()
60 tmp &= addr2[start / BITS_PER_LONG]; in _find_next_bit()
87 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_bit()
89 return min(idx * BITS_PER_LONG + __ffs(addr[idx]), size); in find_first_bit()
104 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_zero_bit()
106 return min(idx * BITS_PER_LONG + ffz(addr[idx]), size); in find_first_zero_bit()
Dbitmap.c12 int k, w = 0, lim = bits/BITS_PER_LONG; in __bitmap_weight()
17 if (bits % BITS_PER_LONG) in __bitmap_weight()
66 unsigned int lim = bits/BITS_PER_LONG; in __bitmap_and()
71 if (bits % BITS_PER_LONG) in __bitmap_and()
/Linux-v4.19/tools/include/asm-generic/bitops/
D__fls.h15 int num = BITS_PER_LONG - 1; in __fls()
17 #if BITS_PER_LONG == 64 in __fls()
23 if (!(word & (~0ul << (BITS_PER_LONG-16)))) { in __fls()
27 if (!(word & (~0ul << (BITS_PER_LONG-8)))) { in __fls()
31 if (!(word & (~0ul << (BITS_PER_LONG-4)))) { in __fls()
35 if (!(word & (~0ul << (BITS_PER_LONG-2)))) { in __fls()
39 if (!(word & (~0ul << (BITS_PER_LONG-1)))) in __fls()
Dfls64.h18 #if BITS_PER_LONG == 32
26 #elif BITS_PER_LONG == 64
34 #error BITS_PER_LONG not 32 or 64
/Linux-v4.19/include/asm-generic/bitops/
D__fls.h15 int num = BITS_PER_LONG - 1; in __fls()
17 #if BITS_PER_LONG == 64 in __fls()
23 if (!(word & (~0ul << (BITS_PER_LONG-16)))) { in __fls()
27 if (!(word & (~0ul << (BITS_PER_LONG-8)))) { in __fls()
31 if (!(word & (~0ul << (BITS_PER_LONG-4)))) { in __fls()
35 if (!(word & (~0ul << (BITS_PER_LONG-2)))) { in __fls()
39 if (!(word & (~0ul << (BITS_PER_LONG-1)))) in __fls()
Dsched.h15 #if BITS_PER_LONG == 64 in sched_find_first_bit()
19 #elif BITS_PER_LONG == 32 in sched_find_first_bit()
28 #error BITS_PER_LONG not defined in sched_find_first_bit()
Dfls64.h18 #if BITS_PER_LONG == 32
26 #elif BITS_PER_LONG == 64
34 #error BITS_PER_LONG not 32 or 64
/Linux-v4.19/drivers/mtd/nand/
Dbbt.c28 BITS_PER_LONG); in nanddev_bbt_init()
78 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_get_block_status()
79 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_get_block_status()
86 if (bits_per_block + offs > BITS_PER_LONG) in nanddev_bbt_get_block_status()
87 status |= pos[1] << (BITS_PER_LONG - offs); in nanddev_bbt_get_block_status()
111 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_set_block_status()
112 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_set_block_status()
121 if (bits_per_block + offs > BITS_PER_LONG) { in nanddev_bbt_set_block_status()
122 unsigned int rbits = bits_per_block + offs - BITS_PER_LONG; in nanddev_bbt_set_block_status()
/Linux-v4.19/drivers/reset/
Dreset-zynq.c42 int bank = id / BITS_PER_LONG; in zynq_reset_assert()
43 int offset = id % BITS_PER_LONG; in zynq_reset_assert()
59 int bank = id / BITS_PER_LONG; in zynq_reset_deassert()
60 int offset = id % BITS_PER_LONG; in zynq_reset_deassert()
76 int bank = id / BITS_PER_LONG; in zynq_reset_status()
77 int offset = id % BITS_PER_LONG; in zynq_reset_status()
123 priv->rcdev.nr_resets = resource_size(res) / 4 * BITS_PER_LONG; in zynq_reset_probe()
/Linux-v4.19/drivers/scsi/megaraid/
Dmegaraid_mm.h75 #if BITS_PER_LONG == 32
79 #if BITS_PER_LONG == 64
89 #if BITS_PER_LONG == 32
93 #if BITS_PER_LONG == 64
/Linux-v4.19/tools/include/linux/
Dhash.h14 #if BITS_PER_LONG == 32
17 #elif BITS_PER_LONG == 64
79 #if BITS_PER_LONG == 64 in hash_64_generic()
98 #if BITS_PER_LONG == 64 in hash32_ptr()
Dbitops.h12 #ifndef BITS_PER_LONG
13 # define BITS_PER_LONG __WORDSIZE macro
16 #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
17 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
/Linux-v4.19/include/asm-generic/
Dbitsperlong.h9 #define BITS_PER_LONG 64 macro
11 #define BITS_PER_LONG 32 macro
18 #if 0 && BITS_PER_LONG != __BITS_PER_LONG
/Linux-v4.19/tools/include/asm-generic/
Dbitsperlong.h8 #define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) macro
10 #define BITS_PER_LONG __WORDSIZE macro
13 #if BITS_PER_LONG != __BITS_PER_LONG
/Linux-v4.19/arch/mips/include/asm/
Dbitops.h470 if (BITS_PER_LONG == 32 && !__builtin_constant_p(word) && in __fls()
483 if (BITS_PER_LONG == 64 && !__builtin_constant_p(word) && in __fls()
496 num = BITS_PER_LONG - 1; in __fls()
498 #if BITS_PER_LONG == 64 in __fls()
504 if (!(word & (~0ul << (BITS_PER_LONG-16)))) { in __fls()
508 if (!(word & (~0ul << (BITS_PER_LONG-8)))) { in __fls()
512 if (!(word & (~0ul << (BITS_PER_LONG-4)))) { in __fls()
516 if (!(word & (~0ul << (BITS_PER_LONG-2)))) { in __fls()
520 if (!(word & (~0ul << (BITS_PER_LONG-1)))) in __fls()

12345678910>>...20