aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index b9fb8ee3308b..69c1edb9fe54 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -2,6 +2,14 @@
2#define _LINUX_BITOPS_H 2#define _LINUX_BITOPS_H
3#include <asm/types.h> 3#include <asm/types.h>
4 4
5#ifdef __KERNEL__
6#define BIT(nr) (1UL << (nr))
7#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
8#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
9#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_LONG)
10#define BITS_PER_BYTE 8
11#endif
12
5/* 13/*
6 * Include this here because some architectures need generic_ffs/fls in 14 * Include this here because some architectures need generic_ffs/fls in
7 * scope 15 * scope