patch-2.1.51 linux/include/asm-ppc/semaphore.h

Next file: linux/include/asm-ppc/socket.h
Previous file: linux/include/asm-ppc/scatterlist.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.50/linux/include/asm-ppc/semaphore.h linux/include/asm-ppc/semaphore.h
@@ -44,13 +44,13 @@
 	__asm__ __volatile__(
 		"1:	lwarx %1,0,%2\n"
 		"	cmpwi 0,%1,0\n"
-		"	addi %1,%1,-1\n"
+		"	addic %1,%1,-1\n"
 		"	ble- 2f\n"
 		"	stwcx. %1,0,%2\n"
 		"	bne- 1b\n"
-		"	mr %0,%1\n"
+		"	li %0,1\n"
 		"2:"
-		: "=r" (ret), "=r" (tmp)
+		: "=r" (ret), "=&r" (tmp)
 		: "r" (&sem->waking), "0" (0)
 		: "cr0", "memory");
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov