From 3fca5af7860f87eb2cd706c2d7dda4ad03230a07 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 23 Mar 2011 16:42:15 -0700 Subject: m68k: remove inline asm from minix_find_first_zero_bit As a preparation for moving minix bit operations from asm/bitops.h to architecture independent code in minix filesystem, this removes inline asm from minix_find_first_zero_bit() for m68k. Signed-off-by: Akinobu Mita Cc: Geert Uytterhoeven Cc: Roman Zippel Cc: Andreas Schwab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/m68k/include/asm/bitops_mm.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/m68k/include/asm/bitops_mm.h b/arch/m68k/include/asm/bitops_mm.h index 3d16871..a403b5e 100644 --- a/arch/m68k/include/asm/bitops_mm.h +++ b/arch/m68k/include/asm/bitops_mm.h @@ -330,23 +330,19 @@ static inline int __fls(int x) static inline int minix_find_first_zero_bit(const void *vaddr, unsigned size) { const unsigned short *p = vaddr, *addr = vaddr; - int res; unsigned short num; if (!size) return 0; size = (size >> 4) + ((size & 15) > 0); - while (*p++ == 0xffff) - { + while (*p++ == 0xffff) { if (--size == 0) return (p - addr) << 4; } - num = ~*--p; - __asm__ __volatile__ ("bfffo %1{#16,#16},%0" - : "=d" (res) : "d" (num & -num)); - return ((p - addr) << 4) + (res ^ 31); + num = *--p; + return ((p - addr) << 4) + ffz(num); } #define minix_test_and_set_bit(nr, addr) __test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) -- cgit v1.1