[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:
parent
c865e5d99e
commit
3821af2fe1
24 changed files with 33 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue