summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-04-27 21:48:57 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-04-27 21:48:57 +0000
commita7d060714187a42cfe95654af1263949edfa7786 (patch)
tree8edfad0afb24ee7c5df9119e7494ddfd61cfce1f /sys/arch/sparc64
parent4bbb1bd85632378599d7d7af0ca2dc91b6728207 (diff)
Revert mtx_enter_try. It didn't compile on hppa, it doesn't compile on
landisk, and the sparc implementation is obviously wrong. That's where I stopped looking, so who knows what else was broken. A simple comparison of the existing mtx_enter with the new mtx_enter_try would have told anybody.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/mutex.S29
1 files changed, 1 insertions, 28 deletions
diff --git a/sys/arch/sparc64/sparc64/mutex.S b/sys/arch/sparc64/sparc64/mutex.S
index 4baa6922a9a..c7d085cdced 100644
--- a/sys/arch/sparc64/sparc64/mutex.S
+++ b/sys/arch/sparc64/sparc64/mutex.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: mutex.S,v 1.4 2009/04/25 20:14:43 weingart Exp $ */
+/* $OpenBSD: mutex.S,v 1.5 2009/04/27 21:48:56 kettenis Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -75,33 +75,6 @@ ENTRY(mtx_enter)
retl
membar #LoadLoad | #LoadStore
-ENTRY(mtx_enter_try)
- rdpr %pil, %g4
- GET_CURCPU(%g1)
-1:
- ld [%o0 + MTX_WANTIPL], %g5
- bge 2f
- nop
- wrpr %g5, %pil
-2:
- mov %g1, %g5
-/*
- * The assembler doesn't like the next line, even if MTX_OWNER is 0.
- */
-! casx [%o0 + MTX_OWNER], %g0, %g5
- casx [%o0], %g0, %g5
- tst %g5
- be 3f
- nop
- wrpr %g4, %pil
- retl
- mov 0, %o0
-3:
- stw %g4, [%o0 + MTX_OLDIPL]
- membar #LoadLoad | #LoadStore
- retl
- mov 1, %o0
-
ENTRY(mtx_leave)
ld [%o0 + MTX_OLDIPL], %g1
membar #StoreStore | #LoadStore