X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Fx86%2Finclude%2Fasm%2Fbitops.h;h=5a7e4cba2b2fb48786206331e64222fda5f9f865;hb=da60fb79349320a21fd0b7c1e602fa492291d1f7;hp=c7a38f237a5cf0bcbbcf996ff8ffc01698a62220;hpb=f16b608ae7d0c4611d3a41d2570616a498e64d4c;p=oweals%2Fu-boot.git diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index c7a38f237a..5a7e4cba2b 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -351,6 +351,11 @@ static __inline__ int ffs(int x) } #define PLATFORM_FFS +static inline int __ilog2(unsigned int x) +{ + return generic_fls(x) - 1; +} + /** * hweightN - returns the hamming weight of a N-bit word * @x: the word to weigh