commit 2b5087b6ff53558d95b3b5c9a6fb1bd41fabbae6 Author: Andy Whitcroft Date: Thu Aug 31 10:58:44 2006 +0000 fix up rwlocks following alternative_smp removal We seem to be getting compile errors in reader-write lock support on x86 SMP following the removal of the alternative_smp in commit 8c74932779fc6f61b4c30145863a17125c1a296c: CC arch/i386/kernel/asm-offsets.s In file included from include/linux/spinlock.h:86, from include/linux/capability.h:45, from include/linux/sched.h:44, from include/linux/module.h:9, from include/linux/crypto.h:20, from arch/i386/kernel/asm-offsets.c:7: include/asm/spinlock.h: In function `__raw_read_lock': include/asm/spinlock.h:164: error: parse error before ')' token make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1 make: *** [prepare0] Error 2. We seem to have lost some ':'s in the conversion, and the UP alternative has not been removed in some cases. I think we want something like the below. Signed-off-by: Andy Whitcroft diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h index 3ac1ba9..2aebb81 100644 --- a/include/asm-i386/rwlock.h +++ b/include/asm-i386/rwlock.h @@ -25,7 +25,7 @@ #define __build_read_lock_ptr(rw, helper "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" \ @@ -34,8 +34,8 @@ #define __build_read_lock_const(rw, help "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)) \ @@ -48,9 +48,8 @@ #define __build_write_lock_ptr(rw, helpe 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" \ @@ -59,9 +58,8 @@ #define __build_write_lock_const(rw, hel "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)) \