bitops: use __fls for fls64 on 64-bit archs

Use __fls for fls64 on 64-bit archs. The implementation for
64-bit archs is moved from x86_64 to asm-generic.

Signed-off-by: Alexander van Heukelum <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
Alexander van Heukelum 2008-03-15 18:32:36 +01:00 • committed by Ingo Molnar
commit d57594c203
2 changed files with 24 additions and 13 deletions

View file

@ -39,25 +39,14 @@ static inline void set_bit_string(unsigned long *bitmap, unsigned long i,
#include <asm-generic/bitops/sched.h>
/**
* fls64 - find last bit set in 64 bit word
* @x: the word to search
*
* This is defined the same way as fls.
*/
static inline int fls64(__u64 x)
{
if (x == 0)
return 0;
return __fls(x) + 1;
}
#define ARCH_HAS_FAST_MULTIPLIER 1
#include <asm-generic/bitops/hweight.h>
#endif /* __KERNEL__ */
#include <asm-generic/bitops/fls64.h>
#ifdef __KERNEL__
#include <asm-generic/bitops/ext2-non-atomic.h>