--- linux-2.2.4/include/asm-alpha/semaphore.h.orig Fri Mar 26 20:26:59 1999 +++ linux-2.2.4/include/asm-alpha/semaphore.h Fri Mar 26 21:03:08 1999 @@ -167,25 +167,27 @@ it's return address in $28. The pv is loaded as usual. The gp is clobbered (in the module case) as usual. */ + register void *pv __asm__ ("$27") = __up_wakeup; + __asm__ __volatile__ ( "/* semaphore up operation */\n" " mb\n" - "1: ldl_l $27,%0\n" - " addl $27,1,$27\n" - " mov $27,$28\n" + "1: ldl_l $24,%0\n" + " addl $24,1,$24\n" + " mov $24,$28\n" " stl_c $28,%0\n" " beq $28,2f\n" " mb\n" - " ble $27,3f\n" + " ble $24,3f\n" "4:\n" ".section .text2,\"ax\"\n" "2: br 1b\n" "3: lda $24,%0\n" - " jsr $28,__up_wakeup\n" + " jsr $28,(%1),__up_wakeup\n" " ldgp $29,0($28)\n" " br 4b\n" ".previous" - : : "m"(sem->count) + : : "m"(sem->count), "r"(pv) : "$24", "$27", "$28", "memory"); }