Readd the arch ffz functions
May as well use the single op version if we have them, it's
generally a lot faster than the generic_ffz()
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/arch/arch-x86.h b/arch/arch-x86.h
index 4d7ea49..a396c85 100644
--- a/arch/arch-x86.h
+++ b/arch/arch-x86.h
@@ -32,4 +32,11 @@
#define nop __asm__ __volatile__("rep;nop": : :"memory")
#define read_barrier() asm volatile ("": : :"memory")
+static inline unsigned long arch_ffz(unsigned long bitmask)
+{
+ __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask));
+ return bitmask;
+}
+#define ARCH_HAVE_FFZ
+
#endif