equal
deleted
inserted
replaced
6 #define BIT(nr) (1UL << (nr)) |
6 #define BIT(nr) (1UL << (nr)) |
7 #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) |
7 #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) |
8 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) |
8 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) |
9 #define BITS_PER_BYTE 8 |
9 #define BITS_PER_BYTE 8 |
10 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) |
10 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) |
|
11 #else |
|
12 |
|
13 #error HASS |
|
14 |
|
15 AAAAAAAAAAAAAAAAAAAAARRRRRRRHHHHHHHHHHHHHHHHHH; |
|
16 |
11 #endif |
17 #endif |
12 |
18 |
13 /* |
19 /* |
14 * Include this here because some architectures need generic_ffs/fls in |
20 * Include this here because some architectures need generic_ffs/fls in |
15 * scope |
21 * scope |
132 * |
138 * |
133 * Returns the bit number of the first cleared bit. |
139 * Returns the bit number of the first cleared bit. |
134 */ |
140 */ |
135 extern unsigned long find_first_zero_bit(const unsigned long *addr, |
141 extern unsigned long find_first_zero_bit(const unsigned long *addr, |
136 unsigned long size); |
142 unsigned long size); |
|
143 #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ |
137 |
144 |
138 #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ |
145 #ifdef CONFIG_GENERIC_FIND_LAST_BIT |
|
146 /** |
|
147 * find_last_bit - find the last set bit in a memory region |
|
148 * @addr: The address to start the search at |
|
149 * @size: The maximum size to search |
|
150 * |
|
151 * Returns the bit number of the first set bit, or size. |
|
152 */ |
|
153 extern unsigned long find_last_bit(const unsigned long *addr, |
|
154 unsigned long size); |
|
155 #endif /* CONFIG_GENERIC_FIND_LAST_BIT */ |
139 |
156 |
140 #ifdef CONFIG_GENERIC_FIND_NEXT_BIT |
157 #ifdef CONFIG_GENERIC_FIND_NEXT_BIT |
141 |
158 |
142 /** |
159 /** |
143 * find_next_bit - find the next set bit in a memory region |
160 * find_next_bit - find the next set bit in a memory region |