summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-03-31 08:40:48 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-03-31 08:40:48 +0000
commit99b6ed6d742212be01c15caac8780b60d86d5bb6 (patch)
tree054f6e59b6a1fe0b36e8428e06777f4c19bea024 /include
parentdbaa254b6c265680320c9fa208d9643d074d5c18 (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips64/spinlock.h1
1 files changed, 1 insertions, 0 deletions
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))