CVS commit: src/sys/arch/sparc/include

2011-01-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 24 10:05:22 UTC 2011

Modified Files:
src/sys/arch/sparc/include: cpu.h

Log Message:
Provide LWP_PC


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sparc/include/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.90 src/sys/arch/sparc/include/cpu.h:1.91
--- src/sys/arch/sparc/include/cpu.h:1.90	Thu Jan 13 05:20:27 2011
+++ src/sys/arch/sparc/include/cpu.h	Mon Jan 24 10:05:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.90 2011/01/13 05:20:27 mrg Exp $ */
+/*	$NetBSD: cpu.h,v 1.91 2011/01/24 10:05:22 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -151,6 +151,9 @@
 /* Number of CPUs in the system */
 extern int sparc_ncpus;
 
+/* Provide %pc of a lwp */
+#define LWP_PC(l)   ((l)-l_md.md_tf-tf_pc)
+
 /*
  * Interrupt handler chains.  Interrupt handlers should return 0 for
  * ``not me'' or 1 (``I took care of it'').  intr_establish() inserts a



CVS commit: src/distrib/sets/lists/comp

2011-01-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 24 10:15:40 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: shl.mi

Log Message:
Mark librump{kern_solaris,fs_zfs}.so.0.0.debug as zfs only and fix a typo
while I'm here.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/distrib/sets/lists/comp/shl.mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.153 src/distrib/sets/lists/comp/shl.mi:1.154
--- src/distrib/sets/lists/comp/shl.mi:1.153	Thu Jan 20 15:50:06 2011
+++ src/distrib/sets/lists/comp/shl.mi	Mon Jan 24 10:15:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.153 2011/01/20 15:50:06 njoly Exp $
+# $NetBSD: shl.mi,v 1.154 2011/01/24 10:15:39 skrll Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -338,10 +338,10 @@
 ./usr/libdata/debug/usr/lib/librumpfs_udf.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpfs_umap.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpfs_union.so.0.0.debug	comp-rump-debug	debug
-./usr/libdata/debug/usr/lib/librumpfs_zfs.so.0.0.debug		comp-rump-debug	debug
+./usr/libdata/debug/usr/lib/librumpfs_zfs.so.0.0.debug		comp-rump-debug	debug,zfs
 ./usr/libdata/debug/usr/lib/librumpkern_crypto.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpkern_ksem.so.0.0.debug	comp-rump-debug	debug
-./usr/libdata/debug/usr/lib/librumpkern_solaris.so.0.0.debug	comp-rump-debuf	debug
+./usr/libdata/debug/usr/lib/librumpkern_solaris.so.0.0.debug	comp-rump-debug	debug,zfs
 ./usr/libdata/debug/usr/lib/librumpkern_tty.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpkern_z.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpnet.so.0.0.debug	comp-rump-debug	debug



CVS commit: src/share/man/man9

2011-01-24 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Jan 24 10:22:15 UTC 2011

Modified Files:
src/share/man/man9: roundup.9

Log Message:
roundup2(x, y) does not assume that x is power of 2, but y is.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/roundup.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/roundup.9
diff -u src/share/man/man9/roundup.9:1.3 src/share/man/man9/roundup.9:1.4
--- src/share/man/man9/roundup.9:1.3	Tue Jun  8 09:02:55 2010
+++ src/share/man/man9/roundup.9	Mon Jan 24 10:22:15 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: roundup.9,v 1.3 2010/06/08 09:02:55 jruoho Exp $
+.\ $NetBSD: roundup.9,v 1.4 2011/01/24 10:22:15 enami Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -65,7 +65,7 @@
 The
 .Fn roundup2
 macro also rounds up, but with the assumption that
-.Fa x
+.Fa size
 is a power of two.
 If
 .Fa x



CVS commit: src/sys/lib/libkern/arch/hppa

2011-01-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 24 15:01:30 UTC 2011

Modified Files:
src/sys/lib/libkern/arch/hppa: bcopy.S

Log Message:
Fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libkern/arch/hppa/bcopy.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/hppa/bcopy.S
diff -u src/sys/lib/libkern/arch/hppa/bcopy.S:1.12 src/sys/lib/libkern/arch/hppa/bcopy.S:1.13
--- src/sys/lib/libkern/arch/hppa/bcopy.S:1.12	Sat Jan 22 10:58:44 2011
+++ src/sys/lib/libkern/arch/hppa/bcopy.S	Mon Jan 24 15:01:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcopy.S,v 1.12 2011/01/22 10:58:44 skrll Exp $	*/
+/*	$NetBSD: bcopy.S,v 1.13 2011/01/24 15:01:30 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -33,8 +33,6 @@
  * Copy routines for NetBSD/hppa.
  */
 
-#include opt_multiprocessor.h
-
 #undef _LOCORE
 #define _LOCORE	/* XXX fredette - unfortunate */
 
@@ -44,7 +42,7 @@
 #include machine/reg.h
 
 #if defined(LIBC_SCCS)  !defined(lint)
-RCSID($NetBSD: bcopy.S,v 1.12 2011/01/22 10:58:44 skrll Exp $)
+RCSID($NetBSD: bcopy.S,v 1.13 2011/01/24 15:01:30 skrll Exp $)
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -487,6 +485,9 @@
 #endif
 
 #if defined(SPCOPY)  !defined(_STANDALONE)
+
+#include opt_multiprocessor.h
+
 #include sys/errno.h
 #include assym.h
 



CVS commit: src/games/fortune/datfiles

2011-01-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Mon Jan 24 15:30:55 UTC 2011

Modified Files:
src/games/fortune/datfiles: fortunes fortunes.sp.ok fortunes2

Log Message:
Fix spelling: it's *Jef* Raskin, not Jeff Raskin.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/games/fortune/datfiles/fortunes
cvs rdiff -u -r1.6 -r1.7 src/games/fortune/datfiles/fortunes.sp.ok
cvs rdiff -u -r1.42 -r1.43 src/games/fortune/datfiles/fortunes2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/fortune/datfiles/fortunes
diff -u src/games/fortune/datfiles/fortunes:1.46 src/games/fortune/datfiles/fortunes:1.47
--- src/games/fortune/datfiles/fortunes:1.46	Tue Feb 16 09:53:51 2010
+++ src/games/fortune/datfiles/fortunes	Mon Jan 24 15:30:54 2011
@@ -7027,7 +7027,7 @@
 Imagine if every Thursday your shoes exploded if you tied them the
 usual way.  This happens to us all the time with computers, and nobody
 thinks of complaining.
-		-- Jeff Raskin, interviewed in Doctor Dobb's Journal
+		-- Jef Raskin, interviewed in Doctor Dobb's Journal
 %
 Imagine that Cray computer decides to make a personal computer.  It has
 a 150 MHz processor, 200 megabytes of RAM, 1500 megabytes of disk

Index: src/games/fortune/datfiles/fortunes.sp.ok
diff -u src/games/fortune/datfiles/fortunes.sp.ok:1.6 src/games/fortune/datfiles/fortunes.sp.ok:1.7
--- src/games/fortune/datfiles/fortunes.sp.ok:1.6	Wed Oct 28 06:23:29 2009
+++ src/games/fortune/datfiles/fortunes.sp.ok	Mon Jan 24 15:30:55 2011
@@ -587,6 +587,7 @@
 Jarry
 Jaspar
 Jawaharlal
+Jef
 Jehan
 Jell
 Jenerally

Index: src/games/fortune/datfiles/fortunes2
diff -u src/games/fortune/datfiles/fortunes2:1.42 src/games/fortune/datfiles/fortunes2:1.43
--- src/games/fortune/datfiles/fortunes2:1.42	Tue Feb 16 09:53:51 2010
+++ src/games/fortune/datfiles/fortunes2	Mon Jan 24 15:30:55 2011
@@ -25647,7 +25647,7 @@
 Imagine if every Thursday your shoes exploded if you tied them the usual
 way.  This happens to us all the time with computers, and nobody thinks of
 complaining.
