diff options
Diffstat (limited to 'include/asm-powerpc/bitops.h')
-rw-r--r-- | include/asm-powerpc/bitops.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h index a99a74929475..897eade3afbe 100644 --- a/include/asm-powerpc/bitops.h +++ b/include/asm-powerpc/bitops.h | |||
@@ -313,6 +313,11 @@ static __inline__ int fls(unsigned int x) | |||
313 | return 32 - lz; | 313 | return 32 - lz; |
314 | } | 314 | } |
315 | 315 | ||
316 | static __inline__ unsigned long __fls(unsigned long x) | ||
317 | { | ||
318 | return __ilog2(x); | ||
319 | } | ||
320 | |||
316 | /* | 321 | /* |
317 | * 64-bit can do this using one cntlzd (count leading zeroes doubleword) | 322 | * 64-bit can do this using one cntlzd (count leading zeroes doubleword) |
318 | * instruction; for 32-bit we use the generic version, which does two | 323 | * instruction; for 32-bit we use the generic version, which does two |