diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-12-21 19:30:53 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 13:11:06 -0800 |
commit | 3821af2fe13700cab6fd67367128fa180e43f8b8 (patch) | |
tree | a70f63c24bd7d2ac8b25e3e4ee0ef6a50847aa67 /include/linux/bitops.h | |
parent | c865e5d99e25a171e8262fc0f7ba608568633c64 (diff) | |
download | op-kernel-dev-3821af2fe13700cab6fd67367128fa180e43f8b8.zip op-kernel-dev-3821af2fe13700cab6fd67367128fa180e43f8b8.tar.gz |
[FLS64]: generic version
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 38c2fb7..6a2a19f 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -76,6 +76,15 @@ static __inline__ int generic_fls(int x) */ #include <asm/bitops.h> + +static inline int generic_fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(x) + 32; + return fls(x); +} + static __inline__ int get_bitmask_order(unsigned int count) { int order; |