diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
| commit | 94bc2be31a01a3055ec94176e595dfe208e92d3b (patch) | |
| tree | ebfbe81c6718a6390bfa1b99c6d228237d818576 /include/linux/bitops.h | |
| parent | c32a0b689cb9cc160cfcd19735bbf50bb70c6ef4 (diff) | |
| parent | 58cba4650a7a414eabd2b40cc9d8e45fcdf192d9 (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'include/linux/bitops.h')
| -rw-r--r-- | include/linux/bitops.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 38c2fb7ebe09..6a2a19f14bb2 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -76,6 +76,15 @@ static __inline__ int generic_fls(int x) | |||
| 76 | */ | 76 | */ |
| 77 | #include <asm/bitops.h> | 77 | #include <asm/bitops.h> |
| 78 | 78 | ||
| 79 | |||
| 80 | static inline int generic_fls64(__u64 x) | ||
| 81 | { | ||
| 82 | __u32 h = x >> 32; | ||
| 83 | if (h) | ||
| 84 | return fls(x) + 32; | ||
| 85 | return fls(x); | ||
| 86 | } | ||
| 87 | |||
| 79 | static __inline__ int get_bitmask_order(unsigned int count) | 88 | static __inline__ int get_bitmask_order(unsigned int count) |
| 80 | { | 89 | { |
| 81 | int order; | 90 | int order; |
