/linux/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() 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 D | bitmap.c | 20 * BITS_PER_LONG. 40 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() 96 unsigned off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_right() 111 upper <<= (BITS_PER_LONG - rem); in __bitmap_shift_right() 142 unsigned int off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_left() [all...] |
H A D | find_bit.c | 33 for (idx = 0; idx * BITS_PER_LONG < sz; idx++) { \ 36 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(val)), sz); \ 59 idx = __start / BITS_PER_LONG; \ 62 if ((idx + 1) * BITS_PER_LONG >= sz) \ 67 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(tmp)), sz); \ 76 for (idx = 0; (idx + 1) * BITS_PER_LONG <= sz; idx++) { \ 77 if (idx * BITS_PER_LONG + nr >= sz) \ 88 if (sz % BITS_PER_LONG) \ 91 sz = idx * BITS_PER_LONG + fns(tmp, nr); \ 232 unsigned long idx = (size-1) / BITS_PER_LONG; in _find_last_bit() [all...] |
/linux/arch/s390/include/asm/ |
H A D | bitops.h | 62 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() 184 return __flogr(-word & word) ^ (BITS_PER_LONG - 1); in __ffs() 196 unsigned long mask = 2 * BITS_PER_LONG - 1; in ffs() 199 return (1 + (__flogr(-val & val) ^ (BITS_PER_LONG in ffs() [all...] |
/linux/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() 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 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/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/include/linux/ |
H A D | hmm.h | 40 HMM_PFN_VALID = 1UL << (BITS_PER_LONG - 1), 41 HMM_PFN_WRITE = 1UL << (BITS_PER_LONG - 2), 42 HMM_PFN_ERROR = 1UL << (BITS_PER_LONG - 3), 47 HMM_PFN_DMA_MAPPED = 1UL << (BITS_PER_LONG - 4), 48 HMM_PFN_P2PDMA = 1UL << (BITS_PER_LONG - 5), 49 HMM_PFN_P2PDMA_BUS = 1UL << (BITS_PER_LONG - 6), 51 HMM_PFN_ORDER_SHIFT = (BITS_PER_LONG - 11),
|
H A D | page-flags-layout.h | 59 <= 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 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()
|
H A D | joystick.h | 14 #if BITS_PER_LONG == 64 16 #elif BITS_PER_LONG == 32 19 #error Unexpected BITS_PER_LONG
|
/linux/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() 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 in __fls() [all...] |
/linux/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() 347 tab[0] = fb_pack(bgcolor, bgcolor, BITS_PER_LONG/2); in fb_bitmap_2ppw() 348 tab[1] = fb_pack(bgcolor, fgcolor, BITS_PER_LONG/2); in fb_bitmap_2ppw() 349 tab[2] = fb_pack(fgcolor, bgcolor, BITS_PER_LONG/ in fb_bitmap_2ppw() [all...] |
H A D | fb_fillrect.h | 66 #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() 99 pattern <<= (BITS_PER_LONG % bpp); in pixel_to_pat() 116 last = ~fb_pixel_mask(end & (BITS_PER_LONG in bitfill() [all...] |
H A D | fb_copyarea.h | 57 last = ~fb_pixel_mask(end & (BITS_PER_LONG-1), reverse); in fb_copy_aligned_fwd() 60 if (end <= BITS_PER_LONG) { in fb_copy_aligned_fwd() 78 end /= BITS_PER_LONG; in fb_copy_aligned_fwd() 103 last = ~fb_pixel_mask(end & (BITS_PER_LONG-1), reverse); in fb_copy_aligned_rev() 105 if (end <= BITS_PER_LONG) { in fb_copy_aligned_rev() 118 end /= BITS_PER_LONG; in fb_copy_aligned_rev() 170 last = ~fb_pixel_mask(end & (BITS_PER_LONG-1), reverse); in fb_copy_fwd() 173 right = shift & (BITS_PER_LONG - 1); in fb_copy_fwd() 174 left = -shift & (BITS_PER_LONG - 1); in fb_copy_fwd() 176 if (end <= BITS_PER_LONG) { in fb_copy_fwd() [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/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/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/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/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 28 * that BITMAP_SIZE(n) is 1, i.e. 1 <= n <= BITS_PER_LONG. This allows 36 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
|
/linux/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/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/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/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()
|