Subject: cpu_intr_p() does not exist for all ports
To: None <current-users@netbsd.org>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 12/05/2007 17:41:24
For the last two days, a full release cannot be built for amd64 or i386 
because of compile failure for sys/kern/kern_rwlock.c

It seems that the XEN_* kernels want to #define LOCKDEBUG which in turn 
causes RW_ASSERT macro to actually do something.  At line 257 in the 
above file we attempt to call cpu_intr_p() which doesn't exist for all 
ports;  it is indeed missing in sources which were updated via CVS just 
a few minutes ago.

The only other place where cpu_intr_p() is called is in subr_lockdebug.c 
but that code is currently disabled via a #ifdef notyet.

I propose the following patch should be applied until all ports get an 
implementation of cpu_intr_p() in order to allow kernels with LOCKDEBUG 
to once again compile.

Index: kern_rwlock.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_rwlock.c,v
retrieving revision 1.13
diff -u -p -r1.13 kern_rwlock.c
--- kern_rwlock.c	4 Dec 2007 09:13:59 -0000	1.13
+++ kern_rwlock.c	6 Dec 2007 01:35:52 -0000
@@ -254,7 +254,9 @@ rw_vector_enter(krwlock_t *rw, const krw
  	l = curlwp;
  	curthread = (uintptr_t)l;

+#ifdef notyet /*	Disable until cpu_intr_p() exists for all ports */
  	RW_ASSERT(rw, !cpu_intr_p());
+#endif	# notyet
  	RW_ASSERT(rw, curthread != 0);
  	RW_WANTLOCK(rw, op);


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------