Home
last modified time | relevance | path

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

12345678910>>...24

/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()
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()
151 lower = src[k - 1] >> (BITS_PER_LONG - rem); in __bitmap_shift_left()
206 if (first % BITS_PER_LONG) { in bitmap_cut()
207 keep = src[first / BITS_PER_LONG] & in bitmap_cut()
[all …]
H A Dfind_bit.c33 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/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()
114 bits_to_set = 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/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/drivers/video/fbdev/core/
H A Dfb_imageblit.h121 *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/2); in fb_bitmap_2ppw()
[all …]
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 …]
H A Dcfbmem.h20 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 Dfb_copyarea.h57 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 Dfb_draw.h11 #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/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/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/include/linux/
H A Dhmm.h40 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 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.h229 #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1)))
230 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1)))
232 #define bitmap_size(nbits) (ALIGN(nbits, BITS_PER_LONG) / BITS_PER_BYTE)
272 if (nbits % BITS_PER_LONG) in bitmap_copy_clear_tail()
273 dst[nbits / BITS_PER_LONG] &= BITMAP_LAST_WORD_MASK(nbits); in bitmap_copy_clear_tail()
283 if (count % BITS_PER_LONG) in bitmap_copy_and_extend()
296 #if BITS_PER_LONG == 64
314 #if BITS_PER_LONG == 32
785 unsigned long offset = start % BITS_PER_LONG; in bitmap_read()
786 unsigned long space = BITS_PER_LONG - offset; in bitmap_read()
[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/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/include/asm-generic/
H A Dbitsperlong.h9 #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/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/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/fs/exfat/
H A Dballoc.c15 #if BITS_PER_LONG == 32
19 #elif BITS_PER_LONG == 64
52 bit_offset = b % BITS_PER_LONG; in exfat_test_bitmap_range()
54 (unsigned int)(BITS_PER_LONG - bit_offset)); in exfat_test_bitmap_range()
57 if (bits_to_check >= BITS_PER_LONG) in exfat_test_bitmap_range()
61 word = lel_to_cpu(bitmap_le[b / BITS_PER_LONG]); in exfat_test_bitmap_range()
261 ent_idx = ALIGN_DOWN(CLUSTER_TO_BITMAP_ENT(clu), BITS_PER_LONG); in exfat_find_free_bitmap()
269 i += BITS_PER_LONG) { in exfat_find_free_bitmap()
281 clu_base += BITS_PER_LONG; in exfat_find_free_bitmap()
303 unsigned int last_mask = total_clus & (BITS_PER_LONG - 1); in exfat_count_used_clusters()
[all …]

12345678910>>...24