diff options
Diffstat (limited to 'include/asm-x86/bitops_64.h')
-rw-r--r-- | include/asm-x86/bitops_64.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h index 4081d7ecc2bd..cb23122d23f1 100644 --- a/include/asm-x86/bitops_64.h +++ b/include/asm-x86/bitops_64.h | |||
@@ -4,29 +4,6 @@ | |||
4 | /* | 4 | /* |
5 | * Copyright 1992, Linus Torvalds. | 5 | * Copyright 1992, Linus Torvalds. |
6 | */ | 6 | */ |
7 | |||
8 | #ifndef CONFIG_GENERIC_FIND_FIRST_BIT | ||
9 | extern long find_first_zero_bit(const unsigned long *addr, unsigned long size); | ||
10 | extern long find_first_bit(const unsigned long *addr, unsigned long size); | ||
11 | |||
12 | /* return index of first bet set in val or max when no bit is set */ | ||
13 | static inline long __scanbit(unsigned long val, unsigned long max) | ||
14 | { | ||
15 | asm("bsfq %1,%0 ; cmovz %2,%0" : "=&r" (val) : "r" (val), "r" (max)); | ||
16 | return val; | ||
17 | } | ||
18 | |||
19 | #define find_first_bit(addr, size) \ | ||
20 | ((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG \ | ||
21 | ? (__scanbit(*(unsigned long *)(addr), (size))) \ | ||
22 | : find_first_bit((addr), (size)))) | ||
23 | |||
24 | #define find_first_zero_bit(addr, size) \ | ||
25 | ((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG \ | ||
26 | ? (__scanbit(~*(unsigned long *)(addr), (size))) \ | ||
27 | : find_first_zero_bit((addr), (size)))) | ||
28 | #endif | ||
29 | |||
30 | static inline void set_bit_string(unsigned long *bitmap, unsigned long i, | 7 | static inline void set_bit_string(unsigned long *bitmap, unsigned long i, |
31 | int len) | 8 | int len) |
32 | { | 9 | { |