-		-- Jeff Raskin
+		-- Jef Raskin
 %
 Imagine me going around with a pot belly.
 It would mean political ruin.



CVS commit: src/sys/dev/usb

2011-01-24 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Mon Jan 24 17:11:17 UTC 2011

Modified Files:
src/sys/dev/usb: uep.c

Log Message:
Add support for newer eGalax controllers that send 5 ot 6 byte long packets.
The protocol is backwards compatible.  While here, unfold a few lines and
remove the link to the documentation, which was invalid.
This enables the touchscreen on the PROTECH PS-3100 MINI POS system.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/uep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uep.c
diff -u src/sys/dev/usb/uep.c:1.15 src/sys/dev/usb/uep.c:1.16
--- src/sys/dev/usb/uep.c:1.15	Wed Nov  3 22:34:23 2010
+++ src/sys/dev/usb/uep.c	Mon Jan 24 17:11:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uep.c,v 1.15 2010/11/03 22:34:23 dyoung Exp $	*/
+/*	$NetBSD: uep.c,v 1.16 2011/01/24 17:11:17 mbalmer Exp $	*/
 
 /*
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -31,14 +31,9 @@
 
 /*
  *  eGalax USB touchpanel controller driver.
- *
- *  For Programming Documentation, see:
- *
- *  http://www.egalax.com/SoftwareProgrammingGuide_1.1.pdf
  */
-
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uep.c,v 1.15 2010/11/03 22:34:23 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: uep.c,v 1.16 2011/01/24 17:11:17 mbalmer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -107,15 +102,14 @@
 CFATTACH_DECL2_NEW(uep, sizeof(struct uep_softc), uep_match, uep_attach,
 uep_detach, uep_activate, NULL, uep_childdet);
 
-int 
+int
 uep_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct usb_attach_arg *uaa = aux;
 
 	if ((uaa-vendor == USB_VENDOR_EGALAX)  (
 		(uaa-product == USB_PRODUCT_EGALAX_TPANEL)
-		|| (uaa-product == USB_PRODUCT_EGALAX_TPANEL2)
-	))
+		|| (uaa-product == USB_PRODUCT_EGALAX_TPANEL2)))
 		return UMATCH_VENDOR_PRODUCT;
 
 	if ((uaa-vendor == USB_VENDOR_EGALAX2)
@@ -126,7 +120,7 @@
 	return UMATCH_NONE;
 }
 
-void 
+void
 uep_attach(device_t parent, device_t self, void *aux)
 {
 	struct uep_softc *sc = device_private(self);
@@ -135,6 +129,8 @@
 	usb_config_descriptor_t *cdesc;
 	usb_interface_descriptor_t *id;
 	usb_endpoint_descriptor_t *ed;
+	usb_device_request_t req;
+	uByte act;
 	struct wsmousedev_attach_args a;
 	char *devinfop;
 	usbd_status err;
@@ -148,7 +144,6 @@
 	devinfop = usbd_devinfo_alloc(dev, 0);
 	aprint_normal_dev(self, %s\n, devinfop);
 	usbd_devinfo_free(devinfop);
-
 	sc-sc_udev = dev;
 	sc-sc_intr_number = -1;
 	sc-sc_intr_pipe = NULL;
@@ -208,8 +203,15 @@
 		return;
 	}
 
-	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc-sc_udev,
-			   sc-sc_dev);
+	/* Newer controllers need an activation command */
+	req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
+	req.bRequest = 0x0a;
+	USETW(req.wValue, 'A');
+	USETW(req.wIndex, 0);
+	USETW(req.wLength, 1);
+	usbd_do_request(dev, req, act);
+
+	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc-sc_udev, sc-sc_dev);
 
 	a.accessops = uep_accessops;
 	a.accesscookie = sc;
@@ -223,7 +225,7 @@
 	return;
 }
 
-int 
+int
 uep_detach(device_t self, int flags)
 {
 	struct uep_softc *sc = device_private(self);
@@ -234,7 +236,6 @@
 		usbd_close_pipe(sc-sc_intr_pipe);
 		sc-sc_intr_pipe = NULL;
 	}
-
 	sc-sc_dying = 1;
 
 	/* save current calib as defaults */
@@ -243,9 +244,7 @@
 	if (sc-sc_wsmousedev != NULL)
 		rv = config_detach(sc-sc_wsmousedev, flags);
 
-	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc-sc_udev,
-			   sc-sc_dev);
-
+	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc-sc_udev, sc-sc_dev);
 	return rv;
 }
 
@@ -286,6 +285,7 @@
 
 	if (sc-sc_isize == 0)
 		return 0;
