[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060831075322.GA20873@sequoia.sous-sol.org>
Date: Thu, 31 Aug 2006 00:53:22 -0700
From: Chris Wright <chrisw@...s-sol.org>
To: Andi Kleen <ak@...e.de>
Cc: akpm@...l.org, torvalds@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH] i386: rwlock.h fix smp alternatives fix
This last patch smp alternatives code did not actually compile on
x86 with CONFIG_SMP. This fixes the __build_read/write_lock helpers.
I've boot tested on SMP.
Signed-off-by: Chris Wright <chrisw@...s-sol.org>
---
include/asm-i386/rwlock.h | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
--- a/include/asm-i386/rwlock.h Thu Aug 31 06:05:15 2006 +0700
+++ b/include/asm-i386/rwlock.h Thu Aug 31 03:23:20 2006 -0400
@@ -21,21 +21,21 @@
#define RW_LOCK_BIAS_STR "0x01000000"
#define __build_read_lock_ptr(rw, helper) \
- asm volatile(LOCK_PREFIX " ; subl $1,(%0)\n\t" \
+ asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" \
"jns 1f\n" \
"call " helper "\n\t" \
"1:\n" \
- :"a" (rw) : "memory")
+ ::"a" (rw) : "memory")
#define __build_read_lock_const(rw, helper) \
- asm volatile(LOCK_PREFIX " ; subl $1,%0\n\t" \
+ asm volatile(LOCK_PREFIX " subl $1,%0\n\t" \
"jns 1f\n" \
"pushl %%eax\n\t" \
"leal %0,%%eax\n\t" \
"call " helper "\n\t" \
"popl %%eax\n\t" \
- "1:\n" : \
- "+m" (*(volatile int *)rw) : : "memory")
+ "1:\n" \
+ :"+m" (*(volatile int *)rw) : : "memory")
#define __build_read_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
@@ -45,23 +45,21 @@
} while (0)
#define __build_write_lock_ptr(rw, helper) \
- asm volatile(LOCK_PREFIX " ; subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
+ asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
"jz 1f\n" \
"call " helper "\n\t" \
- "1:\n", \
- "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t", \
- :"a" (rw) : "memory")
+ "1:\n" \
+ ::"a" (rw) : "memory")
#define __build_write_lock_const(rw, helper) \
- asm volatile(LOCK_PREFIX " ; subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
+ asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
"jz 1f\n" \
"pushl %%eax\n\t" \
"leal %0,%%eax\n\t" \
"call " helper "\n\t" \
"popl %%eax\n\t" \
- "1:\n", \
- "subl $" RW_LOCK_BIAS_STR ",%0\n\t", \
- "+m" (*(volatile int *)rw) : : "memory")
+ "1:\n" \
+ :"+m" (*(volatile int *)rw) : : "memory")
#define __build_write_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists