x86-64: ffz need only search the first 32-bits
authorJens Axboe <jens.axboe@oracle.com>
Mon, 2 Jun 2008 07:41:51 +0000 (09:41 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 2 Jun 2008 07:41:51 +0000 (09:41 +0200)
So use bsfl, not bsfq.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch-x86_64.h

index 972c623..a8f075a 100644 (file)
 #define nop            __asm__ __volatile__("rep;nop": : :"memory")
 #define read_barrier() asm volatile("lfence":::"memory")
 
-static inline unsigned long arch_ffz(unsigned long bitmask)
+static inline unsigned int arch_ffz(unsigned int bitmask)
 {
-       __asm__("bsfq %1,%0" :"=r" (bitmask) :"r" (~bitmask));
+       __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask));
        return bitmask;
 }
-#define ARCH_HAVE_FFZ
+//#define ARCH_HAVE_FFZ
 
 #endif