+
 	sc-sc_ibuf = malloc(sc-sc_isize, M_USBDEV, M_WAITOK);
 	err = usbd_open_pipe_intr(sc-sc_iface, sc-sc_intr_number,
 		USBD_SHORT_XFER_OK, sc-sc_intr_pipe, sc, sc-sc_ibuf,
@@ -364,6 +364,7 @@
 {
 	struct uep_softc *sc = addr;
 	u_char *p = sc-sc_ibuf;
+	u_char msk;
 	u_int32_t len;
 	int x = 0, y = 0, s;
 
@@ -378,45 +379,59 @@
 		return;
 	}
 
-	if (len != 5) {
-#if 0
-		printf(%s: bad input length %d != %d\n,
-			device_xname(sc-sc_dev), len, sc-sc_isize);
-#endif
-		return;
-	}
-
-	if ((p[0]  0xFE) != 0x80) {
-		aprint_error_dev(sc-sc_dev,
-		bad input packet format\n);
+	/* First bit is always set to 1 */
+	if ((p[0]  0x80) != 0x80) {
+		aprint_error_dev(sc-sc_dev, bad input packet format\n);
 		return;
 	}
 
 	if (sc-sc_wsmousedev != NULL) {
-/*
- * Packet format is 5 bytes:
- *
- * 100T
- * 
- * 0AAA
- * 
- * 0BBB
- *
- * T: 1=touched 0=not touched
- * A: bits of axis A position, MSB to LSB
- * B: bits of axis B position, MSB to LSB
- *
- * For the unit I have, A = Y and B = X.
- * I don't know if units exist with A=X and B=Y,
-

CVS commit: src/lib

2011-01-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 24 17:47:52 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c
src/lib/librumpuser: sp_common.c

Log Message:
Add reconnect code to librumpclient.  In case the connection to
the kernel server is lost, the client will now automatically attempt
to reconnect.

Among other things, this makes it possible to reboot and restart
the TCP/IP stack from under firefox without any perceivable less
of service.  If pages were loading at the time the TCP/IP server
was killed, there may be some broken links, but nothing a ctrl-r
cannot fix.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.25 -r1.26 src/lib/librumpuser/sp_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.17 src/lib/librumpclient/rumpclient.c:1.18
--- src/lib/librumpclient/rumpclient.c:1.17	Fri Jan 21 10:43:33 2011
+++ src/lib/librumpclient/rumpclient.c	Mon Jan 24 17:47:51 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.17 2011/01/21 10:43:33 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.18 2011/01/24 17:47:51 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -50,6 +50,7 @@
 #include pthread.h
 #include signal.h
 #include stdarg.h
+#include stdbool.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -78,19 +79,51 @@
 	.spc_fd = -1,
 };
 
-static int kq;
+static int kq = -1;
 static sigset_t fullset;
 
+static int doconnect(int);
+static int handshake_req(struct spclient *, uint32_t *, int, bool);
+
+int didrecon;
+
+static int
+send_with_recon(struct spclient *spc, const void *data, size_t dlen)
+{
+	int rv;
+
+	do {
+		rv = dosend(spc, data, dlen);
+		if (__predict_false(rv == ENOTCONN || rv == EBADF)) {
+			if ((rv = doconnect(1)) != 0)
+continue;
+			if ((rv = handshake_req(clispc, NULL, 0, true)) != 0)
+continue;
+			rv = ENOTCONN;
+			break;
+		}
+	} while (__predict_false(rv != 0));
+
+	return rv;
+}
+
 static int
-waitresp(struct spclient *spc, struct respwait *rw, sigset_t *mask)
+cliwaitresp(struct spclient *spc, struct respwait *rw, sigset_t *mask,
+	bool keeplock)
 {
+	uint64_t mygen;
+	bool imalive = true;
 
 	pthread_mutex_lock(spc-spc_mtx);
-	sendunlockl(spc);
+	if (!keeplock)
+		sendunlockl(spc);
+	mygen = spc-spc_generation;
 
 	rw-rw_error = 0;
-	while (!rw-rw_done  rw-rw_error == 0
-	 spc-spc_state != SPCSTATE_DYING){
+	while (!rw-rw_done  rw-rw_error == 0) {
+		if (__predict_false(spc-spc_generation != mygen || !imalive))
+			break;
+
 		/* are we free to receive? */
 		if (spc-spc_istatus == SPCSTATUS_FREE) {
 			struct kevent kev[8];
@@ -105,7 +138,16 @@
 case 0:
 	rv = host_kevent(kq, NULL, 0,
 	kev, __arraycount(kev), NULL);
-	assert(rv  0);
+
+	/*
+	 * XXX: don't know how this can
+	 * happen (timeout cannot expire
+	 * since there isn't one), but
+	 * it does happen
+	 */
+	if (__predict_false(rv == 0))
+		continue;
+
 	for (i = 0; i  rv; i++) {
 		if (kev[i].filter
 		== EVFILT_SIGNAL)
@@ -116,7 +158,7 @@
 
 	continue;
 case -1:
-	spc-spc_state = SPCSTATE_DYING;
+	imalive = false;
 	goto cleanup;
 default:
 	break;
@@ -160,12 +202,12 @@
 	pthread_mutex_unlock(spc-spc_mtx);
 	pthread_cond_destroy(rw-rw_cv);
 
-	if (spc-spc_state == SPCSTATE_DYING)
+	if (spc-spc_generation != mygen || !imalive) {
 		return ENOTCONN;
+	}
 	return rw-rw_error;
 }
 
-
 static int
 syscall_req(struct spclient *spc, int sysnum,
 	const void *data, size_t dlen, void **resp)
@@ -182,18 +224,18 @@
 
 	pthread_sigmask(SIG_SETMASK, fullset, omask);
 	do {
-
 		putwait(spc, rw, rhdr);
-		rv = dosend(spc, rhdr, sizeof(rhdr));
-		rv = dosend(spc, data, dlen);
-		if (rv) {
+		if ((rv = send_with_recon(spc, rhdr, sizeof(rhdr))) != 0) {
 			unputwait(spc, rw);
-			pthread_sigmask(SIG_SETMASK, omask, NULL);
-			return rv;
+			continue;
+		}
+		if ((rv = send_with_recon(spc, data, dlen)) != 0) {
+			unputwait(spc, rw);
+			continue;
 		}
 
-		rv = waitresp(spc, rw, omask);
-	} while (rv == EAGAIN);
+		rv = cliwaitresp(spc, rw, omask, false);
+	} while (rv == ENOTCONN || rv == EAGAIN);
 	pthread_sigmask(SIG_SETMASK, omask, NULL);
 
 	*resp = rw.rw_data;
@@ -201,7 +243,7 @@
 }
 
 static int
-handshake_req(struct spclient *spc, uint32_t *auth, int cancel)
+handshake_req(struct spclient *spc, uint32_t *auth, int cancel, bool haslock)
 {
 	struct handshake_fork rf;
 	struct rsp_hdr rhdr;
@@ -219,20 +261,28 @@
 		rhdr.rsp_handshake = HANDSHAKE_GUEST;
 
 	pthread_sigmask(SIG_SETMASK, fullset, omask);
-	putwait(spc, rw, rhdr);
+	if (haslock)
+		putwait_locked(spc, rw, rhdr);
+	else
+		putwait(spc, rw, rhdr);
 	rv = dosend(spc, rhdr, sizeof(rhdr));
 	if (auth) {
 		

CVS commit: src/tests/rump/rumpkern

2011-01-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 24 17:51:29 UTC 2011

Modified Files:
src/tests/rump/rumpkern: t_sp.sh
src/tests/rump/rumpkern/h_client: Makefile
Added Files:
src/tests/rump/rumpkern/h_client: h_reconcli.c

Log Message:
test for rumpclient reconnect feature


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/rump/rumpkern/t_sp.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpkern/h_client/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpkern/h_client/h_reconcli.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/rump/rumpkern/t_sp.sh
diff -u src/tests/rump/rumpkern/t_sp.sh:1.9 src/tests/rump/rumpkern/t_sp.sh:1.10
--- src/tests/rump/rumpkern/t_sp.sh:1.9	Fri Jan 14 13:23:15 2011
+++ src/tests/rump/rumpkern/t_sp.sh	Mon Jan 24 17:51:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_sp.sh,v 1.9 2011/01/14 13:23:15 pooka Exp $
+#	$NetBSD: t_sp.sh,v 1.10 2011/01/24 17:51:29 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -49,6 +49,7 @@
 test_case fork_fakeauth fork fakeauth
 test_case sigsafe sigsafe sigsafe
 test_case signal signal
+test_case reconnect reconnect
 
 basic()
 {
@@ -92,6 +93,15 @@
 	atf_check -s signal:27 $(atf_get_srcdir)/h_client/h_simplecli block
 }
 
+reconnect()
+{
+
+
+	export RUMP_SERVER=unix://commsock
+	atf_check -s exit:0 rump_server ${RUMP_SERVER}
+	atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_reconcli 2
+}
+
 atf_init_test_cases()
 {
 
@@ -104,4 +114,5 @@
 	atf_add_test_case fork_fakeauth
 	atf_add_test_case sigsafe
 	atf_add_test_case signal
+	atf_add_test_case reconnect
 }

Index: src/tests/rump/rumpkern/h_client/Makefile
diff -u src/tests/rump/rumpkern/h_client/Makefile:1.4 src/tests/rump/rumpkern/h_client/Makefile:1.5
--- src/tests/rump/rumpkern/h_client/Makefile:1.4	Thu Jan  6 07:00:28 2011
+++ src/tests/rump/rumpkern/h_client/Makefile	Mon Jan 24 17:51:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/01/06 07:00:28 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2011/01/24 17:51:29 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -6,6 +6,7 @@
 TESTSDIR=	${TESTSBASE}/rump/rumpkern/h_client
 
 TESTS_C+=	h_forkcli
+TESTS_C+=	h_reconcli
 TESTS_C+=	h_sigcli
 TESTS_C+=	h_simplecli
 TESTS_C+=	h_stresscli
@@ -14,6 +15,7 @@
 
 LDADD+=			-lrumpclient
 LDADD.h_stresscli=	-lpthread
+LDADD.h_reconcli=	-lpthread
 
 WARNS=	4
 NOMAN=

Added files:

Index: src/tests/rump/rumpkern/h_client/h_reconcli.c
diff -u /dev/null src/tests/rump/rumpkern/h_client/h_reconcli.c:1.1
--- /dev/null	Mon Jan 24 17:51:29 2011
+++ src/tests/rump/rumpkern/h_client/h_reconcli.c	Mon Jan 24 17:51:29 2011
@@ -0,0 +1,120 @@
+/*	$NetBSD: h_reconcli.c,v 1.1 2011/01/24 17:51:29 pooka Exp $	*/
+
+#include sys/types.h
+#include sys/sysctl.h
+
+#include rump/rumpclient.h
+#include rump/rump_syscalls.h
+
+#include err.h
+#include pthread.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+static volatile int quit, riseandwhine;
+
+static pthread_mutex_t closermtx;
+static pthread_cond_t closercv;
+
+static void *
+closer(void *arg)
+{
+
+	pthread_mutex_lock(closermtx);
+	while (!quit) {
+		while (!riseandwhine)
+			pthread_cond_wait(closercv, closermtx);
+		riseandwhine = 0;
+		pthread_mutex_unlock(closermtx);
+
+		/* try to catch a random slot */
+		usleep(random() % 10);
+
+		/*
+		 * wide-angle disintegration beam, but takes care
+		 * of the client rumpkernel communication socket.
+		 */
+		closefrom(3);
+
+		pthread_mutex_lock(closermtx);
+	}
+	pthread_mutex_unlock(closermtx);
+
+	return NULL;
+}
+
+static const int hostnamemib[] = { CTL_KERN, KERN_HOSTNAME };
+static char goodhostname[128];
+
+static void *
+worker(void *arg)
+{
+	char hostnamebuf[128];
+	size_t blen;
+
+	pthread_mutex_lock(closermtx);
+	while (!quit) {
+		pthread_mutex_unlock(closermtx);
+		if (rump_sys_getpid() == -1)
+			err(1, getpid);
+
+		blen = sizeof(hostnamebuf);
+		memset(hostnamebuf, 0, sizeof(hostnamebuf));
+		if (rump_sys___sysctl(hostnamemib, __arraycount(hostnamemib),
+		hostnamebuf, blen, NULL, 0) == -1)
+			err(1, sysctl);
+		if (strcmp(hostnamebuf, goodhostname) != 0)
+			exit(1);
+		pthread_mutex_lock(closermtx);
+		riseandwhine = 1;
+		pthread_cond_signal(closercv);
+	}
+	riseandwhine = 1;
+	pthread_cond_signal(closercv);
+	pthread_mutex_unlock(closermtx);
+
+	return NULL;
+}
+
+int
+main(int argc, char *argv[])
+{
+	pthread_t pt, w1, w2, w3, w4;
+	size_t blen;
+	int timecount;
+
+	if (argc != 2)
+		errx(1, need timecount);
+	timecount = atoi(argv[1]);
+	if (timecount = 0)
+		errx(1, invalid timecount %d\n, timecount);
+
+	srandom(time(NULL));
+
+	if (rumpclient_init() == -1)
+		err(1, init);
+
+	blen = sizeof(goodhostname);
+	if (rump_sys___sysctl(hostnamemib, __arraycount(hostnamemib),
+	goodhostname, blen, NULL, 0) == -1)
+		err(1, sysctl);
+
+	pthread_create(pt, NULL, closer, NULL);
+	

CVS commit: src/distrib/sets/lists/tests

2011-01-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 24 17:52:07 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
new helperprog


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.240 src/distrib/sets/lists/tests/mi:1.241
--- src/distrib/sets/lists/tests/mi:1.240	Fri Jan 14 13:24:45 2011
+++ src/distrib/sets/lists/tests/mi	Mon Jan 24 17:52:07 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.240 2011/01/14 13:24:45 pooka Exp $
+# $NetBSD: mi,v 1.241 2011/01/24 17:52:07 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -519,6 +519,7 @@
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client			tests-syscall-debug
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_reboot.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_forkcli.debug			tests-syscall-debug	debug,atf
+./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_reconcli.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_sigcli.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_simplecli.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_stresscli.debug			tests-syscall-debug	debug,atf
@@ -1956,6 +1957,7 @@
 ./usr/tests/rump/rumpkern/h_client			tests-rump-tests
 ./usr/tests/rump/rumpkern/h_client/h_reboot		tests-obsolete		obsolete
 ./usr/tests/rump/rumpkern/h_client/h_forkcli		tests-rump-tests	atf
+./usr/tests/rump/rumpkern/h_client/h_reconcli		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/h_client/h_sigcli		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/h_client/h_simplecli		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/h_client/h_stresscli		tests-rump-tests	atf



CVS commit: src/sys/uvm

2011-01-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 24 19:13:55 UTC 2011

Modified Files:
src/sys/uvm: uvm_pglist.c

Log Message:
Fix start_hint in simple alloc (fencepost error).
When restarting the loop, make sure end is not above current limit.
Do a quick test to see if the physseg is within the range of desired addresses.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.56 src/sys/uvm/uvm_pglist.c:1.57
--- src/sys/uvm/uvm_pglist.c:1.56	Sun Jan 23 21:29:52 2011
+++ src/sys/uvm/uvm_pglist.c	Mon Jan 24 19:13:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.56 2011/01/23 21:29:52 he Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.57 2011/01/24 19:13:55 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.56 2011/01/23 21:29:52 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.57 2011/01/24 19:13:55 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -130,8 +130,7 @@
 	int cidx = 0;	/* XXX: GCC */
 #endif
 #ifdef PGALLOC_VERBOSE
-	printf(pgalloc: contig %d pgs from psi %ld\n, num,
-	(long)(ps - vm_physmem));
+	printf(pgalloc: contig %d pgs from psi %zd\n, num, ps - vm_physmem);
 #endif
 
 	KASSERT(mutex_owned(uvm_fpageqlock));
@@ -141,6 +140,12 @@
 	alignment = atop(alignment);
 
 	/*
+	 * Make sure that physseg falls within with range to be allocated from.
+	 */
+	if (high = ps-avail_start || low = ps-avail_end)
+		return 0;
+
+	/*
 	 * We start our search at the just after where the last allocation
 	 * succeeded.
 	 */
@@ -169,7 +174,7 @@
 			 */
 			second_pass = true;
 			try = roundup2(max(low, ps-avail_start), alignment);
-			limit = min(high, ps-avail_start + ps-start_hint);
+			limit = min(limit, ps-avail_start + ps-start_hint);
 			skip = 0;
 			continue;
 		}
@@ -362,8 +367,7 @@
 	struct vm_page *pg;
 	bool second_pass;
 #ifdef PGALLOC_VERBOSE
-	printf(pgalloc: simple %d pgs from psi %ld\n, num,
-	(long)(ps - vm_physmem));
+	printf(pgalloc: simple %d pgs from psi %zd\n, num, ps - vm_physmem);
 #endif
 
 	KASSERT(mutex_owned(uvm_fpageqlock));
@@ -380,13 +384,21 @@
 	pg = ps-pgs[try - ps-start];
 	second_pass = false;
 
+	/*
+	 * Make sure that physseg falls within with range to be allocated from.
+	 */
+	if (high = ps-avail_start || low = ps-avail_end)
+		return 0;
+
 	for (;; try++, pg++) {
 		if (try = limit) {
-			if (ps-start_hint == 0 || second_pass)
+			if (ps-start_hint == 0 || second_pass) {
+try = limit - 1;
 break;
+			}
 			second_pass = true;
 			try = max(low, ps-avail_start);
-			limit = min(high, ps-avail_start + ps-start_hint);
+			limit = min(limit, ps-avail_start + ps-start_hint);
 			pg = ps-pgs[try - ps-start];
 			continue;
 		}



CVS commit: src/sys/arch/sgimips/stand

2011-01-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 24 19:26:17 UTC 2011

Modified Files:
src/sys/arch/sgimips/stand: Makefile.booters

Log Message:
Define NOMAN earlier


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/stand/Makefile.booters

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sgimips/stand/Makefile.booters
diff -u src/sys/arch/sgimips/stand/Makefile.booters:1.18 src/sys/arch/sgimips/stand/Makefile.booters:1.19
--- src/sys/arch/sgimips/stand/Makefile.booters:1.18	Sat Jan 22 19:19:23 2011
+++ src/sys/arch/sgimips/stand/Makefile.booters	Mon Jan 24 19:26:16 2011
@@ -1,4 +1,7 @@
-# $NetBSD: Makefile.booters,v 1.18 2011/01/22 19:19:23 joerg Exp $
+# $NetBSD: Makefile.booters,v 1.19 2011/01/24 19:26:16 joerg Exp $
+
+# PROG set by parent.
+NOMAN=		# defined
 
 .include bsd.own.mk
 .include bsd.sys.mk		# for HOST_SH
@@ -34,9 +37,6 @@
 
 CPPFLAGS+=	-Dsgimips
 
-# PROG set by parent.
-NOMAN=		# defined
-
 # We load the kernel at 420K in from the start of RAM to give the boot
 # loader plenty of breathing room.  Load the boot loader starting at
 # the second page of RAM.



CVS commit: src/sys/arch/ofppc/stand/ofwboot

2011-01-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 24 19:27:18 UTC 2011

Modified Files:
src/sys/arch/ofppc/stand/ofwboot: Makefile

Log Message:
Ensure that NOMAN is defined earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/ofppc/stand/ofwboot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ofppc/stand/ofwboot/Makefile
diff -u src/sys/arch/ofppc/stand/ofwboot/Makefile:1.26 src/sys/arch/ofppc/stand/ofwboot/Makefile:1.27
--- src/sys/arch/ofppc/stand/ofwboot/Makefile:1.26	Sat Jan 22 19:19:21 2011
+++ src/sys/arch/ofppc/stand/ofwboot/Makefile	Mon Jan 24 19:27:18 2011
@@ -1,10 +1,9 @@
-#	$NetBSD: Makefile,v 1.26 2011/01/22 19:19:21 joerg Exp $
+#	$NetBSD: Makefile,v 1.27 2011/01/24 19:27:18 joerg Exp $
 
 S!=	cd ${.CURDIR}/../../../.. ; pwd
 
-.include bsd.own.mk
-
 PROG=		ofwboot
+NOMAN=		# defined
 SRCS=		ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c
 SRCS+=		mbr.c rdb.c vers.c
 CFLAGS+=	-msoft-float -Wno-main -ffreestanding
@@ -13,6 +12,9 @@
 #CPPFLAGS+=	-DOFWDUMP
 CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR}
 CPPFLAGS+=	-DHEAP_VARIABLE
+
+.include bsd.own.mk
+
 DBG=		-Os -mmultiple
 
 SRCS+=		ofwmagic.S
@@ -21,7 +23,6 @@
 SRCS+=		byteorder.c
 .PATH:		${S}/lib/libsa
 
-NOMAN=		# defined
 STRIPFLAG=
 BINMODE=	444
 



CVS commit: src/lib/libc/time

2011-01-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 24 19:37:35 UTC 2011

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
Redo Vt macro fixes (from r1.35) which were lost.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/lib/libc/time/ctime.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.37 src/lib/libc/time/ctime.3:1.38
--- src/lib/libc/time/ctime.3:1.37	Fri Dec 17 01:30:50 2010
+++ src/lib/libc/time/ctime.3	Mon Jan 24 19:37:35 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: ctime.3,v 1.37 2010/12/17 01:30:50 wiz Exp $
+.\ $NetBSD: ctime.3,v 1.38 2011/01/24 19:37:35 njoly Exp $
 .Dd December 14, 2010
 .Dt CTIME 3
 .Os
@@ -24,7 +24,7 @@
 .Lb libc
 .Sh SYNOPSIS
 .In time.h
-.Dv extern char *tzname[2];
+.Vt extern char *tzname[2];
 .Ft char *
 .Fn ctime const time_t *clock
 .Ft char *
@@ -60,7 +60,7 @@
 .Sh DESCRIPTION
 .Fn ctime
 converts a
-.Tp time_t ,
+.Vt time_t ,
 pointed to by
 .Fa clock ,
 representing the time in seconds since
@@ -333,7 +333,7 @@
 and
 .Fn mktime_z
 function returns the specified time since the Epoch as a
-.Va time_t
+.Vt time_t
 type value.
 If the time cannot be represented, then
 .Fn mktime



CVS commit: src/sys/arch/arm/marvell

2011-01-24 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Jan 24 21:07:29 UTC 2011

Modified Files:
src/sys/arch/arm/marvell: mvsocgpp.c

Log Message:
Capture more initial GPIO state.
Also, fix behaviour if the number of GPIOs exceed 32.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/mvsocgpp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/marvell/mvsocgpp.c
diff -u src/sys/arch/arm/marvell/mvsocgpp.c:1.1 src/sys/arch/arm/marvell/mvsocgpp.c:1.2
--- src/sys/arch/arm/marvell/mvsocgpp.c:1.1	Sun Oct  3 05:49:24 2010
+++ src/sys/arch/arm/marvell/mvsocgpp.c	Mon Jan 24 21:07:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsocgpp.c,v 1.1 2010/10/03 05:49:24 kiyohara Exp $	*/
+/*	$NetBSD: mvsocgpp.c,v 1.2 2011/01/24 21:07:28 jakllsch Exp $	*/
 /*
  * Copyright (c) 2008, 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mvsocgpp.c,v 1.1 2010/10/03 05:49:24 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: mvsocgpp.c,v 1.2 2011/01/24 21:07:28 jakllsch Exp $);
 
 #include gpio.h
 
@@ -135,11 +135,13 @@
 #if NGPIO  0
 	struct gpiobus_attach_args gba;
 	gpio_pin_t *pins;
-	uint32_t dir, valin, valout, polarity, mask;
+	uint32_t mask, dir, valin, valout, polarity, blink;
 #endif
 	int i, j;
 	void *ih;
 
+	dir = valin = valout = polarity = blink = 0;
+
 	aprint_normal(: Marvell SoC General Purpose I/O Port Interface\n);
 	aprint_naive(\n);
 
@@ -188,20 +190,22 @@
 #endif
 
 #if NGPIO  0
-	sc-sc_pins = kmem_alloc(sizeof(gpio_pin_t) * gpp_npins, KM_SLEEP);
+	sc-sc_pins = kmem_zalloc(sizeof(gpio_pin_t) * gpp_npins, KM_SLEEP);
 
-	for (i = 0; i  gpp_npins; i += 32) {
-		dir = MVSOCGPP_READ(sc, MVSOCGPP_GPIODOEC(i));
-		valin = MVSOCGPP_READ(sc, MVSOCGPP_GPIODI(i));
-		valout = MVSOCGPP_READ(sc, MVSOCGPP_GPIODO(i));
-		polarity = MVSOCGPP_READ(sc, MVSOCGPP_GPIODIP(i));
-	}
 	for (i = 0, mask = 1; i  gpp_npins; i++, mask = 1) {
+		if ((i  (32 - 1)) == 0) {
+			mask = 1;
+			dir = MVSOCGPP_READ(sc, MVSOCGPP_GPIODOEC(i));
+			valin = MVSOCGPP_READ(sc, MVSOCGPP_GPIODI(i));
+			valout = MVSOCGPP_READ(sc, MVSOCGPP_GPIODO(i));
+			polarity = MVSOCGPP_READ(sc, MVSOCGPP_GPIODIP(i));
+			blink = MVSOCGPP_READ(sc, MVSOCGPP_GPIOBE(i));
+		}
 		pins = sc-sc_pins[i];
 		pins-pin_num = i;
-		pins-pin_caps =
-		(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_INVIN);
-		if(dir  mask) {
+		pins-pin_caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT |
+		GPIO_PIN_INVIN | GPIO_PIN_PULSATE);
+		if (dir  mask) {
 			pins-pin_flags = GPIO_PIN_INPUT;
 			pins-pin_state =
 			(valin  mask) ? GPIO_PIN_HIGH : GPIO_PIN_LOW;
@@ -210,6 +214,12 @@
 			pins-pin_state =
 			(valout  mask) ? GPIO_PIN_HIGH : GPIO_PIN_LOW;
 		}
+		if (polarity  mask) {
+			pins-pin_flags |= GPIO_PIN_INVIN;
+		}
+		if (blink  mask) {
+			pins-pin_flags |= GPIO_PIN_PULSATE;
+		}
 	}
 	sc-sc_gpio_chipset.gp_cookie = sc;
 	sc-sc_gpio_chipset.gp_pin_read = mvsocgpp_pin_read;



CVS commit: src/share/man/man4/man4.i386

2011-01-24 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan 24 22:06:31 UTC 2011

Modified Files:
src/share/man/man4/man4.i386: gcscpcib.4

Log Message:
Do not xref man pages that are not installed.
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.i386/gcscpcib.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/man4.i386/gcscpcib.4
diff -u src/share/man/man4/man4.i386/gcscpcib.4:1.4 src/share/man/man4/man4.i386/gcscpcib.4:1.5
--- src/share/man/man4/man4.i386/gcscpcib.4:1.4	Mon Jan 24 17:30:38 2011
+++ src/share/man/man4/man4.i386/gcscpcib.4	Mon Jan 24 22:06:31 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: gcscpcib.4,v 1.4 2011/01/24 17:30:38 plunky Exp $
+.\	$NetBSD: gcscpcib.4,v 1.5 2011/01/24 22:06:31 wiz Exp $
 .\ $OpenBSD: glxpcib.4,v 1.7 2007/11/17 11:38:50 mbalmer Exp $
 .\
 .\ Michael Shalayeff, 2007. Public Domain.
@@ -21,7 +21,8 @@
 Besides the core functionality, the
 .Nm
 driver implements a 32-bit 3.5 MHz timecounter, a watchdog timer device,
-and a GPIO device. The watchdog timer may be configured via the
+and a GPIO device.
+The watchdog timer may be configured via the
 .Xr wdogctl 8
 utility and the GPIO pins can be manipulated via the
 .Xr gpioctl 8
@@ -40,7 +41,7 @@
 driver first appeared in
 .Ox 4.3
 as
-.Xr glxpcib 4
+.Nm glxpcib
 before being ported to
 .Nx 5.0 .
 .Sh AUTHORS



CVS commit: src/sys/lib/libkern

2011-01-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 24 22:53:08 UTC 2011

Modified Files:
src/sys/lib/libkern: libkern.h

Log Message:
Add KDASSERTMSG (KDASSERT already exists).


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/lib/libkern/libkern.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.94 src/sys/lib/libkern/libkern.h:1.95
--- src/sys/lib/libkern/libkern.h:1.94	Sun Apr 25 15:39:41 2010
+++ src/sys/lib/libkern/libkern.h	Mon Jan 24 22:53:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: libkern.h,v 1.94 2010/04/25 15:39:41 rmind Exp $	*/
+/*	$NetBSD: libkern.h,v 1.95 2011/01/24 22:53:07 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -223,10 +223,16 @@
 #ifndef DEBUG
 #ifdef lint
 #define	KDASSERT(e)	/* NOTHING */
+#define	KDASSERTMSG(e)	/* NOTHING */
 #else /* lint */
 #define	KDASSERT(e)	((void)0)
+#define	KDASSERTMSG(e)	((void)0)
 #endif /* lint */
 #else
+#define	KDASSERTMSG(e, msg) do {	\
+	if (__predict_false(!(e)))	\
+		panic msg;		\
+	} while (/*CONSTCOND*/ 0)
 #ifdef __STDC__
 #define	KDASSERT(e)	(__predict_true((e)) ? (void)0 :		\
 			kern_assert(debugging , __FILE__, __LINE__, #e))



CVS commit: src/sys/uvm

2011-01-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 24 22:54:01 UTC 2011

Modified Files:
src/sys/uvm: uvm_pglist.c

Log Message:
Use the (new) KDASSERTMSG


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.57 src/sys/uvm/uvm_pglist.c:1.58
--- src/sys/uvm/uvm_pglist.c:1.57	Mon Jan 24 19:13:55 2011
+++ src/sys/uvm/uvm_pglist.c	Mon Jan 24 22:54:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.57 2011/01/24 19:13:55 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.58 2011/01/24 22:54:01 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.57 2011/01/24 19:13:55 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.58 2011/01/24 22:54:01 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -402,14 +402,14 @@
 			pg = ps-pgs[try - ps-start];
 			continue;
 		}
-#if defined(DEBUG)  defined(DIAGNOSTIC)
+#if defined(DEBUG)
 		{
 			int cidx = 0;
 			const int bank = vm_physseg_find(try, cidx);
-			KASSERTMSG(bank == ps - vm_physmem,
+			KDASSERTMSG(bank == ps - vm_physmem,
 			(vm_physseg_find(%#x) (%d) != ps %zd,
 			 try, bank, ps - vm_physmem));
-			KASSERTMSG(cidx == try - ps-start,
+			KDASSERTMSG(cidx == try - ps-start,
 			(vm_physseg_find(%#x): %#x != off %PRIxPADDR,
 			 try, cidx, try - ps-start));
 		}



CVS commit: src/sys/arch/vax/include

2011-01-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 25 02:37:35 UTC 2011

Modified Files:
src/sys/arch/vax/include: asm.h

Log Message:
Align functions on 4 byte boundaries, not 16.
Add END(x) for function sizing.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/vax/include/asm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/vax/include/asm.h
diff -u src/sys/arch/vax/include/asm.h:1.22 src/sys/arch/vax/include/asm.h:1.23
--- src/sys/arch/vax/include/asm.h:1.22	Mon Dec 20 21:11:26 2010
+++ src/sys/arch/vax/include/asm.h	Tue Jan 25 02:37:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.22 2010/12/20 21:11:26 joerg Exp $ */
+/*	$NetBSD: asm.h,v 1.23 2011/01/25 02:37:35 matt Exp $ */
 /*
  * Copyright (c) 1982, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -60,7 +60,7 @@
 
 /* let kernels and others override entrypoint alignment */
 #ifndef _ALIGN_TEXT
-# define _ALIGN_TEXT .align 4
+# define _ALIGN_TEXT .p2align 2
 #endif
 
 #define	_ENTRY(x, regs) \
@@ -76,6 +76,7 @@
 #define ENTRY(x, regs)		_ENTRY(_C_LABEL(x), regs); _PROF_PROLOGUE
 #define NENTRY(x, regs)		_ENTRY(_C_LABEL(x), regs)
 #define ASENTRY(x, regs)	_ENTRY(_ASM_LABEL(x), regs); _PROF_PROLOGUE
+#define END(x)			.size _C_LABEL(x),.-_C_LABEL(x)
 
 #define ALTENTRY(x)		.globl _C_LABEL(x); _C_LABEL(x):
 #define RCSID(name)		.pushsection .ident; .asciz name; .popsection



CVS commit: src/lib/libc

2011-01-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 25 02:38:16 UTC 2011

Modified Files:
src/lib/libc/arch/vax: SYS.h genassym.cf
src/lib/libc/arch/vax/gen: __setjmp14.S __sigsetjmp14.S _setjmp.S
alloca.S byte_swap_2.S byte_swap_4.S fabs.S ldexp.S modf.S
swapcontext.S
src/lib/libc/arch/vax/string: bcmp.S bcopy.S bzero.S ffs.S index.S
memcmp.S
src/lib/libc/arch/vax/sys: __clone.S __sigtramp3.S __syscall.S
__vfork14.S brk.S cerror.S execl.S execle.S execlp.S exect.S fork.S
getcontext.S pipe.S ptrace.S sbrk.S syscall.S
src/lib/libc/compat/arch/vax/sys: compat_Ovfork.S
compat___sigreturn14.S compat___sigtramp2.S compat_sigpending13.S
compat_sigprocmask13.S compat_sigreturn13.S compat_sigsuspend13.S

Log Message:
Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/vax/SYS.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/vax/genassym.cf
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/vax/gen/__setjmp14.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/vax/gen/__sigsetjmp14.S \
src/lib/libc/arch/vax/gen/byte_swap_4.S src/lib/libc/arch/vax/gen/modf.S
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/vax/gen/_setjmp.S
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/vax/gen/alloca.S \
src/lib/libc/arch/vax/gen/byte_swap_2.S src/lib/libc/arch/vax/gen/fabs.S \
src/lib/libc/arch/vax/gen/swapcontext.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/vax/gen/ldexp.S
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/vax/string/bcmp.S \
src/lib/libc/arch/vax/string/bcopy.S src/lib/libc/arch/vax/string/bzero.S \
src/lib/libc/arch/vax/string/ffs.S src/lib/libc/arch/vax/string/index.S \
src/lib/libc/arch/vax/string/memcmp.S
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/vax/sys/__clone.S \
src/lib/libc/arch/vax/sys/__syscall.S src/lib/libc/arch/vax/sys/execl.S \
src/lib/libc/arch/vax/sys/execlp.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/vax/sys/__sigtramp3.S
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/vax/sys/__vfork14.S \
src/lib/libc/arch/vax/sys/exect.S src/lib/libc/arch/vax/sys/fork.S
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/vax/sys/brk.S
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/vax/sys/cerror.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/vax/sys/execle.S \
src/lib/libc/arch/vax/sys/getcontext.S src/lib/libc/arch/vax/sys/pipe.S
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/vax/sys/ptrace.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/vax/sys/sbrk.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/vax/sys/syscall.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/arch/vax/sys/compat_Ovfork.S \
src/lib/libc/compat/arch/vax/sys/compat___sigreturn14.S \
src/lib/libc/compat/arch/vax/sys/compat___sigtramp2.S \
src/lib/libc/compat/arch/vax/sys/compat_sigpending13.S \
src/lib/libc/compat/arch/vax/sys/compat_sigprocmask13.S \
src/lib/libc/compat/arch/vax/sys/compat_sigreturn13.S \
src/lib/libc/compat/arch/vax/sys/compat_sigsuspend13.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/vax/SYS.h
diff -u src/lib/libc/arch/vax/SYS.h:1.10 src/lib/libc/arch/vax/SYS.h:1.11
--- src/lib/libc/arch/vax/SYS.h:1.10	Thu Aug  7 16:42:30 2003
+++ src/lib/libc/arch/vax/SYS.h	Tue Jan 25 02:38:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: SYS.h,v 1.10 2003/08/07 16:42:30 agc Exp $ */
+/*	$NetBSD: SYS.h,v 1.11 2011/01/25 02:38:15 matt Exp $ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -33,6 +33,9 @@
 #include machine/asm.h
 #include sys/syscall.h
 
+#define	CERROR	_C_LABEL(__cerror)
+#define	CURBRK	_C_LABEL(__curbrk)
+
 #ifdef __STDC__
 #define SYSTRAP(x)	chmk $ SYS_ ## x
 #else
@@ -44,6 +47,7 @@
 	SYSTRAP(y)
 
 #define _SYSCALL(x,y)			\
+	.p2align 2;			\
 	err: nop; nop; jmp CERROR+2;	\
 	_SYSCALL_NOERROR(x,y);		\
 	jcs err+2
@@ -56,11 +60,13 @@
 
 #define PSEUDO_NOERROR(x,y)		\
 	_SYSCALL_NOERROR(x,y);		\
-	ret
+	ret;\
+	END(x)
 
 #define PSEUDO(x,y)			\
 	_SYSCALL(x,y);			\
-	ret
+	ret;\
+	END(x)
 
 #define RSYSCALL_NOERROR(x)		\
 	PSEUDO_NOERROR(x,x)
@@ -79,12 +85,5 @@
 
 #define	ASMSTR		.asciz
 
-#ifdef __ELF__
-#define	CERROR	_C_LABEL(__cerror)
-#define	CURBRK	_C_LABEL(__curbrk)
-#else
-#define	CERROR	_ASM_LABEL(cerror)
-#define	CURBRK	_ASM_LABEL(curbrk)
-#endif
-
+	.hidden CERROR
 	.globl	CERROR

Index: src/lib/libc/arch/vax/genassym.cf
diff -u src/lib/libc/arch/vax/genassym.cf:1.4 src/lib/libc/arch/vax/genassym.cf:1.5
--- src/lib/libc/arch/vax/genassym.cf:1.4	Mon Apr 28 20:22:57 2008
+++ src/lib/libc/arch/vax/genassym.cf	Tue Jan 25 02:38:15 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.4 2008/04/28 20:22:57 martin Exp $
+#	$NetBSD: genassym.cf,v 1.5 2011/01/25 02:38:15 matt Exp 

CVS commit: src/sys/uvm

2011-01-24 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Tue Jan 25 03:34:30 UTC 2011

Modified Files:
src/sys/uvm: uvm_aobj.c

Log Message:
Remove nop code; the code is moved to uao_dropswap_range1() when it is
introduced in rev. 1.75.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/uvm/uvm_aobj.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.110 src/sys/uvm/uvm_aobj.c:1.111
--- src/sys/uvm/uvm_aobj.c:1.110	Thu Jul 29 10:54:51 2010
+++ src/sys/uvm/uvm_aobj.c	Tue Jan 25 03:34:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.110 2010/07/29 10:54:51 hannken Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.111 2011/01/25 03:34:29 enami Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_aobj.c,v 1.110 2010/07/29 10:54:51 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_aobj.c,v 1.111 2011/01/25 03:34:29 enami Exp $);
 
 #include opt_uvmhist.h
 
@@ -393,8 +393,6 @@
 static void
 uao_free(struct uvm_aobj *aobj)
 {
-	int swpgonlydelta = 0;
-
 
 #if defined(VMSWAP)
 	uao_dropswap_range1(aobj, 0, 0);
@@ -426,18 +424,6 @@
 
 	UVM_OBJ_DESTROY(aobj-u_obj);
 	pool_cache_put(uvm_aobj_cache, aobj);
-
-	/*
-	 * adjust the counter of pages only in swap for all
-	 * the swap slots we've freed.
-	 */
-
-	if (swpgonlydelta  0) {
-		mutex_enter(uvm_swap_data_lock);
-		KASSERT(uvmexp.swpgonly = swpgonlydelta);
-		uvmexp.swpgonly -= swpgonlydelta;
-		mutex_exit(uvm_swap_data_lock);
-	}
 }
 
 /*



CVS commit: src/common/lib/libc/arch/vax

2011-01-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 25 04:45:29 UTC 2011

Modified Files:
src/common/lib/libc/arch/vax/gen: bswap16.S bswap32.S bswap64.S udiv.S
urem.S
src/common/lib/libc/arch/vax/string: memcpy.S memmove.S memset.S

Log Message:
Use END(sym)
use RCSID


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/vax/gen/bswap16.S \
src/common/lib/libc/arch/vax/gen/bswap32.S \
src/common/lib/libc/arch/vax/gen/bswap64.S \
src/common/lib/libc/arch/vax/gen/udiv.S \
src/common/lib/libc/arch/vax/gen/urem.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/vax/string/memcpy.S \
src/common/lib/libc/arch/vax/string/memmove.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/vax/string/memset.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/vax/gen/bswap16.S
diff -u src/common/lib/libc/arch/vax/gen/bswap16.S:1.2 src/common/lib/libc/arch/vax/gen/bswap16.S:1.3
--- src/common/lib/libc/arch/vax/gen/bswap16.S:1.2	Mon Apr 28 20:22:52 2008
+++ src/common/lib/libc/arch/vax/gen/bswap16.S	Tue Jan 25 04:45:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bswap16.S,v 1.2 2008/04/28 20:22:52 martin Exp $	*/
+/*	$NetBSD: bswap16.S,v 1.3 2011/01/25 04:45:28 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,14 +31,17 @@
 
 #include machine/asm.h
 
+RCSID($NetBSD: bswap16.S,v 1.3 2011/01/25 04:45:28 matt Exp $)
+
 #if defined(_KERNEL) || defined(_STANDALONE)
-ENTRY(_C_LABEL(bswap16), 0)
+ALTENTRY(_C_LABEL(bswap16))
 #else
 ALTENTRY(_C_LABEL(ntohs))
 ALTENTRY(_C_LABEL(htons))
-ENTRY(_C_LABEL(__bswap16), 0)
 #endif
+ENTRY(_C_LABEL(__bswap16), 0)
 	movl	4(%ap), %r1
 	extzv	$8, $8, %r1, %r0
 	insv	%r1, $8, $8, %r0
 	ret
+END(_C_LABEL(__bswap16))
Index: src/common/lib/libc/arch/vax/gen/bswap32.S
diff -u src/common/lib/libc/arch/vax/gen/bswap32.S:1.2 src/common/lib/libc/arch/vax/gen/bswap32.S:1.3
--- src/common/lib/libc/arch/vax/gen/bswap32.S:1.2	Mon Apr 28 20:22:52 2008
+++ src/common/lib/libc/arch/vax/gen/bswap32.S	Tue Jan 25 04:45:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bswap32.S,v 1.2 2008/04/28 20:22:52 martin Exp $	*/
+/*	$NetBSD: bswap32.S,v 1.3 2011/01/25 04:45:28 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,18 +31,18 @@
 
 #include machine/asm.h
 
+RCSID($NetBSD: bswap32.S,v 1.3 2011/01/25 04:45:28 matt Exp $)
+
 #if defined(_KERNEL) || defined(_STANDALONE)
-ENTRY(_C_LABEL(bswap32), 0)
+ALTENTRY(_C_LABEL(bswap32))
 #else
-#if BYTE_ORDER == LITTLE_ENDIAN
 ALTENTRY(_C_LABEL(ntohl))
 ALTENTRY(_C_LABEL(htonl))
 #endif
 ENTRY(_C_LABEL(__bswap32), 0)
-#endif
 	rotl$-8, 4(%ap), %r0  
 	insv%r0, $16, $8, %r0
 	rotl$8, 4(%ap), %r1
 	movb%r1, %r0
 	ret
-
+END(_C_LABEL(__bswap32))
Index: src/common/lib/libc/arch/vax/gen/bswap64.S
diff -u src/common/lib/libc/arch/vax/gen/bswap64.S:1.2 src/common/lib/libc/arch/vax/gen/bswap64.S:1.3
--- src/common/lib/libc/arch/vax/gen/bswap64.S:1.2	Sat Dec 24 08:33:32 2005
+++ src/common/lib/libc/arch/vax/gen/bswap64.S	Tue Jan 25 04:45:28 2011
@@ -1,11 +1,9 @@
 /* Written by Anders Magnusson. Public Domain */
 
-#if defined(LIBC_SCCS)  !defined(lint)
-	.asciz $NetBSD: bswap64.S,v 1.2 2005/12/24 08:33:32 matt Exp $
-#endif /* LIBC_SCCS and not lint */
-
 #include machine/asm.h
 
+RCSID($NetBSD: bswap64.S,v 1.3 2011/01/25 04:45:28 matt Exp $)
+
 ENTRY(bswap64, 0)
 movq 4(%ap),%r3
 	rotl $-8,%r3,%r1
@@ -17,3 +15,4 @@
 	rotl $8,%r4,%r2
 	movb %r2,%r0
 	ret
+END(bswap64)
Index: src/common/lib/libc/arch/vax/gen/udiv.S
diff -u src/common/lib/libc/arch/vax/gen/udiv.S:1.2 src/common/lib/libc/arch/vax/gen/udiv.S:1.3
--- src/common/lib/libc/arch/vax/gen/udiv.S:1.2	Sat Dec 24 08:33:32 2005
+++ src/common/lib/libc/arch/vax/gen/udiv.S	Tue Jan 25 04:45:28 2011
@@ -30,10 +30,10 @@
  * SUCH DAMAGE.
  */
 
-#if defined(LIBC_SCCS)  !defined(lint)
+#include machine/asm.h
+
 	/* .asciz @(#)udiv.s	8.1 (Berkeley) 6/4/93 */
-	.asciz $NetBSD: udiv.S,v 1.2 2005/12/24 08:33:32 matt Exp $
-#endif /* LIBC_SCCS and not lint */
+RCSID($NetBSD: udiv.S,v 1.3 2011/01/25 04:45:28 matt Exp $)
 
 /*
  * Unsigned division, PCC flavor.
@@ -41,16 +41,10 @@
  * audiv() takes a pointer to a dividend and an ordinary divisor.
  */
 
-#include machine/asm.h
-
 #define	DIVIDEND	4(%ap)
 #define	DIVISOR		8(%ap)
 
-#ifdef __ELF__
 ASENTRY(__udiv,0)
-#else
-ASENTRY(udiv,0)
-#endif
 	movl	DIVISOR,%r2
 	jlss	Leasy		# big divisor: settle by comparison
 	movl	DIVIDEND,%r0
@@ -69,12 +63,9 @@
 Lone:
 	movl	$1,%r0
 	ret
+END(__udiv)
 
-#ifdef __ELF__
 ASENTRY(__audiv,0)
-#else
-ASENTRY(audiv,0)
-#endif
 	movl	DIVIDEND,%r3
 	movl	DIVISOR,%r2
 	jlss	La_easy		# big divisor: settle by comparison
@@ -98,3 +89,4 @@
 	movl	$1,%r0
 	movl	%r0,(%r3)
 	ret
+END(__audiv)
Index: src/common/lib/libc/arch/vax/gen/urem.S
diff -u src/common/lib/libc/arch/vax/gen/urem.S:1.2 

CVS commit: src/sys/dev/pci

2011-01-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jan 25 07:17:08 UTC 2011

Modified Files:
src/sys/dev/pci: tga.c

Log Message:
fix the previous.  there's no vc variable, nor does the local dc
have a softc member.  use sc-sc_dev instead.

compile tested only, but that's better than the previous revision.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/pci/tga.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/tga.c
diff -u src/sys/dev/pci/tga.c:1.81 src/sys/dev/pci/tga.c:1.82
--- src/sys/dev/pci/tga.c:1.81	Sat Jan 22 15:14:28 2011
+++ src/sys/dev/pci/tga.c	Tue Jan 25 07:17:07 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: tga.c,v 1.81 2011/01/22 15:14:28 cegger Exp $ */
+/* $NetBSD: tga.c,v 1.82 2011/01/25 07:17:07 mrg Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tga.c,v 1.81 2011/01/22 15:14:28 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: tga.c,v 1.82 2011/01/25 07:17:07 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -598,7 +598,7 @@
 		cmd, data, flag, l);
 
 	case WSDISPLAYIO_GET_BUSID:
-		return wsdisplayio_busid_pci(vc-softc-sc_dev, dc-dc_pc,
+		return wsdisplayio_busid_pci(sc-sc_dev, dc-dc_pc,
 		dc-dc_pcitag, data);
 	}
 	return EPASSTHROUGH;