summaryrefslogtreecommitdiffstats
path: root/include/asm-i386/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/bitops.h')
-rw-r--r--include/asm-i386/bitops.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index 53486c977..18454e929 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -134,7 +134,9 @@ extern __inline__ int find_first_zero_bit(void * addr, unsigned size)
if (!size)
return 0;
- __asm__("movl $-1,%%eax\n\t"
+ /* 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"