mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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:
parent
56a6b1eb7b
commit
d57594c203
2 changed files with 24 additions and 13 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue