Home
last modified time | relevance | path

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

12345678910>>...17

/linux/arch/s390/lib/
H A 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/lib/
H A Dbitmap.c40 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_equal()
45 if (bits % BITS_PER_LONG) in __bitmap_equal()
58 unsigned int k, lim = bits / BITS_PER_LONG; in __bitmap_or_equal()
66 if (!(bits % BITS_PER_LONG)) in __bitmap_or_equal()
97 unsigned off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_right()
112 upper <<= (BITS_PER_LONG - rem); in __bitmap_shift_right()
143 unsigned int off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_left()
152 lower = src[k - 1] >> (BITS_PER_LONG - rem); in __bitmap_shift_left()
207 if (first % BITS_PER_LONG) { in bitmap_cut()
208 keep = src[first / BITS_PER_LONG] & in bitmap_cut()
[all …]
/linux/tools/lib/
H A Dbitmap.c10 unsigned int k, w = 0, lim = bits/BITS_PER_LONG; in __bitmap_weight()
15 if (bits % BITS_PER_LONG) in __bitmap_weight()
64 unsigned int lim = bits/BITS_PER_LONG; in __bitmap_and()
69 if (bits % BITS_PER_LONG) in __bitmap_and()
78 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_equal()
83 if (bits % BITS_PER_LONG) in __bitmap_equal()
93 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_intersects()
98 if (bits % BITS_PER_LONG) in __bitmap_intersects()
108 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_set()
[all...]
H A Dfind_bit.c31 for (idx = 0; idx * BITS_PER_LONG < sz; idx++) { \
34 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(val)), sz); \
57 idx = __start / BITS_PER_LONG; \
60 if ((idx + 1) * BITS_PER_LONG >= sz) \
65 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(tmp)), sz); \
/linux/include/linux/device-id/
H A Dinput.h48 kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
49 kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
50 kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
51 kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
52 kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
53 kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
54 kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
55 kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
56 kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
57 kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1];
/linux/arch/mips/include/asm/
H A Dbitops.h92 int bit = nr % BITS_PER_LONG; in set_bit()
120 int bit = nr % BITS_PER_LONG; in clear_bit()
161 int bit = nr % BITS_PER_LONG; in change_bit()
183 int bit = nr % BITS_PER_LONG; in test_and_set_bit_lock()
227 int bit = nr % BITS_PER_LONG; in test_and_clear_bit()
264 int bit = nr % BITS_PER_LONG; in test_and_change_bit()
334 if (BITS_PER_LONG == 32 && !__builtin_constant_p(word) && in __fls()
347 if (BITS_PER_LONG == 64 && !__builtin_constant_p(word) && in __fls()
360 num = BITS_PER_LONG - 1; in __fls()
362 #if BITS_PER_LONG == 64 in __fls()
[all …]
/linux/include/asm-generic/bitops/
H A D__fls.h15 unsigned int num = BITS_PER_LONG - 1; in generic___fls()
17 #if BITS_PER_LONG == 64 in generic___fls()
23 if (!(word & (~0ul << (BITS_PER_LONG-16)))) { in generic___fls()
27 if (!(word & (~0ul << (BITS_PER_LONG-8)))) { in generic___fls()
31 if (!(word & (~0ul << (BITS_PER_LONG-4)))) { in generic___fls()
35 if (!(word & (~0ul << (BITS_PER_LONG-2)))) { in generic___fls()
39 if (!(word & (~0ul << (BITS_PER_LONG-1)))) in generic___fls()
H A 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()
/linux/tools/include/asm-generic/bitops/
H A D__fls.h15 unsigned int num = BITS_PER_LONG - 1; in generic___fls()
17 #if BITS_PER_LONG == 64 in generic___fls()
23 if (!(word & (~0ul << (BITS_PER_LONG-16)))) { in generic___fls()
27 if (!(word & (~0ul << (BITS_PER_LONG-8)))) { in generic___fls()
31 if (!(word & (~0ul << (BITS_PER_LONG-4)))) { in generic___fls()
35 if (!(word & (~0ul << (BITS_PER_LONG-2)))) { in generic___fls()
39 if (!(word & (~0ul << (BITS_PER_LONG-1)))) in generic___fls()
/linux/drivers/video/fbdev/core/
H A Dfb_fillrect.h66 #define FB_PAT(i) (((1UL<<(BITS_PER_LONG-1)/(i)*(i))/((1<<(i))-1)<<(i))|1)
71 static const unsigned long mulconst[BITS_PER_LONG/4] = { in pixel_to_pat()
74 #if BITS_PER_LONG == 64 in pixel_to_pat()
82 case 0 ... BITS_PER_LONG/4-1: in pixel_to_pat()
85 case BITS_PER_LONG/4 ... BITS_PER_LONG/2-1: in pixel_to_pat()
90 case BITS_PER_LONG/2 ... BITS_PER_LONG-1: in pixel_to_pat()
98 pattern <<= (BITS_PER_LONG % bpp); in pixel_to_pat()
115 last = ~fb_pixel_mask(end & (BITS_PER_LONG-1), pattern->reverse); in bitfill()
117 if (end <= BITS_PER_LONG) { in bitfill()
131 end /= BITS_PER_LONG; in bitfill()
[all …]
/linux/drivers/mtd/nand/
H A Dbbt.c76 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_get_block_status()
77 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_get_block_status()
84 if (bits_per_block + offs > BITS_PER_LONG) in nanddev_bbt_get_block_status()
85 status |= pos[1] << (BITS_PER_LONG - offs); in nanddev_bbt_get_block_status()
109 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_set_block_status()
110 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_set_block_status()
119 if (bits_per_block + offs > BITS_PER_LONG) { in nanddev_bbt_set_block_status()
120 unsigned int rbits = bits_per_block + offs - BITS_PER_LONG; in nanddev_bbt_set_block_status()
/linux/arch/s390/include/asm/
H A Dbitops.h62 addr += (nr ^ (BITS_PER_LONG - BITS_PER_BYTE)) / BITS_PER_BYTE; in arch_test_bit()
95 return set_bit(nr ^ (BITS_PER_LONG - 1), ptr); in set_bit_inv()
100 return clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in clear_bit_inv()
106 return test_and_clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_and_clear_bit_inv()
111 return __set_bit(nr ^ (BITS_PER_LONG - 1), ptr); in __set_bit_inv()
116 return __clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in __clear_bit_inv()
122 return test_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_bit_inv()
196 return BITS_PER_LONG - __flogr(-val & val); in ffs()
/linux/drivers/firmware/efi/libstub/
H A Dbitmap.c7 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_set()
13 bits_to_set = BITS_PER_LONG; in __bitmap_set()
27 int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_clear()
33 bits_to_clear = BITS_PER_LONG; in __bitmap_clear()
/linux/fs/
H A Dfile.c97 unsigned int sysctl_nr_open_min = BITS_PER_LONG;
101 __const_min(INT_MAX, ~(size_t)0/sizeof(void *)) & -BITS_PER_LONG;
118 #define fdt_words(fdt) ((fdt)->max_fds / BITS_PER_LONG) // words in ->open_fds
130 copy_words * BITS_PER_LONG, nwords * BITS_PER_LONG); in copy_fd_bitmaps()
132 copy_words * BITS_PER_LONG, nwords * BITS_PER_LONG); in copy_fd_bitmaps()
195 nr = round_down(sysctl_nr_open, BITS_PER_LONG); in alloc_fdtable()
337 fd /= BITS_PER_LONG; in __set_open_fd()
345 fd /= BITS_PER_LONG; in __clear_open_fd()
358 unsigned int first = i * BITS_PER_LONG; in fd_range_word()
359 unsigned int last = first + BITS_PER_LONG - 1; in fd_range_word()
[all …]
/linux/drivers/reset/
H A Dreset-zynq.c34 int bank = id / BITS_PER_LONG; in zynq_reset_assert()
35 int offset = id % BITS_PER_LONG; in zynq_reset_assert()
51 int bank = id / BITS_PER_LONG; in zynq_reset_deassert()
52 int offset = id % BITS_PER_LONG; in zynq_reset_deassert()
68 int bank = id / BITS_PER_LONG; in zynq_reset_status()
69 int offset = id % BITS_PER_LONG; in zynq_reset_status()
114 priv->rcdev.nr_resets = resource_size(res) / 4 * BITS_PER_LONG; in zynq_reset_probe()
/linux/arch/mips/lib/
H A Dbitops.c24 unsigned int bit = nr % BITS_PER_LONG; in __mips_set_bit()
45 unsigned int bit = nr % BITS_PER_LONG; in __mips_clear_bit()
66 unsigned int bit = nr % BITS_PER_LONG; in __mips_change_bit()
88 unsigned int bit = nr % BITS_PER_LONG; in __mips_test_and_set_bit_lock()
112 unsigned int bit = nr % BITS_PER_LONG; in __mips_test_and_clear_bit()
136 unsigned int bit = nr % BITS_PER_LONG; in __mips_test_and_change_bit()
/linux/tools/include/asm-generic/
H A 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
22 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
/linux/include/linux/
H A Dpage-flags-layout.h59 <= BITS_PER_LONG - NR_PAGEFLAGS
96 KASAN_TAG_WIDTH + LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
107 KASAN_TAG_WIDTH + LAST_CPUPID_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
112 #define LRU_REFS_WIDTH min(__LRU_REFS_WIDTH, BITS_PER_LONG - NR_PAGEFLAGS - \
120 #define NR_UNUSED_PAGEFLAG_BITS (BITS_PER_LONG - \
H A Dbitmap.h240 #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1)))
241 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1)))
243 #define bitmap_size(nbits) (ALIGN(nbits, BITS_PER_LONG) / BITS_PER_BYTE)
283 if (nbits % BITS_PER_LONG) in bitmap_copy_clear_tail()
284 dst[nbits / BITS_PER_LONG] &= BITMAP_LAST_WORD_MASK(nbits); in bitmap_copy_clear_tail()
294 if (count % BITS_PER_LONG) in bitmap_copy_and_extend()
307 #if BITS_PER_LONG == 64
325 #if BITS_PER_LONG == 32
536 bitmap += start / BITS_PER_LONG; in bitmap_weight_from()
538 end -= start & ~(BITS_PER_LONG - 1); in bitmap_weight_from()
[all …]
H A Dhash.h14 #if BITS_PER_LONG == 32
17 #elif BITS_PER_LONG == 64
76 #if BITS_PER_LONG == 64 in hash_64_generic()
95 #if BITS_PER_LONG == 64 in hash32_ptr()
H A Djoystick.h14 #if BITS_PER_LONG == 64
16 #elif BITS_PER_LONG == 32
19 #error Unexpected BITS_PER_LONG
H A Dnetfs.h522 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in netfs_read_remote_i_size()
529 #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPTION) in netfs_read_remote_i_size()
559 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in netfs_write_remote_i_size()
563 #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPTION) in netfs_write_remote_i_size()
597 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in netfs_read_zero_point()
604 #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPTION) in netfs_read_zero_point()
634 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in netfs_write_zero_point()
638 #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPTION) in netfs_write_zero_point()
676 #if BITS_PER_LONG==32 && defined(CONFIG_SMP) in netfs_read_sizes()
685 #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPTION) in netfs_read_sizes()
[all …]
/linux/drivers/scsi/megaraid/
H A Dmegaraid_mm.h71 #if BITS_PER_LONG == 32
75 #if BITS_PER_LONG == 64
85 #if BITS_PER_LONG == 32
89 #if BITS_PER_LONG == 64
/linux/tools/include/linux/
H A Dhash.h14 #if BITS_PER_LONG == 32
17 #elif BITS_PER_LONG == 64
76 #if BITS_PER_LONG == 64 in hash_64_generic()
95 #if BITS_PER_LONG == 64 in hash32_ptr()
/linux/arch/riscv/include/asm/
H A Dbitops.h37 #if (BITS_PER_LONG == 64)
40 #elif (BITS_PER_LONG == 32)
83 return BITS_PER_LONG - 1 - word; in variable__fls()
94 (unsigned long)(BITS_PER_LONG - 1 - __builtin_clzl(word)) : \
171 #if (BITS_PER_LONG == 64)
173 #elif (BITS_PER_LONG == 32)

12345678910>>...17