2006-03-26 02:39:10 -07:00
|
|
|
#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
|
|
|
|
#define _ASM_GENERIC_BITOPS_FLS64_H_
|
|
|
|
|
2006-03-26 02:39:14 -07:00
|
|
|
#include <asm/types.h>
|
|
|
|
|
2006-03-26 02:39:10 -07:00
|
|
|
static inline int fls64(__u64 x)
|
|
|
|
{
|
|
|
|
__u32 h = x >> 32;
|
|
|
|
if (h)
|
|
|
|
return fls(h) + 32;
|
|
|
|
return fls(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */
|