[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:

committed by
David S. Miller

parent
c865e5d99e
commit
3821af2fe1
@@ -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;
|
||||
|
Reference in New Issue
Block a user