Signed-off-by: Joe Perches <joe@perches.com>
---
include/asm-x86/bitops_32.h | 40 +++++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h
index c19fbe9..3ed64b2 100644
--- a/include/asm-x86/bitops_32.h
+++ b/include/asm-x86/bitops_32.h
@@ -20,20 +20,22 @@ static inline int find_first_zero_bit(const unsigned long *addr, unsigned size)
if (!size)
return 0;
- /* This looks at memory. Mark it volatile to tell gcc not to move it around */
- __asm__ __volatile__(
- "movl $-1,%%eax\n\t"
- "xorl %%edx,%%edx\n\t"
- "repe; scasl\n\t"
- "je 1f\n\t"
- "xorl -4(%%edi),%%eax\n\t"
- "subl $4,%%edi\n\t"
- "bsfl %%eax,%%edx\n"
- "1:\tsubl %%ebx,%%edi\n\t"
- "shll $3,%%edi\n\t"
- "addl %%edi,%%edx"
- :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
- :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory");
+ /* This looks at memory.
+ * Mark it volatile to tell gcc not to move it around
+ */
+ asm volatile("movl $-1,%%eax\n\t"
+ "xorl %%edx,%%edx\n\t"
+ "repe; scasl\n\t"
+ "je 1f\n\t"
+ "xorl -4(%%edi),%%eax\n\t"
+ "subl $4,%%edi\n\t"
+ "bsfl %%eax,%%edx\n"
+ "1:\tsubl %%ebx,%%edi\n\t"
+ "shll $3,%%edi\n\t"
+ "addl %%edi,%%edx"
+ : "=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
+ : "1" ((size + 31) >> 5), "2" (addr),
+ "b" (addr) : "memory");
return res;
}
@@ -53,7 +55,7 @@ static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
unsigned long val = *addr++;
if (val)
return __ffs(val) + x;
- x += (sizeof(*addr)<<3);
+ x += sizeof(*addr) << 3;
}
return x;
}
@@ -72,10 +74,10 @@ static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
#include <asm-generic/bitops/ext2-non-atomic.h>
-#define ext2_set_bit_atomic(lock, nr, addr) \
- test_and_set_bit((nr), (unsigned long *)addr)
-#define ext2_clear_bit_atomic(lock, nr, addr) \
- test_and_clear_bit((nr), (unsigned long *)addr)
+#define ext2_set_bit_atomic(lock, nr, addr) \
+ test_and_set_bit((nr), (unsigned long *)(addr))
+#define ext2_clear_bit_atomic(lock, nr, addr) \
+ test_and_clear_bit((nr), (unsigned long *)(addr))
#include <asm-generic/bitops/minix.h>
--
1.5.4.rc2
--
| Bron Gondwana | BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) |
| Gabriel C | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
| David Miller | [GIT]: Networking |
| Dave Young | Re: 2.6.24-rc3-mm1 |
git: | |
| Matthieu Moy | git push to a non-bare repository |
| Josh Boyer | git-unpack-objects |
| Linus Torvalds | Re: Problem with a push |
| Johannes Schindelin | Re: Git-windows and git-svn? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| James | Re: OBSD on MacBook |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| Daniel Ouellet | Re: Show your appreciation and get your 4.2 DVD |
| David Pottage | Re: My experience with the Freerunner |
| "Marco Trevisan (Treviño)" | Re: Car charger to GTA02 |
| Neng-Yu Tu (Tony Tu) | GTA02 GPS rework for SD card interference issue |
| Christ van Willegen | Public build host (proposal) |
| Linux Bootup hangs after adding RealTime Premption and HR-Timer | 35 minutes ago | Linux kernel |
| SATA 2 size problems | 52 minutes ago | Windows |
| problem with 2.6 kernel driver for a USB MAG Stripe Reader as HID device. | 13 hours ago | Linux kernel |
| get_user_pages failure | 14 hours ago | Linux kernel |
| Reading linux kernel | 16 hours ago | Linux kernel |
| High level of Seagate 2.5" SATA drives failing | 22 hours ago | Hardware |
| Resetting the bios password for Toshiba Laptop | 1 day ago | Hardware |
| Linux 2.6.22 slowly RUNS OUT OF LOWMEM | 1 day ago | Linux kernel |
| Questions about modules | 1 day ago | Linux kernel |
| KDB | 2 days ago | Linux kernel |
