patch-2.2.16 linux/include/asm-s390/spinlock.h

Next file: linux/include/asm-s390/stat.h
Previous file: linux/include/asm-s390/sigp.h
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/include/asm-s390/spinlock.h linux/include/asm-s390/spinlock.h
@@ -94,7 +94,7 @@
 
 extern inline void spin_lock(spinlock_t *lp)
 {
-	__asm__ __volatile("    lhi   1,-1\n"
+	__asm__ __volatile("    basr  1,0\n"
 			   "0:  slr   0,0\n"
 			   "    cs    0,1,%1\n"
 			   "    jl    0b"
@@ -106,10 +106,10 @@
 {
 	unsigned long result;
 	__asm__ __volatile("    slr   %1,%1\n"
-			   "    lhi   0,-1\n"
-			   "0:  cs    %1,0,%0"
+			   "    basr  1,0\n"
+			   "0:  cs    %1,1,%0"
 			   : "=m" (lp->lock), "=&d" (result)
-			   : "0" (lp->lock) : "0");
+			   : "0" (lp->lock) : "1");
 	return !result;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)