Home
last modified time | relevance | path

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

12345678910>>...16

/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/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/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()
H A Dfls64.h18 #if BITS_PER_LONG == 32
26 #elif BITS_PER_LONG == 64
34 #error BITS_PER_LONG not 32 or 64
/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()
H A Dfls64.h18 #if BITS_PER_LONG == 32
26 #elif BITS_PER_LONG == 64
34 #error BITS_PER_LONG not 32 or 64
/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 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
/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/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/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)
/linux/net/netfilter/
H A Dnft_set_pipapo.h55 #if BITS_PER_LONG == 64
58 #define NFT_PIPAPO_MAP_TOBITS (BITS_PER_LONG - NFT_PIPAPO_MAP_NBITS)
88 #if BITS_PER_LONG == 64
200 f->bsize * BITS_PER_LONG); in pipapo_and_field_buckets_4bit()
205 f->bsize * BITS_PER_LONG); in pipapo_and_field_buckets_4bit()
225 f->bsize * BITS_PER_LONG); in pipapo_and_field_buckets_8bit()
/linux/drivers/irqchip/
H A Dirq-riscv-intc.c25 static unsigned int riscv_intc_nr_irqs __ro_after_init = BITS_PER_LONG;
26 static unsigned int riscv_intc_custom_base __ro_after_init = BITS_PER_LONG;
54 if (IS_ENABLED(CONFIG_32BIT) && d->hwirq >= BITS_PER_LONG) in riscv_intc_irq_mask()
55 csr_clear(CSR_IEH, BIT(d->hwirq - BITS_PER_LONG)); in riscv_intc_irq_mask()
62 if (IS_ENABLED(CONFIG_32BIT) && d->hwirq >= BITS_PER_LONG) in riscv_intc_irq_unmask()
63 csr_set(CSR_IEH, BIT(d->hwirq - BITS_PER_LONG)); in riscv_intc_irq_unmask()
75 unsigned int mask = BIT(d->hwirq % BITS_PER_LONG); in andes_intc_irq_mask()
85 unsigned int mask = BIT(d->hwirq % BITS_PER_LONG); in andes_intc_irq_unmask()

12345678910>>...16