Subject: LOCKDEBUG and TRAPDEBUG errors
To: None <port-vax@netbsd.org>
From: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
List: port-vax
Date: 03/08/2007 23:27:38
--8GpibOaaTibBMecb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

When building a kernel with LOCKDEBUG enabled, the mutex stub code in
sys/arch/vax/vax/lock_stubs.S collides with the aliases set in
sys/kern/kern_mutex.c, the first attached patch disables them in the
LOCKDEBUG case.

The syscallnames array is used in sys/arch/vax/vax/syscall.c if
TRAPDEBUG is set, but the declaration is missing. The second attached
patch adds this declaration.


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown

--8GpibOaaTibBMecb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="lock_stubs.S.diff"

Index: sys/arch/vax/vax/lock_stubs.S
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/vax/lock_stubs.S,v
retrieving revision 1.2
diff -u -r1.2 lock_stubs.S
--- sys/arch/vax/vax/lock_stubs.S	17 Feb 2007 05:34:07 -0000	1.2
+++ sys/arch/vax/vax/lock_stubs.S	8 Mar 2007 22:12:56 -0000
@@ -37,9 +37,12 @@
  */
 
 #include "opt_multiprocessor.h"
+#include "opt_lockdebug.h"
 #include <machine/asm.h>
 #include "assym.h"
 
+#ifndef LOCKDEBUG
+
 /*
  * void mutex_enter(kmutex_t *);
  *
@@ -120,6 +123,8 @@
 2:	callg	(%ap), _C_LABEL(mutex_vector_exit)	/* slow path */
 	ret
 #endif
+
+#endif /* LOCKDEBUG */
 
 /*
  * bool _rw_cas(krwlock_t *rw, uintptr_t old, uintptr_t new);

--8GpibOaaTibBMecb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="syscall.c.diff"

Index: sys/arch/vax/vax/syscall.c
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/vax/syscall.c,v
retrieving revision 1.4
diff -u -r1.4 syscall.c
--- sys/arch/vax/vax/syscall.c	16 Feb 2007 02:17:42 -0000	1.4
+++ sys/arch/vax/vax/syscall.c	8 Mar 2007 22:12:38 -0000
@@ -61,6 +61,7 @@
 #include <machine/userret.h>
 
 #ifdef TRAPDEBUG
+extern const char * const syscallnames[];
 volatile int startsysc = 0;
 #define TDB(a) if (startsysc) printf a
 #else

--8GpibOaaTibBMecb--