[PATCH 4/4] ppc: Add missing __ffs implementation
Sascha Hauer
s.hauer at pengutronix.de
Wed Jul 16 01:37:53 PDT 2014
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/ppc/include/asm/bitops.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/ppc/include/asm/bitops.h b/arch/ppc/include/asm/bitops.h
index 74f7f6d..c4ed2de 100644
--- a/arch/ppc/include/asm/bitops.h
+++ b/arch/ppc/include/asm/bitops.h
@@ -153,6 +153,11 @@ extern __inline__ int ffz(unsigned int x)
return __ilog2(x & -x);
}
+static __inline__ int __ffs(unsigned long x)
+{
+ return __ilog2(x & -x);
+}
+
/*
* fls: find last (most-significant) bit set.
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
--
2.0.1
More information about the barebox
mailing list