| /linux-6.15/arch/s390/lib/ |
| H A D | find.c | 23 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() 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() 58 result += BITS_PER_LONG; in find_next_bit_inv() 60 while (size & ~(BITS_PER_LONG-1)) { in find_next_bit_inv() 63 result += BITS_PER_LONG; in find_next_bit_inv() 64 size -= BITS_PER_LONG; in find_next_bit_inv() [all …]
|
| /linux-6.15/lib/ |
| H A D | bitmap.c | 45 if (bits % BITS_PER_LONG) in __bitmap_equal() 96 unsigned off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_right() 142 unsigned int off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_left() 208 (~0UL >> (BITS_PER_LONG - first % BITS_PER_LONG)); in bitmap_cut() 224 dst[first / BITS_PER_LONG] &= ~0UL << (first % BITS_PER_LONG); in bitmap_cut() 238 if (bits % BITS_PER_LONG) in __bitmap_and() 276 if (bits % BITS_PER_LONG) in __bitmap_andnot() 362 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_set() 383 int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_clear() 781 #if BITS_PER_LONG == 64 [all …]
|
| H A D | find_bit.c | 32 for (idx = 0; idx * BITS_PER_LONG < sz; idx++) { \ 35 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(val)), sz); \ 58 idx = __start / BITS_PER_LONG; \ 61 if ((idx + 1) * BITS_PER_LONG >= sz) \ 66 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(tmp)), sz); \ 75 for (idx = 0; (idx + 1) * BITS_PER_LONG <= sz; idx++) { \ 76 if (idx * BITS_PER_LONG + nr >= sz) \ 87 if (sz % BITS_PER_LONG) \ 90 sz = idx * BITS_PER_LONG + fns(tmp, nr); \ 220 unsigned long idx = (size-1) / BITS_PER_LONG; in _find_last_bit() [all …]
|
| /linux-6.15/arch/s390/include/asm/ |
| H A D | bitops.h | 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() 184 return __flogr(-word & word) ^ (BITS_PER_LONG - 1); in __ffs() 196 unsigned long mask = 2 * BITS_PER_LONG - 1; in ffs() 210 return __flogr(word) ^ (BITS_PER_LONG - 1); in __fls() 226 unsigned long mask = 2 * BITS_PER_LONG - 1; in fls64() [all …]
|
| /linux-6.15/tools/lib/ |
| H A D | bitmap.c | 10 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() 98 if (bits % BITS_PER_LONG) in __bitmap_intersects() 108 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_set() 114 bits_to_set = BITS_PER_LONG; in __bitmap_set() 128 int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_clear() [all …]
|
| H A D | find_bit.c | 31 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-6.15/include/asm-generic/bitops/ |
| H A D | __fls.h | 15 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-6.15/tools/include/asm-generic/bitops/ |
| H A D | __fls.h | 15 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-6.15/arch/mips/include/asm/ |
| H A D | bitops.h | 92 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() 360 num = BITS_PER_LONG - 1; in __fls() 362 #if BITS_PER_LONG == 64 in __fls() 372 if (!(word & (~0ul << (BITS_PER_LONG-8)))) { in __fls() 376 if (!(word & (~0ul << (BITS_PER_LONG-4)))) { in __fls() [all …]
|
| /linux-6.15/drivers/video/fbdev/core/ |
| H A D | cfbmem.h | 20 ptr.address = PTR_ALIGN_DOWN(base, BITS_PER_LONG / BITS_PER_BYTE); in fb_address_init() 28 #if BITS_PER_LONG == 32 in fb_write_offset() 29 fb_writel(val, dst->address + offset * (BITS_PER_LONG / BITS_PER_BYTE)); in fb_write_offset() 31 fb_writeq(val, dst->address + offset * (BITS_PER_LONG / BITS_PER_BYTE)); in fb_write_offset() 38 #if BITS_PER_LONG == 32 in fb_read_offset() 39 return fb_readl(src->address + offset * (BITS_PER_LONG / BITS_PER_BYTE)); in fb_read_offset() 41 return fb_readq(src->address + offset * (BITS_PER_LONG / BITS_PER_BYTE)); in fb_read_offset()
|
| H A D | fb_imageblit.h | 121 *pixels <<= BITS_PER_LONG - *bits; in fb_bitmap4x_image() 149 if (shift < BITS_PER_LONG) in fb_bitblit() 154 shift &= BITS_PER_LONG - 1; in fb_bitblit() 185 iter.shift = BITS_PER_LONG - BITS_PER_BYTE; in fb_color_imageblit() 187 iter.shift = BITS_PER_LONG - bpp; in fb_color_imageblit() 266 iter.colors[0] <<= BITS_PER_LONG - bpp; in fb_bitmap1x_imageblit() 267 iter.colors[1] <<= BITS_PER_LONG - bpp; in fb_bitmap1x_imageblit() 383 #define FB_PATP(a, b) (((a)<<((b)*BITS_PER_LONG/4))*((1UL<<BITS_PER_LONG/4)-1UL)) 410 fgcolor = fgcolor | fgcolor << BITS_PER_LONG/4; in fb_bitmap_4ppw() 411 bgcolor = bgcolor | bgcolor << BITS_PER_LONG/4; in fb_bitmap_4ppw() [all …]
|
| H A D | fb_fillrect.h | 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() 99 pattern <<= (BITS_PER_LONG % bpp); in pixel_to_pat() 118 if (end <= BITS_PER_LONG) { in bitfill() 132 end /= BITS_PER_LONG; in bitfill() 167 if (end <= BITS_PER_LONG) { in bitinvert() 180 end /= BITS_PER_LONG; in bitinvert() [all …]
|
| H A D | fb_copyarea.h | 60 if (end <= BITS_PER_LONG) { in fb_copy_aligned_fwd() 78 end /= BITS_PER_LONG; in fb_copy_aligned_fwd() 105 if (end <= BITS_PER_LONG) { in fb_copy_aligned_rev() 118 end /= BITS_PER_LONG; in fb_copy_aligned_rev() 176 if (end <= BITS_PER_LONG) { in fb_copy_fwd() 211 end /= BITS_PER_LONG; in fb_copy_fwd() 245 > offset * BITS_PER_LONG + ((shift < 0) ? BITS_PER_LONG : 0)) in fb_copy_fwd() 267 right = shift & (BITS_PER_LONG-1); in fb_copy_rev() 268 left = -shift & (BITS_PER_LONG-1); in fb_copy_rev() 270 if (end <= BITS_PER_LONG) { in fb_copy_rev() [all …]
|
| H A D | fb_draw.h | 11 #define swab_long _swab_long(BITS_PER_LONG) 18 adr->address += offset * (BITS_PER_LONG / BITS_PER_BYTE); in fb_address_move_long() 26 adr->bits = bits & (BITS_PER_LONG - 1u); in fb_address_forward() 27 adr->address += (bits & ~(BITS_PER_LONG - 1u)) / BITS_PER_BYTE; in fb_address_forward() 35 adr->bits = bits & (BITS_PER_LONG - 1); in fb_address_backward() 105 #if defined(CONFIG_HAVE_ARCH_BITREVERSE) && BITS_PER_LONG == 32 in fb_reverse_bits_long()
|
| /linux-6.15/drivers/mtd/nand/ |
| H A D | bbt.c | 76 ((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-6.15/drivers/firmware/efi/libstub/ |
| H A D | bitmap.c | 7 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-6.15/drivers/reset/ |
| H A D | reset-zynq.c | 34 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-6.15/include/asm-generic/ |
| H A D | bitsperlong.h | 9 #define BITS_PER_LONG 64 macro 11 #define BITS_PER_LONG 32 macro 18 #if 0 && BITS_PER_LONG != __BITS_PER_LONG 36 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
|
| /linux-6.15/arch/mips/lib/ |
| H A D | bitops.c | 24 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-6.15/tools/include/asm-generic/ |
| H A D | bitsperlong.h | 8 #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-6.15/include/linux/ |
| H A D | page-flags-layout.h | 59 <= BITS_PER_LONG - NR_PAGEFLAGS 94 KASAN_TAG_WIDTH + LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS 105 KASAN_TAG_WIDTH + LAST_CPUPID_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS 110 #define LRU_REFS_WIDTH min(__LRU_REFS_WIDTH, BITS_PER_LONG - NR_PAGEFLAGS - \ 118 #define NR_UNUSED_PAGEFLAG_BITS (BITS_PER_LONG - \
|
| H A D | hmm.h | 36 HMM_PFN_VALID = 1UL << (BITS_PER_LONG - 1), 37 HMM_PFN_WRITE = 1UL << (BITS_PER_LONG - 2), 38 HMM_PFN_ERROR = 1UL << (BITS_PER_LONG - 3), 39 HMM_PFN_ORDER_SHIFT = (BITS_PER_LONG - 8),
|
| H A D | hash.h | 14 #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-6.15/drivers/scsi/megaraid/ |
| H A D | megaraid_mm.h | 71 #if BITS_PER_LONG == 32 75 #if BITS_PER_LONG == 64 85 #if BITS_PER_LONG == 32 89 #if BITS_PER_LONG == 64
|
| /linux-6.15/tools/include/linux/ |
| H A D | hash.h | 14 #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()
|