[FLS64]: generic version

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stephen Hemminger
2005-12-21 19:30:53 -08:00
committed by David S. Miller
parent c865e5d99e
commit 3821af2fe1
24 changed files with 33 additions and 1 deletions

View File

@@ -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;