Subject: MUTEX_ACQUIRE bug
To: None <port-vax@netbsd.org>
From: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
List: port-vax
Date: 03/08/2007 23:37:55
--0lnxQi9hkpPO77W3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
There seems to be a bug in the MUTEX_ACQUIRE macro in
sys/arch/vax/include/mutex.h, the "position" of the bit field in the
INSV instruction should probably be $0 instead of %0 (mtx->mtx_owner).
This caused a PTELEN trap on my 4k90, which itself caused a PTELEN trap
in uvm_fault_internal, which caused another PTELEN trap in
uvm_fault_internal, ..., which finally caused a kernel stack invalid
panic. I think there might be another bug somewhere there.
Anyway, the attached patch fixes MUTEX_ACQUIRE.
--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
--0lnxQi9hkpPO77W3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mutex.h.diff"
Index: sys/arch/vax/include/mutex.h
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/include/mutex.h,v
retrieving revision 1.5
diff -u -r1.5 mutex.h
--- sys/arch/vax/include/mutex.h 19 Feb 2007 03:06:46 -0000 1.5
+++ sys/arch/vax/include/mutex.h 8 Mar 2007 21:58:31 -0000
@@ -188,7 +188,7 @@
"clrl %1;"
"bbssi $31,%0,1f;"
"incl %1;"
- "insv %2,%0,$31,%0;"
+ "insv %2,$0,$31,%0;"
"1:"
: "=m"(mtx->mtx_owner), "=r"(rv)
: "g"(curthread));
--0lnxQi9hkpPO77W3--