BITS_PER_LONG
unsigned long used[DIV_ROUND_UP(AMDGPU_MAX_WB, BITS_PER_LONG)];
1UL << ((s) & (BITS_PER_LONG - 1)), \
(iter).mask = 1UL << ((s) & (BITS_PER_LONG - 1)), \
(iter).mask >> (BITS_PER_LONG - 1); \
#if BITS_PER_LONG == 32
#elif BITS_PER_LONG == 64
(((1 << (bits)) + BITS_PER_LONG - 1) / BITS_PER_LONG)
#if (BITS_PER_LONG == 64)
#elif (BITS_PER_LONG == 32)
#if BITS_PER_LONG == 64
GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \
#define I915_WEDGED (BITS_PER_LONG - 1)
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
*(addr + (nr / BITS_PER_LONG)) |= (1LU << (nr % BITS_PER_LONG));
*(addr + (nr / BITS_PER_LONG)) &= ~(1LU << (nr % BITS_PER_LONG));
if (nbits <= BITS_PER_LONG) {
int chunks = DIV_ROUND_UP(nbits, BITS_PER_LONG);
for (bit = 0; size >= BITS_PER_LONG;
size -= BITS_PER_LONG, bit += BITS_PER_LONG, addr++) {
for (bit = 0; size >= BITS_PER_LONG;
size -= BITS_PER_LONG, bit += BITS_PER_LONG, addr++) {
pos = size / BITS_PER_LONG;
offs = size % BITS_PER_LONG;
bit = BITS_PER_LONG * pos;
bit -= BITS_PER_LONG;
pos = offset / BITS_PER_LONG;
offs = offset % BITS_PER_LONG;
bit = BITS_PER_LONG * pos;
bit += BITS_PER_LONG;
for (size -= bit; size >= BITS_PER_LONG;
size -= BITS_PER_LONG, bit += BITS_PER_LONG, addr++) {
pos = offset / BITS_PER_LONG;
offs = offset % BITS_PER_LONG;
bit = BITS_PER_LONG * pos;
bit += BITS_PER_LONG;
for (size -= bit; size >= BITS_PER_LONG;
size -= BITS_PER_LONG, bit += BITS_PER_LONG, addr++) {
len = (size / BITS_PER_LONG) * sizeof(long);
tail = size & (BITS_PER_LONG - 1);
addr[size / BITS_PER_LONG] = BIT_MASK(tail);
len = size / BITS_PER_LONG;
tail = size & (BITS_PER_LONG - 1);
len = size / BITS_PER_LONG;
tail = size & (BITS_PER_LONG - 1);
#define BIT_MASK(n) (~0UL >> (BITS_PER_LONG - (n)))
#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG))
((nbits) % BITS_PER_LONG) ? \
(1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \
#define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG)
int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG);
bits_to_set = BITS_PER_LONG;
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG);
bits_to_clear = BITS_PER_LONG;
index = pos / BITS_PER_LONG;
offset = pos - (index * BITS_PER_LONG);
nbitsinlong = min(nbits_reg, BITS_PER_LONG);
(((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l)))
#if BITS_PER_LONG == 64 /* amd64 */