From 99b6ed6d742212be01c15caac8780b60d86d5bb6 Mon Sep 17 00:00:00 2001 From: Kanoj Sarcar Date: Fri, 31 Mar 2000 08:40:48 +0000 Subject: Put an instruction in the branch delay slot of the read_unlock() block which is compiled .noreorder, to prevent the assembler from putting something destructive. --- include/asm-mips64/spinlock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-mips64/spinlock.h b/include/asm-mips64/spinlock.h index 8787de4da..a2d269d29 100644 --- a/include/asm-mips64/spinlock.h +++ b/include/asm-mips64/spinlock.h @@ -113,6 +113,7 @@ static inline void read_unlock(rwlock_t *rw) "sub\t%1, 1\n\t" "sc\t%1, %0\n\t" "beqz\t%1, 1b\n\t" + "sync\n\t" ".set\treorder" : "=o" (__dummy_lock(rw)), "=&r" (tmp) : "o" (__dummy_lock(rw)) -- cgit v1.2.3