Re: CVS commit: src/sbin/disklabel

2011-07-26 Thread Alan Barrett

On Mon, 25 Jul 2011, Christos Zoulas wrote:

Modified Files:
src/sbin/disklabel: disklabel.8

Log Message:
mention that we don't handle more than 2TB disks/partitions.


I think the limit's actually (2**32 - 1) sectors.  With
512-byte sectors, that's one sector less than 2TB.

--apb (Alan Barrett)


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Joerg Sonnenberger
On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
 Module Name:  src
 Committed By: njoly
 Date: Tue Jul 26 14:59:03 UTC 2011
 
 Modified Files:
   src/sys/arch/alpha/alpha: autoconf.c
 
 Log Message:
 Make atoi func static, and constify

Shouldn't this use strtol to implement atoi?

Joerg


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote:
 On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
  Module Name:src
  Committed By:   njoly
  Date:   Tue Jul 26 14:59:03 UTC 2011
  
  Modified Files:
  src/sys/arch/alpha/alpha: autoconf.c
  
  Log Message:
  Make atoi func static, and constify
 
 Shouldn't this use strtol to implement atoi?

We don't have strtol for kernel use.

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Joerg Sonnenberger
On Tue, Jul 26, 2011 at 06:19:21PM +0200, Nicolas Joly wrote:
 On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote:
  On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
   Module Name:  src
   Committed By: njoly
   Date: Tue Jul 26 14:59:03 UTC 2011
   
   Modified Files:
 src/sys/arch/alpha/alpha: autoconf.c
   
   Log Message:
   Make atoi func static, and constify
  
  Shouldn't this use strtol to implement atoi?
 
 We don't have strtol for kernel use.

Then use strtoll. We have at least some conversion code in libkern.

Joerg


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
On Tue, Jul 26, 2011 at 06:45:31PM +0200, Joerg Sonnenberger wrote:
 On Tue, Jul 26, 2011 at 06:19:21PM +0200, Nicolas Joly wrote:
  On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote:
   On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
Module Name:src
Committed By:   njoly
Date:   Tue Jul 26 14:59:03 UTC 2011

Modified Files:
src/sys/arch/alpha/alpha: autoconf.c

Log Message:
Make atoi func static, and constify
   
   Shouldn't this use strtol to implement atoi?
  
  We don't have strtol for kernel use.
 
 Then use strtoll. We have at least some conversion code in libkern.

Looking how many atoi() copies we have in tree, does it make sense to
add the following at the end of libkern.h

LIBKERN_INLINE int atoi(const char *) __unused;

#ifdef LIBKERN_BODY
LIBKERN_INLINE int
atoi(const char *s)
{
return (int)strtoll(s, NULL, 10);
}
#endif

and rename the conflicting ones (dm, ptyfs and procfs).

njoly@lanfeust [NetBSD/src] find sys -type f -name '*.[ch]'| xargs grep 
'atoi(.*char'
sys/arch/alpha/alpha/autoconf.c:static int atoi(const char *);
sys/arch/alpha/alpha/autoconf.c:atoi(const char *s)
sys/arch/amiga/dev/ite.c:inline static int atoi(const char *);
sys/arch/amiga/dev/ite.c:atoi(const char *cp)
sys/arch/atari/dev/ite.c:static inline int  atoi(const char *);
sys/arch/hp300/stand/common/devopen.c:atoi(char *cp)
sys/arch/hp300/stand/common/samachdep.h:int atoi(char *);
sys/arch/i386/stand/lib/bootmenu.c:atoi(const char *in)
sys/arch/i386/stand/lib/bootmenu.h:int atoi(const char *);
sys/arch/next68k/next68k/autoconf.c:static int atoi(const char *);
sys/arch/next68k/next68k/autoconf.c:atoi(const char *s)
sys/arch/next68k/stand/boot/devopen.c:int atoi(const char *);
sys/arch/next68k/stand/boot/devopen.c:atoi(const char *cp)
sys/arch/prep/stand/boot/devopen.c:int atoi(char *);
sys/arch/prep/stand/boot/devopen.c:atoi(char *cp)
sys/arch/rs6000/stand/boot/devopen.c:int atoi(char *);
sys/arch/rs6000/stand/boot/devopen.c:atoi(char *cp)
sys/arch/vax/boot/boot/devopen.c:intatoi(char *);
sys/arch/x68k/dev/ite.c:inline static int atoi(const char *);
sys/arch/x68k/dev/ite.c:atoi(const char *cp)
sys/arch/zaurus/stand/zboot/bootmenu.c:atoi(const char *in)
sys/arch/zaurus/stand/zboot/bootmenu.h:int atoi(const char *);
sys/compat/ndis/subr_ntoskrnl.c:atoi(const char *str)
sys/dev/dm/dm.h:uint64_t atoi(const char *);
sys/dev/dm/dm_target_linear.c:atoi(const char *s)
sys/dev/raidframe/rf_utils.c:rf_atoi(char *p)
sys/dev/raidframe/rf_utils.h:int rf_atoi(char *p);
sys/fs/ptyfs/ptyfs_vnops.c:static int atoi(const char *, size_t);
sys/fs/ptyfs/ptyfs_vnops.c:atoi(const char *b, size_t len)
sys/miscfs/procfs/procfs_vnops.c:static int atoi(const char *, size_t);
sys/miscfs/procfs/procfs_vnops.c:atoi(const char *b, size_t len)

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Joerg Sonnenberger
On Wed, Jul 27, 2011 at 02:33:24AM +0900, Izumi Tsutsui wrote:
  Looking how many atoi() copies we have in tree, does it make sense to
  add the following at the end of libkern.h
 
 Please don't use it for #ifdef _STANDALONE ones.
 libc's strtoll() is larger than dumb atoi()s.

...if strtoll isn't already pulled in for other reasons.

Joerg


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
On Wed, Jul 27, 2011 at 02:33:24AM +0900, Izumi Tsutsui wrote:
  Looking how many atoi() copies we have in tree, does it make sense to
  add the following at the end of libkern.h
 
 Please don't use it for #ifdef _STANDALONE ones.
 libc's strtoll() is larger than dumb atoi()s.

Fine. No need then, i'll only update the alpha one.

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.


Re: CVS commit: src/sbin/disklabel

2011-07-26 Thread David Laight
On Tue, Jul 26, 2011 at 09:56:24AM +0200, Alan Barrett wrote:
 On Mon, 25 Jul 2011, Christos Zoulas wrote:
 Modified Files:
  src/sbin/disklabel: disklabel.8
 
 Log Message:
 mention that we don't handle more than 2TB disks/partitions.
 
 I think the limit's actually (2**32 - 1) sectors.  With
 512-byte sectors, that's one sector less than 2TB.

I've always wondered if the label could lie about the physical sector size?
Making it look like you'd copied a disk image from a disk with (say) 8k sectors!
But I don't think the fs support for large sectors is adequately phyical
sector size agnostic.
8k sectors, 8k fragments and 64k blocks should work for FFSv1 and FFSv2.

David

-- 
David Laight: da...@l8s.co.uk


CVS commit: src/doc

2011-07-26 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Tue Jul 26 07:18:36 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
mention recent bind update, correct used bind version


To generate a diff of this commit:
cvs rdiff -u -r1.854 -r1.855 src/doc/3RDPARTY
cvs rdiff -u -r1.1582 -r1.1583 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.854 src/doc/3RDPARTY:1.855
--- src/doc/3RDPARTY:1.854	Mon Jul 25 03:12:04 2011
+++ src/doc/3RDPARTY	Tue Jul 26 07:18:35 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.854 2011/07/25 03:12:04 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.855 2011/07/26 07:18:35 spz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -92,7 +92,7 @@
 bc includes dc, both of which are in the NetBSD tree.
 
 Package:	bind [named and utils]
-Version:	9.8.0-P2
+Version:	9.8.0-P4
 Current Vers:	9.8.0-P4
 Maintainer:	Paul Vixie vi...@vix.com
 Archive Site:	ftp://ftp.isc.org/isc/bind9/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1582 src/doc/CHANGES:1.1583
--- src/doc/CHANGES:1.1582	Mon Jul 25 03:12:04 2011
+++ src/doc/CHANGES	Tue Jul 26 07:18:35 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1582 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1583 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1059,6 +1059,7 @@
 	less(1): Import version 444. [tron 20110703]
 	mips: Rework Atheros MIPS-based SoC support.  Add initial support
 		for AR71xx (24K) and AR9344 (74K) SoCs.
+	bind: Update to 9.8.0-P4: Security fixes. [spz 20110705]
 	dtv(4): Add digital TV framework. [jmcneill 20110709]
 	auvitek(4): Add digital capture support. [jmcneill 20110709]
 	cxdtv(4): Add driver for Conexant CX23880-based DTV cards.



CVS commit: src/sys/arch/macppc/dev

2011-07-26 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jul 26 08:36:02 UTC 2011

Modified Files:
src/sys/arch/macppc/dev: am79c950.c if_mc.c if_mcvar.h ki2c.c ki2cvar.h
mediabay.c obio.c smartbat.c

Log Message:
finish device_t-ification


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/macppc/dev/am79c950.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/macppc/dev/if_mc.c \
src/sys/arch/macppc/dev/mediabay.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/macppc/dev/if_mcvar.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/macppc/dev/ki2c.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/macppc/dev/ki2cvar.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/macppc/dev/obio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/dev/smartbat.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/macppc/dev/am79c950.c
diff -u src/sys/arch/macppc/dev/am79c950.c:1.31 src/sys/arch/macppc/dev/am79c950.c:1.32
--- src/sys/arch/macppc/dev/am79c950.c:1.31	Fri Jul  1 18:41:51 2011
+++ src/sys/arch/macppc/dev/am79c950.c	Tue Jul 26 08:36:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: am79c950.c,v 1.31 2011/07/01 18:41:51 dyoung Exp $	*/
+/*	$NetBSD: am79c950.c,v 1.32 2011/07/26 08:36:02 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1997 David Huang k...@bga.com
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: am79c950.c,v 1.31 2011/07/01 18:41:51 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: am79c950.c,v 1.32 2011/07/26 08:36:02 macallan Exp $);
 
 #include opt_inet.h
 
@@ -149,7 +149,7 @@
 	memcpy(sc-sc_enaddr, lladdr, ETHER_ADDR_LEN);
 	printf(: address %s\n, ether_sprintf(lladdr));
 
-	memcpy(ifp-if_xname, sc-sc_dev.dv_xname, IFNAMSIZ);
+	memcpy(ifp-if_xname, device_xname(sc-sc_dev), IFNAMSIZ);
 	ifp-if_softc = sc;
 	ifp-if_ioctl = mcioctl;
 	ifp-if_start = mcstart;
@@ -421,7 +421,7 @@
 	}
 
 	if (totlen  PAGE_SIZE)
-		panic(%s: maceput: packet overflow, sc-sc_dev.dv_xname);
+		panic(%s: maceput: packet overflow, device_xname(sc-sc_dev));
 
 #if 0
 	if (totlen  ETHERMIN + sizeof(struct ether_header)) {
@@ -449,20 +449,20 @@
 
 	if (ir  JAB) {
 #ifdef MCDEBUG
-		printf(%s: jabber error\n, sc-sc_dev.dv_xname);
+		printf(%s: jabber error\n, device_xname(sc-sc_dev));
 #endif
 		sc-sc_if.if_oerrors++;
 	}
 
 	if (ir  BABL) {
 #ifdef MCDEBUG
-		printf(%s: babble\n, sc-sc_dev.dv_xname);
+		printf(%s: babble\n, device_xname(sc-sc_dev));
 #endif
 		sc-sc_if.if_oerrors++;
 	}
 
 	if (ir  CERR) {
-		printf(%s: collision error\n, sc-sc_dev.dv_xname);
+		printf(%s: collision error\n, device_xname(sc-sc_dev));
 		sc-sc_if.if_collisions++;
 	}
 
@@ -493,13 +493,13 @@
 		return;
 
 	if (xmtfs  UFLO) {
-		printf(%s: underflow\n, sc-sc_dev.dv_xname);
+		printf(%s: underflow\n, device_xname(sc-sc_dev));
 		mcreset(sc);
 		return;
 	}
 
 	if (xmtfs  LCOL) {
-		printf(%s: late collision\n, sc-sc_dev.dv_xname);
+		printf(%s: late collision\n, device_xname(sc-sc_dev));
 		sc-sc_if.if_oerrors++;
 		sc-sc_if.if_collisions++;
 	}
@@ -516,7 +516,7 @@
 
 	if (xmtfs  LCAR) {
 		sc-sc_havecarrier = 0;
-		printf(%s: lost carrier\n, sc-sc_dev.dv_xname);
+		printf(%s: lost carrier\n, device_xname(sc-sc_dev));
 		sc-sc_if.if_oerrors++;
 	}
 
@@ -536,12 +536,12 @@
 #ifdef MCDEBUG
 	if (rxf.rx_rcvsts  0xf0)
 		printf(%s: rcvcnt %02x rcvsts %02x rntpc 0x%02x rcvcc 0x%02x\n,
-		sc-sc_dev.dv_xname, rxf.rx_rcvcnt, rxf.rx_rcvsts,
+		device_xname(sc-sc_dev), rxf.rx_rcvcnt, rxf.rx_rcvsts,
 		rxf.rx_rntpc, rxf.rx_rcvcc);
 #endif
 
 	if (rxf.rx_rcvsts  OFLO) {
-		printf(%s: receive FIFO overflow\n, sc-sc_dev.dv_xname);
+		printf(%s: receive FIFO overflow\n, device_xname(sc-sc_dev));
 		sc-sc_if.if_ierrors++;
 		return;
 	}
@@ -551,7 +551,7 @@
 
 	if (rxf.rx_rcvsts  FRAM) {
 #ifdef MCDEBUG
-		printf(%s: framing error\n, sc-sc_dev.dv_xname);
+		printf(%s: framing error\n, device_xname(sc-sc_dev));
 #endif
 		sc-sc_if.if_ierrors++;
 		return;
@@ -559,7 +559,7 @@
 
 	if (rxf.rx_rcvsts  FCS) {
 #ifdef MCDEBUG
-		printf(%s: frame control checksum error\n, sc-sc_dev.dv_xname);
+		printf(%s: frame control checksum error\n, device_xname(sc-sc_dev));
 #endif
 		sc-sc_if.if_ierrors++;
 		return;
@@ -579,7 +579,7 @@
 	len  ETHERMTU + sizeof(struct ether_header)) {
 #ifdef MCDEBUG
 		printf(%s: invalid packet size %d; dropping\n,
-		sc-sc_dev.dv_xname, len);
+		device_xname(sc-sc_dev), len);
 #endif
 		ifp-if_ierrors++;
 		return;

Index: src/sys/arch/macppc/dev/if_mc.c
diff -u src/sys/arch/macppc/dev/if_mc.c:1.21 src/sys/arch/macppc/dev/if_mc.c:1.22
--- src/sys/arch/macppc/dev/if_mc.c:1.21	Fri Jul  1 18:41:52 2011
+++ src/sys/arch/macppc/dev/if_mc.c	Tue Jul 26 08:36:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mc.c,v 1.21 2011/07/01 18:41:52 dyoung Exp $	*/
+/*	$NetBSD: if_mc.c,v 1.22 2011/07/26 08:36:02 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1997 David Huang k...@bga.com
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h

CVS commit: src/sys/arch/macppc/dev

2011-07-26 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jul 26 08:37:45 UTC 2011

Modified Files:
src/sys/arch/macppc/dev: battery.c

Log Message:
finish device_t-ification


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/macppc/dev/battery.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/macppc/dev/battery.c
diff -u src/sys/arch/macppc/dev/battery.c:1.14 src/sys/arch/macppc/dev/battery.c:1.15
--- src/sys/arch/macppc/dev/battery.c:1.14	Sun Jul 10 14:41:34 2011
+++ src/sys/arch/macppc/dev/battery.c	Tue Jul 26 08:37:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: battery.c,v 1.14 2011/07/10 14:41:34 pgoyette Exp $ */
+/*	$NetBSD: battery.c,v 1.15 2011/07/26 08:37:45 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: battery.c,v 1.14 2011/07/10 14:41:34 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: battery.c,v 1.15 2011/07/26 08:37:45 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -117,6 +117,7 @@
 	struct battery_softc *sc = device_private(self);
 	uint32_t reg;
 
+	sc-sc_dev = self;
 	sc-sc_pmu_ops = baa-baa_pmu_ops;
 	aprint_normal(: legacy battery );
 



CVS commit: src/sys/arch/shark

2011-07-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul 26 08:56:27 UTC 2011

Modified Files:
src/sys/arch/shark/ofw: igsfb_ofbus.c ofrom.c
src/sys/arch/shark/shark: opms.c scr.c

Log Message:
convert to device_t, cfdata_t and CFATTACH_DECL_NEW.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/shark/ofw/igsfb_ofbus.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/shark/ofw/ofrom.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/shark/shark/opms.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/shark/shark/scr.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/shark/ofw/igsfb_ofbus.c
diff -u src/sys/arch/shark/ofw/igsfb_ofbus.c:1.12 src/sys/arch/shark/ofw/igsfb_ofbus.c:1.13
--- src/sys/arch/shark/ofw/igsfb_ofbus.c:1.12	Tue Jul 19 15:07:43 2011
+++ src/sys/arch/shark/ofw/igsfb_ofbus.c	Tue Jul 26 08:56:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb_ofbus.c,v 1.12 2011/07/19 15:07:43 dyoung Exp $ */
+/*	$NetBSD: igsfb_ofbus.c,v 1.13 2011/07/26 08:56:26 mrg Exp $ */
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: igsfb_ofbus.c,v 1.12 2011/07/19 15:07:43 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: igsfb_ofbus.c,v 1.13 2011/07/26 08:56:26 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -65,12 +65,12 @@
 
 
 
-static int	igsfb_ofbus_match(struct device *, struct cfdata *, void *);
-static void	igsfb_ofbus_attach(struct device *, struct device *, void *);
+static int	igsfb_ofbus_match(device_t, cfdata_t, void *);
+static void	igsfb_ofbus_attach(device_t, device_t, void *);
 static int	igsfb_setup_dc(struct igsfb_devconfig *);
 static paddr_t	igsfb_ofbus_mmap(void *, void *, off_t, int);
 
-CFATTACH_DECL(igsfb_ofbus, sizeof(struct igsfb_softc),
+CFATTACH_DECL_NEW(igsfb_ofbus, sizeof(struct igsfb_softc),
 igsfb_ofbus_match, igsfb_ofbus_attach, NULL, NULL);
 
 static const char const *compat_strings[] = { igs,cyperpro2010, NULL };
@@ -196,7 +196,7 @@
 
 
 static int
-igsfb_ofbus_match(struct device *parent, struct cfdata *match, void *aux)
+igsfb_ofbus_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct ofbus_attach_args *oba = aux;
 
@@ -207,13 +207,14 @@
 }
 
 static void
-igsfb_ofbus_attach(struct device *parent, struct device *self, void *aux)
+igsfb_ofbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct igsfb_softc *sc = (struct igsfb_softc *)self;
 	struct ofbus_attach_args *oba = aux;
 	uint32_t regs[16];
 	int isconsole, ret;
 	
+	sc-sc_dev = self;
 	if (igsfb_ofbus_is_console(oba-oba_phandle)) {
 		isconsole = 1;
 		sc-sc_dc = igsfb_console_dc;

Index: src/sys/arch/shark/ofw/ofrom.c
diff -u src/sys/arch/shark/ofw/ofrom.c:1.22 src/sys/arch/shark/ofw/ofrom.c:1.23
--- src/sys/arch/shark/ofw/ofrom.c:1.22	Tue Jul 19 15:07:43 2011
+++ src/sys/arch/shark/ofw/ofrom.c	Tue Jul 26 08:56:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofrom.c,v 1.22 2011/07/19 15:07:43 dyoung Exp $	*/
+/*	$NetBSD: ofrom.c,v 1.23 2011/07/26 08:56:26 mrg Exp $	*/
 
 /*
  * Copyright 1998
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofrom.c,v 1.22 2011/07/19 15:07:43 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofrom.c,v 1.23 2011/07/26 08:56:26 mrg Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -52,16 +52,15 @@
 #include dev/ofw/openfirm.h
 
 struct ofrom_softc {
-	struct device	sc_dev;
 	int		enabled;
 	paddr_t		base;
 	paddr_t		size;
 };
 
-int ofromprobe(struct device *, struct cfdata *, void *);
-void ofromattach(struct device *, struct device *, void *);
+int ofromprobe(device_t, cfdata_t, void *);
+void ofromattach(device_t, device_t, void *);
 
-CFATTACH_DECL(ofrom, sizeof(struct ofrom_softc),
+CFATTACH_DECL_NEW(ofrom, sizeof(struct ofrom_softc),
 ofromprobe, ofromattach, NULL, NULL);
 
 extern struct cfdriver ofrom_cd;
@@ -76,7 +75,7 @@
 };
 
 int
-ofromprobe(struct device *parent, struct cfdata *cf, void *aux)
+ofromprobe(device_t parent, cfdata_t cf, void *aux)
 {
 	struct ofbus_attach_args *oba = aux;
 	static const char *const compatible_strings[] = { rom, NULL };
@@ -87,9 +86,9 @@
 
 
 void
-ofromattach(struct device *parent, struct device *self, void *aux)
+ofromattach(device_t parent, device_t self, void *aux)
 {
-	struct ofrom_softc *sc = (struct ofrom_softc *)self;
+	struct ofrom_softc *sc = device_private(self);
 	struct ofbus_attach_args *oba = aux;
 	char regbuf[8];
 

Index: src/sys/arch/shark/shark/opms.c
diff -u src/sys/arch/shark/shark/opms.c:1.23 src/sys/arch/shark/shark/opms.c:1.24
--- src/sys/arch/shark/shark/opms.c:1.23	Sat Mar 14 15:36:13 2009
+++ src/sys/arch/shark/shark/opms.c	Tue Jul 26 08:56:26 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: opms.c,v 1.23 2009/03/14 15:36:13 dsl Exp $*/
+/*  $NetBSD: opms.c,v 1.24 2011/07/26 08:56:26 mrg Exp $*/
 
 /*
  * Copyright 1997
@@ -91,7 +91,7 @@
 */
 
 #include sys/cdefs.h

CVS commit: src/sys/dev

2011-07-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul 26 08:59:38 UTC 2011

Modified Files:
src/sys/dev/ic: igsfb.c igsfbvar.h
src/sys/dev/ir: cir.c cirvar.h
src/sys/dev/ofw: ofcons.c ofdisk.c ofnet.c ofrtc.c
src/sys/dev/pci: igsfb_pci.c

Log Message:
convert to device_t, cfdata_t and CFATTACH_DECL_NEW.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ic/igsfb.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/ic/igsfbvar.h
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ir/cir.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ir/cirvar.h
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/ofw/ofcons.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ofw/ofdisk.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/ofw/ofnet.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ofw/ofrtc.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/igsfb_pci.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/ic/igsfb.c
diff -u src/sys/dev/ic/igsfb.c:1.49 src/sys/dev/ic/igsfb.c:1.50
--- src/sys/dev/ic/igsfb.c:1.49	Wed May 12 20:58:52 2010
+++ src/sys/dev/ic/igsfb.c	Tue Jul 26 08:59:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb.c,v 1.49 2010/05/12 20:58:52 macallan Exp $ */
+/*	$NetBSD: igsfb.c,v 1.50 2011/07/26 08:59:37 mrg Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -31,7 +31,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: igsfb.c,v 1.49 2010/05/12 20:58:52 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: igsfb.c,v 1.50 2011/07/26 08:59:37 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -194,14 +194,14 @@
 	dc-dc_console.scr_flags |= VCONS_SCREEN_IS_STATIC;
 
 	printf(%s: %dMB, %s%dx%d, %dbpp\n,
-	   device_xname(sc-sc_dev),
+	   device_xname(sc-sc_dev),
 	   (uint32_t)(dc-dc_vmemsz  20),
 	   (dc-dc_hwflags  IGSFB_HW_BSWAP)
 		   ? (dc-dc_hwflags  IGSFB_HW_BE_SELECT)
 		   ? hardware bswap,  : software bswap, 
 		   : ,
 	   dc-dc_width, dc-dc_height, dc-dc_depth);
-	printf(%s: using %dbpp for X\n, device_xname(sc-sc_dev),
+	printf(%s: using %dbpp for X\n, device_xname(sc-sc_dev),
 	   dc-dc_maxdepth);
 	ri = dc-dc_console.scr_ri;
 	ri-ri_ops.eraserows(ri, 0, ri-ri_rows, defattr);
@@ -215,7 +215,7 @@
 	waa.accessops = igsfb_accessops;
 	waa.accesscookie = dc-dc_vd;
 
-	config_found(sc-sc_dev, waa, wsemuldisplaydevprint);
+	config_found(sc-sc_dev, waa, wsemuldisplaydevprint);
 }
 
 

Index: src/sys/dev/ic/igsfbvar.h
diff -u src/sys/dev/ic/igsfbvar.h:1.19 src/sys/dev/ic/igsfbvar.h:1.20
--- src/sys/dev/ic/igsfbvar.h:1.19	Wed Nov 18 21:59:38 2009
+++ src/sys/dev/ic/igsfbvar.h	Tue Jul 26 08:59:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfbvar.h,v 1.19 2009/11/18 21:59:38 macallan Exp $ */
+/*	$NetBSD: igsfbvar.h,v 1.20 2011/07/26 08:59:37 mrg Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -127,7 +127,7 @@
 
 
 struct igsfb_softc {
-	struct device sc_dev;
+	device_t sc_dev;
 	struct igsfb_devconfig *sc_dc;
 };
 

Index: src/sys/dev/ir/cir.c
diff -u src/sys/dev/ir/cir.c:1.28 src/sys/dev/ir/cir.c:1.29
--- src/sys/dev/ir/cir.c:1.28	Wed Dec 29 13:43:16 2010
+++ src/sys/dev/ir/cir.c	Tue Jul 26 08:59:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cir.c,v 1.28 2010/12/29 13:43:16 jmcneill Exp $	*/
+/*	$NetBSD: cir.c,v 1.29 2011/07/26 08:59:38 mrg Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cir.c,v 1.28 2010/12/29 13:43:16 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: cir.c,v 1.29 2011/07/26 08:59:38 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -64,7 +64,7 @@
 void cir_attach(device_t parent, device_t self, void *aux);
 int cir_detach(device_t self, int flags);
 
-CFATTACH_DECL(cir, sizeof(struct cir_softc),
+CFATTACH_DECL_NEW(cir, sizeof(struct cir_softc),
 cir_match, cir_attach, cir_detach, NULL);
 
 extern struct cfdriver cir_cd;
@@ -85,6 +85,8 @@
 	struct cir_softc *sc = device_private(self);
 	struct ir_attach_args *ia = aux;
 
+	sc-sc_dev = self;
+
 	selinit(sc-sc_rdsel);
 	sc-sc_methods = ia-ia_methods;
 	sc-sc_handle = ia-ia_handle;
@@ -93,7 +95,7 @@
 	if (sc-sc_methods-im_read == NULL ||
 	sc-sc_methods-im_write == NULL ||
 	sc-sc_methods-im_setparams == NULL)
-		panic(%s: missing methods, device_xname(sc-sc_dev));
+		panic(%s: missing methods, device_xname(sc-sc_dev));
 #endif
 	printf(\n);
 }
@@ -125,7 +127,7 @@
 	sc = device_lookup_private(cir_cd, CIRUNIT(dev));
 	if (sc == NULL)
 		return (ENXIO);
-	if (!device_is_active(sc-sc_dev))
+	if (!device_is_active(sc-sc_dev))
 		return (EIO);
 	if (sc-sc_open)
 		return (EBUSY);
@@ -167,7 +169,7 @@
 	sc = device_lookup_private(cir_cd, CIRUNIT(dev));
 	if (sc == NULL)
 		return (ENXIO);
-	if (!device_is_active(sc-sc_dev))
+	if (!device_is_active(sc-sc_dev))
 		return (EIO);
 	return (sc-sc_methods-im_read(sc-sc_handle, uio, flag));
 }
@@ -180,7 

CVS commit: src/usr.bin/tpfmt

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:21:28 UTC 2011

Modified Files:
src/usr.bin/tpfmt: tpfmt.c

Log Message:
remove a duplicated unknown option message.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/tpfmt/tpfmt.c

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

Modified files:

Index: src/usr.bin/tpfmt/tpfmt.c
diff -u src/usr.bin/tpfmt/tpfmt.c:1.3 src/usr.bin/tpfmt/tpfmt.c:1.4
--- src/usr.bin/tpfmt/tpfmt.c:1.3	Thu Apr 14 16:27:17 2011
+++ src/usr.bin/tpfmt/tpfmt.c	Tue Jul 26 12:21:27 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: tpfmt.c,v 1.3 2011/04/14 16:27:17 yamt Exp $	*/
+/*	$NetBSD: tpfmt.c,v 1.4 2011/07/26 12:21:27 yamt Exp $	*/
 
 /*-
- * Copyright (c) 2010 YAMAMOTO Takashi,
+ * Copyright (c) 2010,2011 YAMAMOTO Takashi,
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: tpfmt.c,v 1.3 2011/04/14 16:27:17 yamt Exp $);
+__RCSID($NetBSD: tpfmt.c,v 1.4 2011/07/26 12:21:27 yamt Exp $);
 #endif /* not lint */
 
 #include sys/rbtree.h
@@ -171,7 +171,7 @@
 			distinguish_processes = false;
 			break;
 		default:
-			errx(EXIT_FAILURE, unknown option %c, ch);
+			exit(EXIT_FAILURE);
 		}
 	}
 	argc -= optind;



CVS commit: src/usr.bin/tpfmt

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:24:16 UTC 2011

Modified Files:
src/usr.bin/tpfmt: tpfmt.c

Log Message:
add an option to put samples for each symbols together.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/tpfmt/tpfmt.c

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

Modified files:

Index: src/usr.bin/tpfmt/tpfmt.c
diff -u src/usr.bin/tpfmt/tpfmt.c:1.4 src/usr.bin/tpfmt/tpfmt.c:1.5
--- src/usr.bin/tpfmt/tpfmt.c:1.4	Tue Jul 26 12:21:27 2011
+++ src/usr.bin/tpfmt/tpfmt.c	Tue Jul 26 12:24:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpfmt.c,v 1.4 2011/07/26 12:21:27 yamt Exp $	*/
+/*	$NetBSD: tpfmt.c,v 1.5 2011/07/26 12:24:16 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2010,2011 YAMAMOTO Takashi,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: tpfmt.c,v 1.4 2011/07/26 12:21:27 yamt Exp $);
+__RCSID($NetBSD: tpfmt.c,v 1.5 2011/07/26 12:24:16 yamt Exp $);
 #endif /* not lint */
 
 #include sys/rbtree.h
@@ -52,6 +52,7 @@
 
 static bool filter_by_pid;
 static pid_t target_pid;
+static bool per_symbol;
 
 struct addr {
 	struct rb_node node;
@@ -143,7 +144,7 @@
 	extern char *optarg;
 	extern int optind;
 
-	while ((ch = getopt(argc, argv, CkLPp:)) != -1) {
+	while ((ch = getopt(argc, argv, CkLPp:s)) != -1) {
 		uintmax_t val;
 		char *ep;
 
@@ -170,6 +171,9 @@
 		case 'P':	/* don't distinguish processes */
 			distinguish_processes = false;
 			break;
+		case 's':	/* per symbol */
+			per_symbol = true;
+			break;
 		default:
 			exit(EXIT_FAILURE);
 		}
@@ -224,6 +228,15 @@
 			a-cpuid = 0;
 		}
 		a-in_kernel = in_kernel;
+		if (per_symbol) {
+			const char *name;
+			uint64_t offset;
+
+			name = ksymlookup(a-addr, offset);
+			if (name != NULL) {
+a-addr -= offset;
+			}
+		}
 		a-nsamples = 1;
 		o = rb_tree_insert_node(addrtree, a);
 		if (o != a) {



CVS commit: src/external/cddl/osnet/dev/dtrace

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:26:33 UTC 2011

Modified Files:
src/external/cddl/osnet/dev/dtrace: dtrace_unload.c

Log Message:
fix a kmem_alloc/free size mismatch


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/dtrace/dtrace_unload.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/dtrace_unload.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_unload.c:1.4 src/external/cddl/osnet/dev/dtrace/dtrace_unload.c:1.5
--- src/external/cddl/osnet/dev/dtrace/dtrace_unload.c:1.4	Fri Apr 23 16:44:10 2010
+++ src/external/cddl/osnet/dev/dtrace/dtrace_unload.c	Tue Jul 26 12:26:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_unload.c,v 1.4 2010/04/23 16:44:10 ahoka Exp $	*/
+/*	$NetBSD: dtrace_unload.c,v 1.5 2011/07/26 12:26:33 yamt Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -92,7 +92,8 @@
 	vmem_destroy(dtrace_arena);
 
 	if (dtrace_toxrange != NULL) {
-		kmem_free(dtrace_toxrange, sizeof (dtrace_toxrange_t *));
+		kmem_free(dtrace_toxrange,
+		dtrace_toxranges_max * sizeof (dtrace_toxrange_t));
 		dtrace_toxrange = NULL;
 		dtrace_toxranges = 0;
 		dtrace_toxranges_max = 0;



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:28:02 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c

Log Message:
remove a debug printf


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.5 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.6
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.5	Mon Mar  1 11:19:40 2010
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c	Tue Jul 26 12:28:01 2011
@@ -859,8 +859,6 @@
 	char machine[64];
 	size_t len;
 
-	printf(dt_module_update: %s\n, name);	/* XXX debug */
-
 	if (strcmp(netbsd,name) == 0) {
 		/* want the kernel */
 		strncpy(fname, /netbsd, sizeof(fname));



CVS commit: src/external/cddl/osnet/dist/uts/common/dtrace

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:33:23 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c

Log Message:
fix a merge botch in rev.1.7


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.14 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.15
--- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.14	Mon Jul 18 02:47:52 2011
+++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c	Tue Jul 26 12:33:23 2011
@@ -355,7 +355,7 @@
 #else
 	(void (*)(void *, dtrace_modctl_t *))dtrace_nullop,
 #endif
-	(int (*)(void *, dtrace_id_t, void *))dtrace_nullop,
+	(int (*)(void *, dtrace_id_t, void *))dtrace_enable_nullop,
 	(void (*)(void *, dtrace_id_t, void *))dtrace_nullop,
 	(void (*)(void *, dtrace_id_t, void *))dtrace_nullop,
 	(void (*)(void *, dtrace_id_t, void *))dtrace_nullop,



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:55:35 UTC 2011

Modified Files:
src/sys/arch/amd64/include: param.h

Log Message:
g/c round_pdr


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/include/param.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/amd64/include/param.h
diff -u src/sys/arch/amd64/include/param.h:1.13 src/sys/arch/amd64/include/param.h:1.14
--- src/sys/arch/amd64/include/param.h:1.13	Mon Feb  8 19:02:26 2010
+++ src/sys/arch/amd64/include/param.h	Tue Jul 26 12:55:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.13 2010/02/08 19:02:26 joerg Exp $	*/
+/*	$NetBSD: param.h,v 1.14 2011/07/26 12:55:35 yamt Exp $	*/
 
 #ifdef __x86_64__
 
@@ -118,7 +118,6 @@
 
 #define btop(x)x86_btop(x)
 #define ptob(x)x86_ptob(x)
-#define round_pdr(x)			x86_round_pdr(x)
 
 #define mstohz(ms) ((ms + 0UL) * hz / 1000)
 



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:56:39 UTC 2011

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

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/sys/arch/i386/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/i386/include/cpu.h
diff -u src/sys/arch/i386/include/cpu.h:1.176 src/sys/arch/i386/include/cpu.h:1.177
--- src/sys/arch/i386/include/cpu.h:1.176	Mon Dec 29 19:59:09 2008
+++ src/sys/arch/i386/include/cpu.h	Tue Jul 26 12:56:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.176 2008/12/29 19:59:09 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.177 2011/07/26 12:56:39 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -68,6 +68,7 @@
 	(*(struct cpu_info * const *)offsetof(struct cpu_info, ci_curlwp)));
 	return l;
 }
+
 __inline static void __unused
 cpu_set_curpri(int pri)
 {



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:57:35 UTC 2011

Modified Files:
src/sys/arch/i386/include: frameasm.h

Log Message:
comment


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/include/frameasm.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/i386/include/frameasm.h
diff -u src/sys/arch/i386/include/frameasm.h:1.14 src/sys/arch/i386/include/frameasm.h:1.15
--- src/sys/arch/i386/include/frameasm.h:1.14	Mon Jul  7 13:01:16 2008
+++ src/sys/arch/i386/include/frameasm.h	Tue Jul 26 12:57:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: frameasm.h,v 1.14 2008/07/07 13:01:16 gmcgarry Exp $	*/
+/*	$NetBSD: frameasm.h,v 1.15 2011/07/26 12:57:35 yamt Exp $	*/
 
 #ifndef _I386_FRAMEASM_H_
 #define _I386_FRAMEASM_H_
@@ -139,7 +139,7 @@
 	movl	%esp, %eax; \
 	jne	999f; \
 	movl	CPUVAR(INTRSTACK), %esp; \
-999:	pushl	%eax; \
+999:	pushl	%eax; /* eax == pointer to intrframe */ \
 
 /*
  * IDEPTH_DECR:



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:59:41 UTC 2011

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
- add PCID
- comment


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.51 src/sys/arch/x86/include/specialreg.h:1.52
--- src/sys/arch/x86/include/specialreg.h:1.51	Sun Feb 20 21:09:32 2011
+++ src/sys/arch/x86/include/specialreg.h	Tue Jul 26 12:59:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.51 2011/02/20 21:09:32 jruoho Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.52 2011/07/26 12:59:41 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -277,6 +277,7 @@
 #define	CPUID2_CX16	0x2000	/* has CMPXCHG16B instruction */
 #define	CPUID2_xTPR	0x4000	/* Task Priority Messages disabled? */
 #define	CPUID2_PDCM	0x8000	/* Perf/Debug Capability MSR */
+#define	CPUID2_PCID	0x0002	/* Process Context ID */
 #define	CPUID2_DCA	0x0004	/* Direct Cache Access */
 #define	CPUID2_SSE41	0x0008	/* Streaming SIMD Extensions 4.1 */
 #define	CPUID2_SSE42	0x0010	/* Streaming SIMD Extensions 4.2 */
@@ -290,10 +291,10 @@
 #define	CPUID2_RAZ	0x8000	/* RAZ. Indicates guest state. */
 
 #define CPUID2_FLAGS1	\20\1SSE3\2PCLMULQDQ\3DTES64\4MONITOR\5DS-CPL\6VMX\7SMX \
-			\10EST\11TM2\12SSSE3\13CID\14B11\15B12\16CX16 \
-			\17xTPR\20PDCM\21B16\22B17\23DCA\24SSE41\25SSE42 \
-			\26X2APIC\27MOVBE\30POPCNT\31B24\32AES\33XSAVE \
-			\34OSXSAVE\35AVX\36F16C\37B30\40RAZ
+			\10EST\11TM2\12SSSE3\13CID\14B11\15B12\16CX16 \
+			\17xTPR\20PDCM\21B16\22PCID\23DCA\24SSE41\25SSE42 \
+			\26X2APIC\27MOVBE\30POPCNT\31B24\32AES\33XSAVE \
+			\34OSXSAVE\35AVX\36F16C\37B30\40RAZ
 
 #define CPUID2FAMILY(cpuid)	(((cpuid)  8)  0xf)
 #define CPUID2MODEL(cpuid)	(((cpuid)  4)  0xf)
@@ -413,6 +414,7 @@
 #define MSR_MC3_STATUS		0x411
 #define MSR_MC3_ADDR		0x412
 #define MSR_MC3_MISC		0x413
+/* 0x480 - 0x490 VMX */
 
 /*
  * VIA Nehemiah MSRs



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:03:58 UTC 2011

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
assertion


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/kern/kern_lwp.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/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.159 src/sys/kern/kern_lwp.c:1.160
--- src/sys/kern/kern_lwp.c:1.159	Mon Jun 13 21:32:42 2011
+++ src/sys/kern/kern_lwp.c	Tue Jul 26 13:03:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.159 2011/06/13 21:32:42 matt Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.160 2011/07/26 13:03:57 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.159 2011/06/13 21:32:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.160 2011/07/26 13:03:57 yamt Exp $);
 
 #include opt_ddb.h
 #include opt_lockdebug.h
@@ -1040,6 +1040,7 @@
 	ksiginfoq_t kq;
 
 	KASSERT(l != curlwp);
+	KASSERT(last || mutex_owned(p-p_lock));
 
 	/*
 	 * If this was not the last LWP in the process, then adjust



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:04:51 UTC 2011

Modified Files:
src/sys/kern: kern_sleepq.c

Log Message:
sleepq_insert: call lwp_eprio only when necessary


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_sleepq.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/kern/kern_sleepq.c
diff -u src/sys/kern/kern_sleepq.c:1.39 src/sys/kern/kern_sleepq.c:1.40
--- src/sys/kern/kern_sleepq.c:1.39	Fri May 13 22:19:41 2011
+++ src/sys/kern/kern_sleepq.c	Tue Jul 26 13:04:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sleepq.c,v 1.39 2011/05/13 22:19:41 rmind Exp $	*/
+/*	$NetBSD: kern_sleepq.c,v 1.40 2011/07/26 13:04:51 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sleepq.c,v 1.39 2011/05/13 22:19:41 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sleepq.c,v 1.40 2011/07/26 13:04:51 yamt Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -166,10 +166,11 @@
 void
 sleepq_insert(sleepq_t *sq, lwp_t *l, syncobj_t *sobj)
 {
-	lwp_t *l2;
-	const int pri = lwp_eprio(l);
 
 	if ((sobj-sobj_flag  SOBJ_SLEEPQ_SORTED) != 0) {
+		lwp_t *l2;
+		const int pri = lwp_eprio(l);
+
 		TAILQ_FOREACH(l2, sq, l_sleepchain) {
 			if (lwp_eprio(l2)  pri) {
 TAILQ_INSERT_BEFORE(l2, l, l_sleepchain);



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:07:20 UTC 2011

Modified Files:
src/sys/kern: subr_lockdebug.c

Log Message:
try to fill ld_locked/ld_unlocked for shared acquisition of lock


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/kern/subr_lockdebug.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/kern/subr_lockdebug.c
diff -u src/sys/kern/subr_lockdebug.c:1.44 src/sys/kern/subr_lockdebug.c:1.45
--- src/sys/kern/subr_lockdebug.c:1.44	Thu Apr 14 06:12:02 2011
+++ src/sys/kern/subr_lockdebug.c	Tue Jul 26 13:07:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_lockdebug.c,v 1.44 2011/04/14 06:12:02 matt Exp $	*/
+/*	$NetBSD: subr_lockdebug.c,v 1.45 2011/07/26 13:07:20 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_lockdebug.c,v 1.44 2011/04/14 06:12:02 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_lockdebug.c,v 1.45 2011/07/26 13:07:20 yamt Exp $);
 
 #include opt_ddb.h
 
@@ -493,6 +493,7 @@
 		}
 	} else if (shared) {
 		l-l_shlocks++;
+		ld-ld_locked = where;
 		ld-ld_shares++;
 		ld-ld_shwant--;
 	} else {
@@ -556,8 +557,10 @@
 		}
 		l-l_shlocks--;
 		ld-ld_shares--;
-		if (ld-ld_lwp == l)
+		if (ld-ld_lwp == l) {
+			ld-ld_unlocked = where;
 			ld-ld_lwp = NULL;
+		}
 		if (ld-ld_cpu == (uint16_t)cpu_index(curcpu()))
 			ld-ld_cpu = (uint16_t)-1;
 	} else {



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:09:11 UTC 2011

Modified Files:
src/sys/kern: subr_vmem.c

Log Message:
comments.  related to PR/44969


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/subr_vmem.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/kern/subr_vmem.c
diff -u src/sys/kern/subr_vmem.c:1.58 src/sys/kern/subr_vmem.c:1.59
--- src/sys/kern/subr_vmem.c:1.58	Fri Dec 17 22:24:11 2010
+++ src/sys/kern/subr_vmem.c	Tue Jul 26 13:09:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_vmem.c,v 1.58 2010/12/17 22:24:11 yamt Exp $	*/
+/*	$NetBSD: subr_vmem.c,v 1.59 2011/07/26 13:09:11 yamt Exp $	*/
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.58 2010/12/17 22:24:11 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.59 2011/07/26 13:09:11 yamt Exp $);
 
 #if defined(_KERNEL)
 #include opt_ddb.h
@@ -289,6 +289,15 @@
 	return vm-vm_freelist[idx];
 }
 
+/*
+ * bt_freehead_toalloc: return the freelist for the given size and allocation
+ * strategy.
+ *
+ * for VM_INSTANTFIT, return the list in which any blocks are large enough
+ * for the requested size.  otherwise, return the list which can have blocks
+ * large enough for the requested size.
+ */
+
 static struct vmem_freelist *
 bt_freehead_toalloc(vmem_t *vm, vmem_size_t size, vm_flag_t strat)
 {
@@ -702,6 +711,9 @@
 
 /*
  * vmem_fit: check if a bt can satisfy the given restrictions.
+ *
+ * it's a caller's responsibility to ensure the region is big enough
+ * before calling us.
  */
 
 static vmem_addr_t
@@ -711,7 +723,7 @@
 	vmem_addr_t start;
 	vmem_addr_t end;
 
-	KASSERT(bt-bt_size = size);
+	KASSERT(bt-bt_size = size); /* caller's responsibility */
 
 	/*
 	 * XXX assumption: vmem_addr_t and vmem_size_t are
@@ -912,6 +924,10 @@
 	if (align == 0) {
 		align = vm-vm_quantum_mask + 1;
 	}
+
+	/*
+	 * allocate boundary tags before acquiring the vmem lock.
+	 */
 	btnew = bt_alloc(vm, flags);
 	if (btnew == NULL) {
 		return VMEM_ADDR_NULL;
@@ -922,6 +938,9 @@
 		return VMEM_ADDR_NULL;
 	}
 
+	/*
+	 * choose a free block from which we allocate.
+	 */
 retry_strat:
 	first = bt_freehead_toalloc(vm, size, strat);
 	end = vm-vm_freelist[VMEM_MAXORDER];
@@ -930,6 +949,13 @@
 	VMEM_LOCK(vm);
 	vmem_check(vm);
 	if (strat == VM_INSTANTFIT) {
+		/*
+		 * just choose the first block which satisfies our restrictions.
+		 *
+		 * note that we don't need to check the size of the blocks
+		 * because any blocks found on these list should be larger than
+		 * the given size.
+		 */
 		for (list = first; list  end; list++) {
 			bt = LIST_FIRST(list);
 			if (bt != NULL) {
@@ -938,9 +964,27 @@
 if (start != VMEM_ADDR_NULL) {
 	goto gotit;
 }
+/*
+ * don't bother to follow the bt_freelist link
+ * here.  the list can be very long and we are
+ * told to run fast.  blocks from the later free
+ * lists are larger and have better chances to
+ * satisfy our restrictions.
+ */
 			}
 		}
 	} else { /* VM_BESTFIT */
+		/*
+		 * we assume that, for space efficiency, it's better to
+		 * allocate from a smaller block.  thus we will start searching
+		 * from the lower-order list than VM_INSTANTFIT.
+		 * however, don't bother to find the smallest block in a free
+		 * list because the list can be very long.  we can revisit it
+		 * if/when it turns out to be a problem.
+		 *
+		 * note that the 'first' list can contain blocks smaller than
+		 * the requested size.  thus we need to check bt_size.
+		 */
 		for (list = first; list  end; list++) {
 			LIST_FOREACH(bt, list, bt_freelist) {
 if (bt-bt_size = size) {



CVS commit: src/sys/miscfs/procfs

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:18:55 UTC 2011

Modified Files:
src/sys/miscfs/procfs: procfs_map.c

Log Message:
fix a botch in PRIxVADDR change (rev.1.38)


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/miscfs/procfs/procfs_map.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/miscfs/procfs/procfs_map.c
diff -u src/sys/miscfs/procfs/procfs_map.c:1.39 src/sys/miscfs/procfs/procfs_map.c:1.40
--- src/sys/miscfs/procfs/procfs_map.c:1.39	Wed Sep 15 21:37:35 2010
+++ src/sys/miscfs/procfs/procfs_map.c	Tue Jul 26 13:18:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_map.c,v 1.39 2010/09/15 21:37:35 jym Exp $	*/
+/*	$NetBSD: procfs_map.c,v 1.40 2011/07/26 13:18:55 yamt Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_map.c,v 1.39 2010/09/15 21:37:35 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_map.c,v 1.40 2011/07/26 13:18:55 yamt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -185,7 +185,7 @@
 			(unsigned long long)minor(dev), fileid, path);
 		} else {
 			pos += snprintf(buffer + pos, bufsize - pos,
-			%#PRIxVADDRx %#PRIxVADDRx 
+			%#PRIxVADDR %#PRIxVADDR 
 			%c%c%c %c%c%c %s %s %d %d %d\n,
 			entry-start, entry-end,
 			(entry-protection  VM_PROT_READ) ? 'r' : '-',



CVS commit: src/usr.bin/vmstat

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:24:38 UTC 2011

Modified Files:
src/usr.bin/vmstat: vmstat.c

Log Message:
dopoolcache: don't print unused caches unless verbose


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/usr.bin/vmstat/vmstat.c

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

Modified files:

Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.181 src/usr.bin/vmstat/vmstat.c:1.182
--- src/usr.bin/vmstat/vmstat.c:1.181	Tue May 17 04:18:07 2011
+++ src/usr.bin/vmstat/vmstat.c	Tue Jul 26 13:24:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.181 2011/05/17 04:18:07 mrg Exp $ */
+/* $NetBSD: vmstat.c,v 1.182 2011/07/26 13:24:38 yamt Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
 #if 0
 static char sccsid[] = @(#)vmstat.c	8.2 (Berkeley) 3/1/95;
 #else
-__RCSID($NetBSD: vmstat.c,v 1.181 2011/05/17 04:18:07 mrg Exp $);
+__RCSID($NetBSD: vmstat.c,v 1.182 2011/07/26 13:24:38 yamt Exp $);
 #endif
 #endif /* not lint */
 
@@ -304,7 +304,7 @@
 void	dointr(int verbose);
 void	domem(void);
 void	dopool(int, int);
-void	dopoolcache(void);
+void	dopoolcache(int);
 void	dosum(void);
 void	dovmstat(struct timespec *, int);
 void	print_total_hdr(void);
@@ -498,7 +498,7 @@
 (void)putchar('\n');
 			}
 			if (todo  POOLCACHESTAT) {
-dopoolcache();
+dopoolcache(verbose);
 (void)putchar('\n');
 			}
 			if (todo  SUMSTAT) {
@@ -1456,7 +1456,7 @@
 }
 
 void
-dopoolcache(void)
+dopoolcache(int verbose)
 {
 	struct pool_cache pool_cache, *pc = pool_cache;
 	pool_cache_cpu_t cache_cpu, *cc = cache_cpu;
@@ -1480,6 +1480,8 @@
 		deref_kptr(pp-pr_wchan, name, sizeof(name),
 		pool wait channel trashed);
 		deref_kptr(pp-pr_cache, pc, sizeof(*pc), pool cache trashed);
+		if (pc-pc_misses == 0  !verbose)
+			continue;
 		name[sizeof(name)-1] = '\0';
 
 		cpuhit = 0;



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:33:43 UTC 2011

Modified Files:
src/sys/kern: kern_sig.c

Log Message:
sigpost: don't interfere coredump.  PR/45032


To generate a diff of this commit:
cvs rdiff -u -r1.308 -r1.309 src/sys/kern/kern_sig.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/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.308 src/sys/kern/kern_sig.c:1.309
--- src/sys/kern/kern_sig.c:1.308	Wed Apr 27 00:38:37 2011
+++ src/sys/kern/kern_sig.c	Tue Jul 26 13:33:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.308 2011/04/27 00:38:37 rmind Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.309 2011/07/26 13:33:43 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sig.c,v 1.308 2011/04/27 00:38:37 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sig.c,v 1.309 2011/07/26 13:33:43 yamt Exp $);
 
 #include opt_ptrace.h
 #include opt_compat_sunos.h
@@ -1175,7 +1175,7 @@
 		break;
 
 	case LSSUSPENDED:
-		if ((prop  SA_KILL) != 0) {
+		if ((prop  SA_KILL) != 0  (l-l_flag  LW_WCORE) != 0) {
 			/* lwp_continue() will release the lock. */
 			lwp_continue(l);
 			return 1;



CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jul 26 14:59:03 UTC 2011

Modified Files:
src/sys/arch/alpha/alpha: autoconf.c

Log Message:
Make atoi func static, and constify


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/alpha/autoconf.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/alpha/alpha/autoconf.c
diff -u src/sys/arch/alpha/alpha/autoconf.c:1.48 src/sys/arch/alpha/alpha/autoconf.c:1.49
--- src/sys/arch/alpha/alpha/autoconf.c:1.48	Tue Jun 14 15:34:21 2011
+++ src/sys/arch/alpha/alpha/autoconf.c	Tue Jul 26 14:59:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.48 2011/06/14 15:34:21 matt Exp $ */
+/* $NetBSD: autoconf.c,v 1.49 2011/07/26 14:59:03 njoly Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.48 2011/06/14 15:34:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.49 2011/07/26 14:59:03 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -63,7 +63,7 @@
 struct bootdev_data	*bootdev_data;
 
 void	parse_prom_bootdev(void);
-int	atoi(char *);
+static int atoi(const char *);
 
 /*
  * cpu_configure:
@@ -163,8 +163,8 @@
 	bootdev_data = bd;
 }
 
-int
-atoi(char *s)
+static int
+atoi(const char *s)
 {
 	int n, neg;
 



CVS commit: src

2011-07-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 26 16:10:16 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/include: math.h
src/lib/libm: Makefile shlib_version
src/lib/libm/src: namespace.h s_scalbn.c
Added Files:
src/lib/libm/src: s_scalbnl.c

Log Message:
Add scalbnl to libm.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.131 -r1.132 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.125 -r1.126 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.594 -r1.595 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.46 -r1.47 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.127 -r1.128 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.113 -r1.114 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.183 -r1.184 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.54 -r1.55 src/include/math.h
cvs rdiff -u -r1.111 -r1.112 src/lib/libm/Makefile
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/shlib_version
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/namespace.h
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/s_scalbn.c
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/s_scalbnl.c

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/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.61 src/distrib/sets/lists/base/ad.mips64eb:1.62
--- src/distrib/sets/lists/base/ad.mips64eb:1.61	Mon Jul 25 03:09:51 2011
+++ src/distrib/sets/lists/base/ad.mips64eb	Tue Jul 26 16:10:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.61 2011/07/25 03:09:51 christos Exp $
+# $NetBSD: ad.mips64eb,v 1.62 2011/07/26 16:10:15 joerg Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -154,7 +154,7 @@
 ./usr/lib/64/liblzma.so.1			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzma.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libm.so.0base-compat-shlib	compat,pic
-./usr/lib/64/libm.so.0.9			base-compat-shlib	compat,pic
+./usr/lib/64/libm.so.0.10			base-compat-shlib	compat,pic
 ./usr/lib/64/libmagic.so.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libmagic.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libmenu.so.6			base-compat-shlib	compat,pic
@@ -438,7 +438,7 @@
 ./usr/lib/o32/liblzma.so.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/liblzma.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libm.so.0base-compat-shlib	compat,pic
-./usr/lib/o32/libm.so.0.9			base-compat-shlib	compat,pic
+./usr/lib/o32/libm.so.0.10			base-compat-shlib	compat,pic
 ./usr/lib/o32/libmagic.so.3			base-compat-shlib	compat,pic
 ./usr/lib/o32/libmagic.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libmenu.so.6			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.58 src/distrib/sets/lists/base/ad.mips64el:1.59
--- src/distrib/sets/lists/base/ad.mips64el:1.58	Mon Jul 25 03:09:51 2011
+++ src/distrib/sets/lists/base/ad.mips64el	Tue Jul 26 16:10:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.58 2011/07/25 03:09:51 christos Exp $
+# $NetBSD: ad.mips64el,v 1.59 2011/07/26 16:10:15 joerg Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -154,7 +154,7 @@
 ./usr/lib/64/liblzma.so.1			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzma.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libm.so.0base-compat-shlib	compat,pic
-./usr/lib/64/libm.so.0.9			base-compat-shlib	compat,pic
+./usr/lib/64/libm.so.0.10			base-compat-shlib	compat,pic
 ./usr/lib/64/libmagic.so.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libmagic.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libmenu.so.6			base-compat-shlib	compat,pic
@@ -438,7 +438,7 @@
 ./usr/lib/o32/liblzma.so.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/liblzma.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libm.so.0base-compat-shlib	compat,pic
-./usr/lib/o32/libm.so.0.9			base-compat-shlib	compat,pic
+./usr/lib/o32/libm.so.0.10			base-compat-shlib	compat,pic
 ./usr/lib/o32/libmagic.so.3			base-compat-shlib	compat,pic
 ./usr/lib/o32/libmagic.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libmenu.so.6			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.131 src/distrib/sets/lists/base/md.amd64:1.132
--- src/distrib/sets/lists/base/md.amd64:1.131	Mon Jul 25 03:09:51 2011
+++ 

CVS commit: src/sys/arch

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 16:24:44 UTC 2011

Modified Files:
src/sys/arch/landisk/conf: std.landisk
src/sys/arch/mmeye/conf: files.mmeye
src/sys/arch/sh3/conf: files.sh3

Log Message:
Build sh3/sh3/sh3_bus_space.c only for mmeye.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/conf/std.landisk
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mmeye/conf/files.mmeye
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sh3/conf/files.sh3

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/landisk/conf/std.landisk
diff -u src/sys/arch/landisk/conf/std.landisk:1.4 src/sys/arch/landisk/conf/std.landisk:1.5
--- src/sys/arch/landisk/conf/std.landisk:1.4	Mon Jul 25 21:12:23 2011
+++ src/sys/arch/landisk/conf/std.landisk	Tue Jul 26 16:24:43 2011
@@ -1,4 +1,4 @@
-# $NetBSD: std.landisk,v 1.4 2011/07/25 21:12:23 dyoung Exp $
+# $NetBSD: std.landisk,v 1.5 2011/07/26 16:24:43 dyoung Exp $
 #
 # standard, required NetBSD/landisk 'options'
 
@@ -15,6 +15,4 @@
 options 	IOM_RAM_BEGIN=0x0c00
 options 	IOM_RAM_SIZE=0x0400 # 64MB
 
-options		LANDISK
-
 makeoptions	DEFTEXTADDR=0x8c001000

Index: src/sys/arch/mmeye/conf/files.mmeye
diff -u src/sys/arch/mmeye/conf/files.mmeye:1.15 src/sys/arch/mmeye/conf/files.mmeye:1.16
--- src/sys/arch/mmeye/conf/files.mmeye:1.15	Tue Mar 22 05:39:31 2011
+++ src/sys/arch/mmeye/conf/files.mmeye	Tue Jul 26 16:24:44 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.mmeye,v 1.15 2011/03/22 05:39:31 kiyohara Exp $
+#	$NetBSD: files.mmeye,v 1.16 2011/07/26 16:24:44 dyoung Exp $
 #
 # config file for mmeye
 
@@ -12,6 +12,7 @@
 file	arch/mmeye/mmeye/autoconf.c
 file	arch/mmeye/mmeye/clock_machdep.c
 file	arch/sh3/sh3/disksubr.c			disk
+file	arch/sh3/sh3/sh3_bus_space.c
 
 defparam opt_mmeye.h	MMEYE_NEW_INT
 defflag opt_mmeye.h	MMEYE_EPC_WDT

Index: src/sys/arch/sh3/conf/files.sh3
diff -u src/sys/arch/sh3/conf/files.sh3:1.45 src/sys/arch/sh3/conf/files.sh3:1.46
--- src/sys/arch/sh3/conf/files.sh3:1.45	Mon Jul 25 21:12:23 2011
+++ src/sys/arch/sh3/conf/files.sh3	Tue Jul 26 16:24:44 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sh3,v 1.45 2011/07/25 21:12:23 dyoung Exp $
+#	$NetBSD: files.sh3,v 1.46 2011/07/26 16:24:44 dyoung Exp $
 #
 
 defflag	opt_cputype.h		SH3 SH4
@@ -14,8 +14,6 @@
 defflag opt_cache.h		SH4_CACHE_WB_P1
 defflag opt_cache.h		SH4_CACHE_WB_U0_P0_P3
 
-defflag opt_landisk.h		LANDISK
-
 file	arch/sh3/sh3/cache.c
 file	arch/sh3/sh3/cache_sh3.c		sh3
 file	arch/sh3/sh3/cache_sh4.c		sh4
@@ -44,7 +42,6 @@
 file	arch/sh3/sh3/process_machdep.c
 file	arch/sh3/sh3/procfs_machdep.c		procfs
 file	arch/sh3/sh3/sh3_machdep.c
-file	arch/sh3/sh3/sh3_bus_space.c		!landisk
 file	arch/sh3/sh3/sys_machdep.c
 file	arch/sh3/sh3/syscall.c
 file	arch/sh3/sh3/vm_machdep.c



CVS commit: src/lib/libm/arch/i387

2011-07-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 26 17:03:23 UTC 2011

Added Files:
src/lib/libm/arch/i387: s_scalbnl.S

Log Message:
Add optimised version of scalbnl for x86.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/i387/s_scalbnl.S

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

Added files:

Index: src/lib/libm/arch/i387/s_scalbnl.S
diff -u /dev/null src/lib/libm/arch/i387/s_scalbnl.S:1.1
--- /dev/null	Tue Jul 26 17:03:23 2011
+++ src/lib/libm/arch/i387/s_scalbnl.S	Tue Jul 26 17:03:23 2011
@@ -0,0 +1,27 @@
+/*
+ * Written by J.T. Conklin j...@netbsd.org.
+ * Public domain.
+ */
+
+#include machine/asm.h
+
+RCSID($NetBSD: s_scalbnl.S,v 1.1 2011/07/26 17:03:23 joerg Exp $)
+
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(scalbnl,_scalbnl)
+#endif
+
+ENTRY(_scalbnl)
+#ifdef __x86_64__
+	movl	%edi,-4(%rsp)
+	fildl	-4(%rsp)
+	fldt	8(%rsp)
+	fscale
+	fstp	%st(1)
+#else
+	fildl 16(%esp)
+	fldt 4(%esp)
+	fscale
+	fstp %st(1)		/* clean up stack */
+#endif
+	ret



CVS commit: src/sys/dev

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 20:51:24 UTC 2011

Modified Files:
src/sys/dev/cardbus: if_ath_cardbus.c if_atw_cardbus.c if_rtw_cardbus.c
if_tlp_cardbus.c
src/sys/dev/pci: if_an_pci.c if_ath_pci.c if_atw_pci.c if_bwi_pci.c
if_en_pci.c if_ep_pci.c if_epic_pci.c if_esh_pci.c if_ex_pci.c
if_le_pci.c if_mtd_pci.c if_ne_pci.c if_ntwoc_pci.c if_ral_pci.c
if_rtw_pci.c if_tlp_pci.c if_wi_pci.c

Log Message:
Replace anonymous constants, 0x10, 0x14, ..., with PCI_BAR(0),
PCI_BAR(1),  There was no change in the generated assembly.  I used
this semantic patch:

@ mapsit @
identifier bar;
expression pact;
@@

(
pci_mapreg_map
|
Cardbus_mapreg_map
)(pact, bar, ...)

@ depends on mapsit @
identifier mapsit.bar;
@@
(
- #define bar 0x10
+ #define bar PCI_BAR(0)
|
- #define bar 0x14
+ #define bar PCI_BAR(1)
|
- #define bar 0x18
+ #define bar PCI_BAR(2)
|
- #define bar 0x1C
+ #define bar PCI_BAR(3)
|
- #define bar 0x20
+ #define bar PCI_BAR(4)
)


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/cardbus/if_ath_cardbus.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/cardbus/if_atw_cardbus.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/cardbus/if_rtw_cardbus.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/cardbus/if_tlp_cardbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_an_pci.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_ath_pci.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_atw_pci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_bwi_pci.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_en_pci.c \
src/sys/dev/pci/if_ne_pci.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_ep_pci.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_epic_pci.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/if_esh_pci.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_ex_pci.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/if_le_pci.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/if_mtd_pci.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_ntwoc_pci.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_ral_pci.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/if_rtw_pci.c
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/pci/if_tlp_pci.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_wi_pci.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/cardbus/if_ath_cardbus.c
diff -u src/sys/dev/cardbus/if_ath_cardbus.c:1.42 src/sys/dev/cardbus/if_ath_cardbus.c:1.43
--- src/sys/dev/cardbus/if_ath_cardbus.c:1.42	Thu Mar  4 22:34:37 2010
+++ src/sys/dev/cardbus/if_ath_cardbus.c	Tue Jul 26 20:51:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ath_cardbus.c,v 1.42 2010/03/04 22:34:37 dyoung Exp $ */
+/*	$NetBSD: if_ath_cardbus.c,v 1.43 2011/07/26 20:51:23 dyoung Exp $ */
 /*
  * Copyright (c) 2003
  *	Ichiro FUKUHARA ich...@ichiro.org.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ath_cardbus.c,v 1.42 2010/03/04 22:34:37 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ath_cardbus.c,v 1.43 2011/07/26 20:51:23 dyoung Exp $);
 
 #include opt_inet.h
 
@@ -81,7 +81,7 @@
 /*
  * PCI configuration space registers
  */
-#define	ATH_PCI_MMBA		0x10	/* memory mapped base */
+#define ATH_PCI_MMBA PCI_BAR(0)	/* memory mapped base */
 
 struct ath_cardbus_softc {
 	struct ath_softc	sc_ath;

Index: src/sys/dev/cardbus/if_atw_cardbus.c
diff -u src/sys/dev/cardbus/if_atw_cardbus.c:1.34 src/sys/dev/cardbus/if_atw_cardbus.c:1.35
--- src/sys/dev/cardbus/if_atw_cardbus.c:1.34	Thu Mar  4 22:34:37 2010
+++ src/sys/dev/cardbus/if_atw_cardbus.c	Tue Jul 26 20:51:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_atw_cardbus.c,v 1.34 2010/03/04 22:34:37 dyoung Exp $ */
+/* $NetBSD: if_atw_cardbus.c,v 1.35 2011/07/26 20:51:23 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_atw_cardbus.c,v 1.34 2010/03/04 22:34:37 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_atw_cardbus.c,v 1.35 2011/07/26 20:51:23 dyoung Exp $);
 
 #include opt_inet.h
 
@@ -85,8 +85,8 @@
 /*
  * PCI configuration space registers used by the ADM8211.
  */
-#define	ATW_PCI_IOBA		0x10	/* i/o mapped base */
-#define	ATW_PCI_MMBA		0x14	/* memory mapped base */
+#define ATW_PCI_IOBA PCI_BAR(0)	/* i/o mapped base */
+#define ATW_PCI_MMBA PCI_BAR(1)	/* memory mapped base */
 
 struct atw_cardbus_softc {
 	struct atw_softc sc_atw;

Index: src/sys/dev/cardbus/if_rtw_cardbus.c
diff -u src/sys/dev/cardbus/if_rtw_cardbus.c:1.40 src/sys/dev/cardbus/if_rtw_cardbus.c:1.41
--- src/sys/dev/cardbus/if_rtw_cardbus.c:1.40	Fri Mar  5 00:54:01 2010
+++ src/sys/dev/cardbus/if_rtw_cardbus.c	Tue Jul 26 20:51:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtw_cardbus.c,v 1.40 2010/03/05 00:54:01 dyoung Exp $ */
+/* $NetBSD: if_rtw_cardbus.c,v 1.41 2011/07/26 20:51:23 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2004, 2005 David Young.  All rights reserved.

CVS commit: src/lib/libedit

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 26 21:03:17 UTC 2011

Modified Files:
src/lib/libedit: el.c

Log Message:
don't stop reading after empty lines from: Nirbhay Choubey


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/lib/libedit/el.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/libedit/el.c
diff -u src/lib/libedit/el.c:1.62 src/lib/libedit/el.c:1.63
--- src/lib/libedit/el.c:1.62	Sun Mar 20 08:36:14 2011
+++ src/lib/libedit/el.c	Tue Jul 26 17:03:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $	*/
+/*	$NetBSD: el.c,v 1.63 2011/07/26 21:03:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)el.c	8.2 (Berkeley) 1/3/94;
 #else
-__RCSID($NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $);
+__RCSID($NetBSD: el.c,v 1.63 2011/07/26 21:03:17 christos Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -540,6 +540,8 @@
 		return (-1);
 
 	while ((ptr = fgetln(fp, len)) != NULL) {
+		if (*ptr == '\n')
+			continue;	/* Empty line. */
 		dptr = ct_decode_string(ptr, el-el_scratch);
 		if (!dptr)
 			continue;



CVS commit: src/sys/dev/ic

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:21:03 UTC 2011

Modified Files:
src/sys/dev/ic: i82365.c tcic2.c

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/ic/i82365.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/tcic2.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/ic/i82365.c
diff -u src/sys/dev/ic/i82365.c:1.113 src/sys/dev/ic/i82365.c:1.114
--- src/sys/dev/ic/i82365.c:1.113	Mon Apr 19 18:24:26 2010
+++ src/sys/dev/ic/i82365.c	Tue Jul 26 22:21:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: i82365.c,v 1.113 2010/04/19 18:24:26 dyoung Exp $	*/
+/*	$NetBSD: i82365.c,v 1.114 2011/07/26 22:21:02 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2004 Charles M. Hannum.  All rights reserved.
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i82365.c,v 1.113 2010/04/19 18:24:26 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: i82365.c,v 1.114 2011/07/26 22:21:02 dyoung Exp $);
 
 #define	PCICDEBUG
 
@@ -407,8 +407,6 @@
 	paa.paa_busname = pcmcia;
 	paa.pct = (pcmcia_chipset_tag_t) sc-pct;
 	paa.pch = (pcmcia_chipset_handle_t) h;
-	paa.iobase = sc-iobase;
-	paa.iosize = sc-iosize;
 
 	locs[PCMCIABUSCF_CONTROLLER] = h-chip;
 	locs[PCMCIABUSCF_SOCKET] = h-socket;

Index: src/sys/dev/ic/tcic2.c
diff -u src/sys/dev/ic/tcic2.c:1.35 src/sys/dev/ic/tcic2.c:1.36
--- src/sys/dev/ic/tcic2.c:1.35	Mon Apr 19 18:24:26 2010
+++ src/sys/dev/ic/tcic2.c	Tue Jul 26 22:21:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcic2.c,v 1.35 2010/04/19 18:24:26 dyoung Exp $	*/
+/*	$NetBSD: tcic2.c,v 1.36 2011/07/26 22:21:02 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 Christoph Badura.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcic2.c,v 1.35 2010/04/19 18:24:26 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcic2.c,v 1.36 2011/07/26 22:21:02 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -412,8 +412,6 @@
 	paa.paa_busname = pcmcia;
 	paa.pct = (pcmcia_chipset_tag_t) h-sc-pct;
 	paa.pch = (pcmcia_chipset_handle_t) h;
-	paa.iobase = h-sc-iobase;
-	paa.iosize = h-sc-iosize;
 
 	locs[PCMCIABUSCF_CONTROLLER] = 0;
 	locs[PCMCIABUSCF_SOCKET] = h-sock;



CVS commit: src/sys/dev/sbus

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:22:41 UTC 2011

Modified Files:
src/sys/dev/sbus: stp4020.c

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/sbus/stp4020.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/sbus/stp4020.c
diff -u src/sys/dev/sbus/stp4020.c:1.65 src/sys/dev/sbus/stp4020.c:1.66
--- src/sys/dev/sbus/stp4020.c:1.65	Mon Jul 18 00:58:52 2011
+++ src/sys/dev/sbus/stp4020.c	Tue Jul 26 22:22:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: stp4020.c,v 1.65 2011/07/18 00:58:52 mrg Exp $ */
+/*	$NetBSD: stp4020.c,v 1.66 2011/07/26 22:22:41 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: stp4020.c,v 1.65 2011/07/18 00:58:52 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: stp4020.c,v 1.66 2011/07/26 22:22:41 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -512,8 +512,6 @@
 	paa.paa_busname = pcmcia;
 	paa.pct = (pcmcia_chipset_tag_t)h-sc-sc_pct;
 	paa.pch = (pcmcia_chipset_handle_t)h;
-	paa.iobase = 0;
-	paa.iosize = STP4020_WINDOW_SIZE;
 
 	h-pcmcia = config_found(h-sc-sc_dev, paa, stp4020print);
 



CVS commit: src/sys/dev/pci

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:23:32 UTC 2011

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

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/dev/pci/pccbb.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/pccbb.c
diff -u src/sys/dev/pci/pccbb.c:1.201 src/sys/dev/pci/pccbb.c:1.202
--- src/sys/dev/pci/pccbb.c:1.201	Tue Jan  4 10:40:17 2011
+++ src/sys/dev/pci/pccbb.c	Tue Jul 26 22:23:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pccbb.c,v 1.201 2011/01/04 10:40:17 jruoho Exp $	*/
+/*	$NetBSD: pccbb.c,v 1.202 2011/07/26 22:23:32 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 and 2000
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pccbb.c,v 1.201 2011/01/04 10:40:17 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: pccbb.c,v 1.202 2011/07/26 22:23:32 dyoung Exp $);
 
 /*
 #define CBB_DEBUG
@@ -1000,12 +1000,8 @@
 	paa-paa_busname = pcmcia;
 	paa-pct = pccbb_pcmcia_funcs;
 	paa-pch = sc;
-	paa-iobase = 0;	   /* I don't use them */
-	paa-iosize = 0;
 #if rbus
 	rb = sc-sc_rbus_iot;
-	paa-iobase = rb-rb_start + rb-rb_offset;
-	paa-iosize = rb-rb_end - rb-rb_start;
 #endif
 
 	return;



CVS commit: src/sys/dev/pcmcia

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:24:36 UTC 2011

Modified Files:
src/sys/dev/pcmcia: pcmcia.c pcmciachip.h pcmciavar.h

Log Message:
Don't copy iobase and iosize members from pcmciabus_attach_args to the
pcmcia_softc because they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pcmcia/pcmcia.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pcmcia/pcmciachip.h
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pcmcia/pcmciavar.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/dev/pcmcia/pcmcia.c
diff -u src/sys/dev/pcmcia/pcmcia.c:1.93 src/sys/dev/pcmcia/pcmcia.c:1.94
--- src/sys/dev/pcmcia/pcmcia.c:1.93	Tue May 12 14:42:19 2009
+++ src/sys/dev/pcmcia/pcmcia.c	Tue Jul 26 22:24:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcmcia.c,v 1.93 2009/05/12 14:42:19 cegger Exp $	*/
+/*	$NetBSD: pcmcia.c,v 1.94 2011/07/26 22:24:36 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2004 Charles M. Hannum.  All rights reserved.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pcmcia.c,v 1.93 2009/05/12 14:42:19 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: pcmcia.c,v 1.94 2011/07/26 22:24:36 dyoung Exp $);
 
 #include opt_pcmciaverbose.h
 
@@ -133,8 +133,6 @@
 	sc-dev = self;
 	sc-pct = paa-pct;
 	sc-pch = paa-pch;
-	sc-iobase = paa-iobase;
-	sc-iosize = paa-iosize;
 
 	sc-ih = NULL;
 

Index: src/sys/dev/pcmcia/pcmciachip.h
diff -u src/sys/dev/pcmcia/pcmciachip.h:1.16 src/sys/dev/pcmcia/pcmciachip.h:1.17
--- src/sys/dev/pcmcia/pcmciachip.h:1.16	Tue May 12 14:42:19 2009
+++ src/sys/dev/pcmcia/pcmciachip.h	Tue Jul 26 22:24:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcmciachip.h,v 1.16 2009/05/12 14:42:19 cegger Exp $	*/
+/*	$NetBSD: pcmciachip.h,v 1.17 2011/07/26 22:24:36 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1997 Marc Horowitz.  All rights reserved.
@@ -143,8 +143,6 @@
 	const char *paa_busname;	/* Bus name */
 	pcmcia_chipset_tag_t pct;
 	pcmcia_chipset_handle_t pch;
-	bus_addr_t iobase;		/* start i/o space allocation here */
-	bus_size_t iosize;		/* size of the i/o space range */
 };
 
 /* interfaces for the chipset to call pcmcia */

Index: src/sys/dev/pcmcia/pcmciavar.h
diff -u src/sys/dev/pcmcia/pcmciavar.h:1.34 src/sys/dev/pcmcia/pcmciavar.h:1.35
--- src/sys/dev/pcmcia/pcmciavar.h:1.34	Tue May 12 14:42:19 2009
+++ src/sys/dev/pcmcia/pcmciavar.h	Tue Jul 26 22:24:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcmciavar.h,v 1.34 2009/05/12 14:42:19 cegger Exp $	*/
+/*	$NetBSD: pcmciavar.h,v 1.35 2011/07/26 22:24:36 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1997 Marc Horowitz.  All rights reserved.
@@ -197,14 +197,6 @@
 	void		*ih;
 	int		sc_enabled_count;	/* how many functions are
 		   enabled */
-
-	/*
-	 * These are passed down from the PCMCIA chip, and exist only
-	 * so that cards with Very Special address allocation needs
-	 * know what range they should be dealing with.
-	 */
-	bus_addr_t iobase;		/* start i/o space allocation here */
-	bus_size_t iosize;		/* size of the i/o space range */
 };
 
 struct pcmcia_cis_quirk {



CVS commit: [matt-nb5-pq3] src/etc

2011-07-26 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 26 22:50:15 UTC 2011

Modified Files:
src/etc [matt-nb5-pq3]: MAKEDEV.tmpl

Log Message:
Add flash


To generate a diff of this commit:
cvs rdiff -u -r1.113.2.7 -r1.113.2.7.4.1 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.113.2.7 src/etc/MAKEDEV.tmpl:1.113.2.7.4.1
--- src/etc/MAKEDEV.tmpl:1.113.2.7	Sat Sep 26 19:52:09 2009
+++ src/etc/MAKEDEV.tmpl	Tue Jul 26 22:50:15 2011
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.113.2.7 2009/09/26 19:52:09 snj Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.113.2.7.4.1 2011/07/26 22:50:15 matt Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1011,6 +1011,18 @@
 	%MKDISK% $name $unit $blk $chr
 	;;
 
+flash*)
+	unit=${i#flash}
+	flash=flash$unit
+	mkdev flash$unit b %flash_blk% $unit
+	mkdev rflash$unit c %flash_chr% $unit
+	;;
+
+altmem*)
+	name=altmem; unit=${i#altmem}; blk=%altmem_blk%; chr=%altmem_chr%
+	%MKDISK% $name $unit $blk $chr
+	;;
+
 bio)
 	mkdev bio c %bio_chr% 0
 	;;



CVS commit: src/sys/arch

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:52:49 UTC 2011

Modified Files:
src/sys/arch/amiga/dev: gayle_pcmcia.c
src/sys/arch/arm/at91: at91cf.c
src/sys/arch/arm/ep93xx: eppcic.c
src/sys/arch/arm/imx: imx_pcic.c
src/sys/arch/arm/sa11x0: sa11x1_pcic.c
src/sys/arch/arm/xscale: pxa2x0_pcic.c
src/sys/arch/evbarm/g42xxeb: gb225_pcic.c
src/sys/arch/evbsh3/ap_ms104_sh4: shpcmcia.c
src/sys/arch/hpcarm/dev: ipaq_pcic.c
src/sys/arch/hpcmips/dev: it8368.c plumpcmcia.c
src/sys/arch/hpcsh/dev/hd64461: hd64461pcmcia.c
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c
src/sys/arch/mips/alchemy/dev: aupcmcia.c
src/sys/arch/mmeye/dev: mmeyepcmcia.c
src/sys/arch/sparc/dev: ts102.c

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/dev/gayle_pcmcia.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/at91/at91cf.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ep93xx/eppcic.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/imx/imx_pcic.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/sa11x0/sa11x1_pcic.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/xscale/pxa2x0_pcic.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/g42xxeb/gb225_pcic.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbsh3/ap_ms104_sh4/shpcmcia.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hpcarm/dev/ipaq_pcic.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hpcmips/dev/it8368.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hpcmips/dev/plumpcmcia.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/alchemy/dev/aupcmcia.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mmeye/dev/mmeyepcmcia.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/dev/ts102.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/amiga/dev/gayle_pcmcia.c
diff -u src/sys/arch/amiga/dev/gayle_pcmcia.c:1.24 src/sys/arch/amiga/dev/gayle_pcmcia.c:1.25
--- src/sys/arch/amiga/dev/gayle_pcmcia.c:1.24	Thu Jan 13 22:02:05 2011
+++ src/sys/arch/amiga/dev/gayle_pcmcia.c	Tue Jul 26 22:52:47 2011
@@ -1,9 +1,9 @@
-/*	$NetBSD: gayle_pcmcia.c,v 1.24 2011/01/13 22:02:05 phx Exp $ */
+/*	$NetBSD: gayle_pcmcia.c,v 1.25 2011/07/26 22:52:47 dyoung Exp $ */
 
 /* public domain */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gayle_pcmcia.c,v 1.24 2011/01/13 22:02:05 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: gayle_pcmcia.c,v 1.25 2011/07/26 22:52:47 dyoung Exp $);
 
 /* PCMCIA front-end driver for A1200's and A600's. */
 
@@ -174,8 +174,6 @@
 	paa.paa_busname = pcmcia;
 	paa.pct = chip_functions;
 	paa.pch = self-devs[0];
-	paa.iobase = 0;
-	paa.iosize = 0;
 	self-devs[0].card =
 		config_found(myself, paa, simple_devprint);
 	if (self-devs[0].card == NULL) {

Index: src/sys/arch/arm/at91/at91cf.c
diff -u src/sys/arch/arm/at91/at91cf.c:1.3 src/sys/arch/arm/at91/at91cf.c:1.4
--- src/sys/arch/arm/at91/at91cf.c:1.3	Fri Jul  1 19:31:17 2011
+++ src/sys/arch/arm/at91/at91cf.c	Tue Jul 26 22:52:47 2011
@@ -1,5 +1,5 @@
-/*	$Id: at91cf.c,v 1.3 2011/07/01 19:31:17 dyoung Exp $	*/
-/*	$NetBSD: at91cf.c,v 1.3 2011/07/01 19:31:17 dyoung Exp $	*/
+/*	$Id: at91cf.c,v 1.4 2011/07/26 22:52:47 dyoung Exp $	*/
+/*	$NetBSD: at91cf.c,v 1.4 2011/07/26 22:52:47 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy. All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: at91cf.c,v 1.3 2011/07/01 19:31:17 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: at91cf.c,v 1.4 2011/07/26 22:52:47 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -228,8 +228,6 @@
 	paa.paa_busname = pcmcia;
 	paa.pct = (pcmcia_chipset_tag_t)at91cf_functions;
 	paa.pch = (pcmcia_chipset_handle_t)ph;
-	paa.iobase = ph-ph_space[IO].base;
-	paa.iosize = ph-ph_space[IO].size;
 	ph-ph_card = config_found_ia(sc-sc_dev, pcmciabus, paa,
   at91cf_print);
 

Index: src/sys/arch/arm/ep93xx/eppcic.c
diff -u src/sys/arch/arm/ep93xx/eppcic.c:1.5 src/sys/arch/arm/ep93xx/eppcic.c:1.6
--- src/sys/arch/arm/ep93xx/eppcic.c:1.5	Fri Jul  1 19:31:17 2011
+++ src/sys/arch/arm/ep93xx/eppcic.c	Tue Jul 26 22:52:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: eppcic.c,v 1.5 2011/07/01 19:31:17 dyoung Exp $	*/
+/*	$NetBSD: eppcic.c,v 1.6 2011/07/26 22:52:47 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2005 HAMAJIMA Katsuomi. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: eppcic.c,v 1.5 2011/07/01 19:31:17 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: eppcic.c,v 1.6 2011/07/26 22:52:47 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -244,8 +244,6 @@
 	paa.paa_busname = pcmcia;
 	paa.pct = 

CVS commit: src/lib/libedit/TEST

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 27 02:18:01 UTC 2011

Modified Files:
src/lib/libedit/TEST: wtc1.c

Log Message:
add history testing code.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libedit/TEST/wtc1.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/libedit/TEST/wtc1.c
diff -u src/lib/libedit/TEST/wtc1.c:1.2 src/lib/libedit/TEST/wtc1.c:1.3
--- src/lib/libedit/TEST/wtc1.c:1.2	Sun Apr 18 17:17:47 2010
+++ src/lib/libedit/TEST/wtc1.c	Tue Jul 26 22:18:00 2011
@@ -14,6 +14,7 @@
 
 static int continuation;
 volatile sig_atomic_t gotsig;
+static const char hfile[] = .whistory;
 
 static wchar_t *
 prompt(EditLine *el)
@@ -119,6 +120,7 @@
 
 	hist = history_winit();		/* Init built-in history */
 	history_w(hist, ev, H_SETSIZE, 100);	/* Remember 100 events	 */
+	history_w(hist, ev, H_LOAD, hfile);
 
 	tok = tok_winit(NULL);			/* Init the tokenizer	 */
 
@@ -260,6 +262,7 @@
 
 	el_end(el);
 	tok_wend(tok);
+	history_w(hist, ev, H_SAVE, hfile);
 	history_wend(hist);
 
 	fprintf(stdout, \n);



CVS commit: src/lib/libedit

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 27 02:18:30 UTC 2011

Modified Files:
src/lib/libedit: chartype.c

Log Message:
fix buffer growing code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libedit/chartype.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/libedit/chartype.c
diff -u src/lib/libedit/chartype.c:1.4 src/lib/libedit/chartype.c:1.5
--- src/lib/libedit/chartype.c:1.4	Wed Apr 14 20:55:57 2010
+++ src/lib/libedit/chartype.c	Tue Jul 26 22:18:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.c,v 1.4 2010/04/15 00:55:57 christos Exp $	*/
+/*	$NetBSD: chartype.c,v 1.5 2011/07/27 02:18:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 #include config.h
 #if !defined(lint)  !defined(SCCSID)
-__RCSID($NetBSD: chartype.c,v 1.4 2010/04/15 00:55:57 christos Exp $);
+__RCSID($NetBSD: chartype.c,v 1.5 2011/07/27 02:18:30 christos Exp $);
 #endif /* not lint  not SCCSID */
 #include el.h
 #include stdlib.h
@@ -89,27 +89,20 @@
 
 	dst = conv-cbuff;
 	while (*s) {
-		used = ct_encode_char(dst, (int)(conv-csize -
-		(dst - conv-cbuff)), *s);
-		if (used == -1) { /* failed to encode, need more buffer space */
+		used = conv-csize - (dst - conv-cbuff);
+		if (used  5) {
 			used = dst - conv-cbuff;
 			ct_conv_buff_resize(conv, conv-csize + CT_BUFSIZ, 0);
 			if (!conv-cbuff)
 return NULL;
 			dst = conv-cbuff + used;
-			/* don't increment s here - we want to retry it! */
 		}
-		else
-			++s;
+		used = ct_encode_char(dst, 5, *s);
+		if (used == -1) /* failed to encode, need more buffer space */
+			abort();
+		++s;
 		dst += used;
 	}
-	if (dst = (conv-cbuff + conv-csize)) {
-		used = dst - conv-cbuff;
-		ct_conv_buff_resize(conv, conv-csize + 1, 0);
-		if (!conv-cbuff)
-			return NULL;
-		dst = conv-cbuff + used;
-	}
 	*dst = '\0';
 	return conv-cbuff;
 }



CVS commit: src/lib/libedit

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 27 02:23:30 UTC 2011

Modified Files:
src/lib/libedit: history.c

Log Message:
- don't leave cursor dangling on memory failure or after clearing the list
- compute the string length to be strvis'ed after the string is encoded


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/history.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/libedit/history.c
diff -u src/lib/libedit/history.c:1.38 src/lib/libedit/history.c:1.39
--- src/lib/libedit/history.c:1.38	Sat Jan 15 22:05:51 2011
+++ src/lib/libedit/history.c	Tue Jul 26 22:23:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: history.c,v 1.38 2011/01/16 03:05:51 christos Exp $	*/
+/*	$NetBSD: history.c,v 1.39 2011/07/27 02:23:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)history.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: history.c,v 1.38 2011/01/16 03:05:51 christos Exp $);
+__RCSID($NetBSD: history.c,v 1.39 2011/07/27 02:23:29 christos Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -465,23 +465,25 @@
 private int
 history_def_insert(history_t *h, TYPE(HistEvent) *ev, const Char *str)
 {
+	hentry_t *c;
 
-	h-cursor = (hentry_t *) h_malloc(sizeof(hentry_t));
-	if (h-cursor == NULL)
+	c = h_malloc(sizeof(*c));
+	if (c == NULL)
 		goto oomem;
-	if ((h-cursor-ev.str = h_strdup(str)) == NULL) {
-		h_free((ptr_t)h-cursor);
+	if ((c-ev.str = h_strdup(str)) == NULL) {
+		h_free((ptr_t)c);
 		goto oomem;
 	}
-	h-cursor-data = NULL;
-	h-cursor-ev.num = ++h-eventid;
-	h-cursor-next = h-list.next;
-	h-cursor-prev = h-list;
-	h-list.next-prev = h-cursor;
-	h-list.next = h-cursor;
+	c-data = NULL;
+	c-ev.num = ++h-eventid;
+	c-next = h-list.next;
+	c-prev = h-list;
+	h-list.next-prev = c;
+	h-list.next = c;
 	h-cur++;
+	h-cursor = c;
 
-	*ev = h-cursor-ev;
+	*ev = c-ev;
 	return (0);
 oomem:
 	he_seterrev(ev, _HE_MALLOC_FAILED);
@@ -499,7 +501,7 @@
 
 	if ((h-flags  H_UNIQUE) != 0  h-list.next != h-list 
 	Strcmp(h-list.next-ev.str, str) == 0)
-	return (0); 
+	return (0);
 
 	if (history_def_insert(h, ev, str) == -1)
 		return (-1);	/* error, keep error message */
@@ -551,6 +553,7 @@
 
 	while (h-list.prev != h-list)
 		history_def_delete(h, ev, h-list.prev);
+	h-cursor = h-list;
 	h-eventid = 0;
 	h-cur = 0;
 }
@@ -794,7 +797,7 @@
 	TYPE(HistEvent) ev;
 	int i = -1, retval;
 	size_t len, max_size;
-	char *ptr;
+	char *ptr, *str;
 #ifdef WIDECHAR
 	static ct_buffer_t conv;
 #endif
@@ -812,7 +815,8 @@
 	for (i = 0, retval = HLAST(h, ev);
 	retval != -1;
 	retval = HPREV(h, ev), i++) {
-		len = Strlen(ev.str) * 4;
+		str = ct_encode_string(ev.str, conv);
+		len = strlen(str) * 4;
 		if (len = max_size) {
 			char *nptr;
 			max_size = (len + 1024)  ~1023;
@@ -823,7 +827,7 @@
 			}
 			ptr = nptr;
 		}
-		(void) strvis(ptr, ct_encode_string(ev.str, conv), VIS_WHITE);
+		(void) strvis(ptr, str, VIS_WHITE);
 		(void) fprintf(fp, %s\n, ptr);
 	}
 oomem:



CVS commit: src/crypto/external/bsd/heimdal

2011-07-26 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jul 27 03:18:52 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal: Makefile.rules.inc

Log Message:
Workaround around make bug by using an intermediate file/rule.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/heimdal/Makefile.rules.inc

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

Modified files:

Index: src/crypto/external/bsd/heimdal/Makefile.rules.inc
diff -u src/crypto/external/bsd/heimdal/Makefile.rules.inc:1.4 src/crypto/external/bsd/heimdal/Makefile.rules.inc:1.5
--- src/crypto/external/bsd/heimdal/Makefile.rules.inc:1.4	Sun May 15 15:10:12 2011
+++ src/crypto/external/bsd/heimdal/Makefile.rules.inc	Wed Jul 27 03:18:52 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rules.inc,v 1.4 2011/05/15 15:10:12 tsutsui Exp $
+# $NetBSD: Makefile.rules.inc,v 1.5 2011/07/27 03:18:52 matt Exp $
 
 SRCS+= ${HEIMSRCS:N*.et:N*.in:N*.asn1}
 
@@ -27,40 +27,43 @@
 	${src:.asn1=_asn1.h}		\
 	${src:.asn1=_asn1.hx}		\
 	${src:.asn1=_asn1-priv.h}	\
-	${src:.asn1=_asn1-priv.hx}
+	${src:.asn1=_asn1-priv.hx}	\
+	${src:.asn1=.ts}
 
 ASN1_INCS += ${src:.asn1=_asn1.h}
 
 DPSRCS +=	${src:.asn1=_asn1.h} ${src:.asn1=_asn1-priv.h}
-DPSRCS +=	${src:.asn1=_asn1.hx} ${src:.asn1=_asn1-priv.hx}
 OBJS +=		${ASN1_FILES.${src}:.x=.o}
 
+${ASN1_FILES.${src}} ${src:.asn1=_asn1.h} ${src:.asn1=_asn1-priv.h}: \
+	 ${src:.asn1=.ts}
+
 .if exists(${src:.asn1=.opt})
-${ASN1_FILES.${src}} ${src:.asn1=_asn1.hx} ${src:.asn1=_asn1-priv.hx}: ${src} \
-	${src:.asn1=.opt} ${TOOL_ASN1_COMPILE}
+${src:.asn1=.ts}: ${src} ${src:.asn1=.opt} ${TOOL_ASN1_COMPILE}
+	@touch $@
 	${TOOL_ASN1_COMPILE}			\
 		${ASN1_OPTS.${src}}		\
 		--option-file=${.ALLSRC:[2]}	\
 		${.ALLSRC:[1]} ${src:.asn1=_asn1}
-
+	@${TOOL_SED} -E 		\
+	-e 's,#include (.*)_asn1\.h,#include krb5/\1_asn1.h,'	\
+	2 /dev/null  ${src:.asn1=_asn1.hx}  ${src:.asn1=_asn1.h}
+	@cmp -s ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}	\
+	2 /dev/null ||		\
+	cp ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}
 .else
-${ASN1_FILES.${src}} ${src:.asn1=_asn1.hx} ${src:.asn1=_asn1-priv.hx}: ${src} \
-			${TOOL_ASN1_COMPILE}
+${src:.asn1=.ts}: ${src} ${TOOL_ASN1_COMPILE}
+	@touch $@
 	${TOOL_ASN1_COMPILE}			\
 		${ASN1_OPTS.${src}}		\
 		${.ALLSRC:[1]} ${src:.asn1=_asn1}
-
-.endif
-
-${src:.asn1=_asn1.h}: ${src:.asn1=_asn1.hx}
 	@${TOOL_SED} -E 		\
 	-e 's,#include (.*)_asn1\.h,#include krb5/\1_asn1.h,'	\
 	2 /dev/null  ${src:.asn1=_asn1.hx}  ${src:.asn1=_asn1.h}
-
-${src:.asn1=_asn1-priv.h}: ${src:.asn1=_asn1-priv.hx}
 	@cmp -s ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}	\
 	2 /dev/null ||		\
 	cp ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}
+.endif
 
 .for x2c in ${ASN1_FILES.${src}}
 ${x2c:.x=.c}: ${x2c}



CVS commit: src/tests/lib/libc/gen

2011-07-26 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Jul 27 05:04:11 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_getcwd.c

Log Message:
As per PR bin/45180, do not traverse too deep.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_getcwd.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/lib/libc/gen/t_getcwd.c
diff -u src/tests/lib/libc/gen/t_getcwd.c:1.2 src/tests/lib/libc/gen/t_getcwd.c:1.3
--- src/tests/lib/libc/gen/t_getcwd.c:1.2	Thu Jun 16 15:33:25 2011
+++ src/tests/lib/libc/gen/t_getcwd.c	Wed Jul 27 05:04:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_getcwd.c,v 1.2 2011/06/16 15:33:25 joerg Exp $ */
+/*	$NetBSD: t_getcwd.c,v 1.3 2011/07/27 05:04:11 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_getcwd.c,v 1.2 2011/06/16 15:33:25 joerg Exp $);
+__RCSID($NetBSD: t_getcwd.c,v 1.3 2011/07/27 05:04:11 jruoho Exp $);
 
 #include sys/param.h
 #include sys/stat.h
@@ -71,12 +71,17 @@
 ATF_TC_BODY(getcwd_fts, tc)
 {
 	const char *str = NULL;
-	const short depth = 3;
 	char buf[MAXPATHLEN];
 	char *argv[2];
 	FTSENT *ftse;
 	FTS *fts;
 	int ops;
+	short depth;
+
+	/*
+	 * Do not traverse too deep; cf. PR bin/45180.
+	 */
+	depth = 2;
 
 	argv[1] = NULL;
 	argv[0] = __UNCONST(/);



CVS commit: src/doc

2011-07-26 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Tue Jul 26 07:18:36 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
mention recent bind update, correct used bind version


To generate a diff of this commit:
cvs rdiff -u -r1.854 -r1.855 src/doc/3RDPARTY
cvs rdiff -u -r1.1582 -r1.1583 src/doc/CHANGES

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



CVS commit: src/sys/arch/macppc/dev

2011-07-26 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jul 26 08:36:02 UTC 2011

Modified Files:
src/sys/arch/macppc/dev: am79c950.c if_mc.c if_mcvar.h ki2c.c ki2cvar.h
mediabay.c obio.c smartbat.c

Log Message:
finish device_t-ification


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/macppc/dev/am79c950.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/macppc/dev/if_mc.c \
src/sys/arch/macppc/dev/mediabay.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/macppc/dev/if_mcvar.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/macppc/dev/ki2c.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/macppc/dev/ki2cvar.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/macppc/dev/obio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/dev/smartbat.c

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



CVS commit: src/sys/arch/macppc/dev

2011-07-26 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jul 26 08:37:45 UTC 2011

Modified Files:
src/sys/arch/macppc/dev: battery.c

Log Message:
finish device_t-ification


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/macppc/dev/battery.c

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



CVS commit: src/sys/arch/shark

2011-07-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul 26 08:56:27 UTC 2011

Modified Files:
src/sys/arch/shark/ofw: igsfb_ofbus.c ofrom.c
src/sys/arch/shark/shark: opms.c scr.c

Log Message:
convert to device_t, cfdata_t and CFATTACH_DECL_NEW.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/shark/ofw/igsfb_ofbus.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/shark/ofw/ofrom.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/shark/shark/opms.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/shark/shark/scr.c

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



CVS commit: src/usr.bin/tpfmt

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:21:28 UTC 2011

Modified Files:
src/usr.bin/tpfmt: tpfmt.c

Log Message:
remove a duplicated unknown option message.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/tpfmt/tpfmt.c

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



CVS commit: src/usr.bin/tpfmt

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:24:16 UTC 2011

Modified Files:
src/usr.bin/tpfmt: tpfmt.c

Log Message:
add an option to put samples for each symbols together.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/tpfmt/tpfmt.c

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



CVS commit: src/external/cddl/osnet/dev/dtrace

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:26:33 UTC 2011

Modified Files:
src/external/cddl/osnet/dev/dtrace: dtrace_unload.c

Log Message:
fix a kmem_alloc/free size mismatch


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/dtrace/dtrace_unload.c

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



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:28:02 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c

Log Message:
remove a debug printf


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c

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



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:28:39 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_options.c

Log Message:
remove debug printfs


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_options.c

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



CVS commit: src/external/cddl/osnet/dist/uts/common/dtrace

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:33:23 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c

Log Message:
fix a merge botch in rev.1.7


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c

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



CVS commit: src/external/cddl/osnet/dist/uts/common/dtrace

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:54:28 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c

Log Message:
mark this driver D_MPSAFE


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c

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



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:55:35 UTC 2011

Modified Files:
src/sys/arch/amd64/include: param.h

Log Message:
g/c round_pdr


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/include/param.h

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



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:56:39 UTC 2011

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

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/sys/arch/i386/include/cpu.h

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



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:57:35 UTC 2011

Modified Files:
src/sys/arch/i386/include: frameasm.h

Log Message:
comment


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/include/frameasm.h

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



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

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:59:41 UTC 2011

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
- add PCID
- comment


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:03:58 UTC 2011

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
assertion


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/kern/kern_lwp.c

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



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:04:51 UTC 2011

Modified Files:
src/sys/kern: kern_sleepq.c

Log Message:
sleepq_insert: call lwp_eprio only when necessary


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_sleepq.c

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



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:07:20 UTC 2011

Modified Files:
src/sys/kern: subr_lockdebug.c

Log Message:
try to fill ld_locked/ld_unlocked for shared acquisition of lock


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/kern/subr_lockdebug.c

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



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:09:11 UTC 2011

Modified Files:
src/sys/kern: subr_vmem.c

Log Message:
comments.  related to PR/44969


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/subr_vmem.c

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



CVS commit: src/sys

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:14:18 UTC 2011

Modified Files:
src/sys/kern: tty.c tty_pty.c
src/sys/sys: tty.h

Log Message:
stop using lbolt in tty


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/kern/tty.c
cvs rdiff -u -r1.128 -r1.129 src/sys/kern/tty_pty.c
cvs rdiff -u -r1.87 -r1.88 src/sys/sys/tty.h

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



CVS commit: src/sys/miscfs/procfs

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:18:55 UTC 2011

Modified Files:
src/sys/miscfs/procfs: procfs_map.c

Log Message:
fix a botch in PRIxVADDR change (rev.1.38)


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/miscfs/procfs/procfs_map.c

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



CVS commit: src/usr.bin/vmstat

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:24:38 UTC 2011

Modified Files:
src/usr.bin/vmstat: vmstat.c

Log Message:
dopoolcache: don't print unused caches unless verbose


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/usr.bin/vmstat/vmstat.c

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



CVS commit: src/sys/kern

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 13:33:43 UTC 2011

Modified Files:
src/sys/kern: kern_sig.c

Log Message:
sigpost: don't interfere coredump.  PR/45032


To generate a diff of this commit:
cvs rdiff -u -r1.308 -r1.309 src/sys/kern/kern_sig.c

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



CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jul 26 14:59:03 UTC 2011

Modified Files:
src/sys/arch/alpha/alpha: autoconf.c

Log Message:
Make atoi func static, and constify


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/alpha/autoconf.c

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



CVS commit: src

2011-07-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 26 16:10:16 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/include: math.h
src/lib/libm: Makefile shlib_version
src/lib/libm/src: namespace.h s_scalbn.c
Added Files:
src/lib/libm/src: s_scalbnl.c

Log Message:
Add scalbnl to libm.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.131 -r1.132 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.125 -r1.126 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.594 -r1.595 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.46 -r1.47 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.127 -r1.128 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.113 -r1.114 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.183 -r1.184 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.54 -r1.55 src/include/math.h
cvs rdiff -u -r1.111 -r1.112 src/lib/libm/Makefile
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/shlib_version
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/namespace.h
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/s_scalbn.c
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/s_scalbnl.c

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



CVS commit: src/sys/arch

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 16:24:44 UTC 2011

Modified Files:
src/sys/arch/landisk/conf: std.landisk
src/sys/arch/mmeye/conf: files.mmeye
src/sys/arch/sh3/conf: files.sh3

Log Message:
Build sh3/sh3/sh3_bus_space.c only for mmeye.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/conf/std.landisk
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mmeye/conf/files.mmeye
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sh3/conf/files.sh3

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



CVS commit: src/lib/libm/arch/i387

2011-07-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 26 17:03:23 UTC 2011

Added Files:
src/lib/libm/arch/i387: s_scalbnl.S

Log Message:
Add optimised version of scalbnl for x86.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/i387/s_scalbnl.S

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



CVS commit: src/sys/dev

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 20:51:24 UTC 2011

Modified Files:
src/sys/dev/cardbus: if_ath_cardbus.c if_atw_cardbus.c if_rtw_cardbus.c
if_tlp_cardbus.c
src/sys/dev/pci: if_an_pci.c if_ath_pci.c if_atw_pci.c if_bwi_pci.c
if_en_pci.c if_ep_pci.c if_epic_pci.c if_esh_pci.c if_ex_pci.c
if_le_pci.c if_mtd_pci.c if_ne_pci.c if_ntwoc_pci.c if_ral_pci.c
if_rtw_pci.c if_tlp_pci.c if_wi_pci.c

Log Message:
Replace anonymous constants, 0x10, 0x14, ..., with PCI_BAR(0),
PCI_BAR(1),  There was no change in the generated assembly.  I used
this semantic patch:

@ mapsit @
identifier bar;
expression pact;
@@

(
pci_mapreg_map
|
Cardbus_mapreg_map
)(pact, bar, ...)

@ depends on mapsit @
identifier mapsit.bar;
@@
(
- #define bar 0x10
+ #define bar PCI_BAR(0)
|
- #define bar 0x14
+ #define bar PCI_BAR(1)
|
- #define bar 0x18
+ #define bar PCI_BAR(2)
|
- #define bar 0x1C
+ #define bar PCI_BAR(3)
|
- #define bar 0x20
+ #define bar PCI_BAR(4)
)


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/cardbus/if_ath_cardbus.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/cardbus/if_atw_cardbus.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/cardbus/if_rtw_cardbus.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/cardbus/if_tlp_cardbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_an_pci.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_ath_pci.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_atw_pci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_bwi_pci.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_en_pci.c \
src/sys/dev/pci/if_ne_pci.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_ep_pci.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_epic_pci.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/if_esh_pci.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_ex_pci.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/if_le_pci.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/if_mtd_pci.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_ntwoc_pci.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_ral_pci.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/if_rtw_pci.c
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/pci/if_tlp_pci.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_wi_pci.c

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



CVS commit: src/lib/libedit

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 26 21:03:17 UTC 2011

Modified Files:
src/lib/libedit: el.c

Log Message:
don't stop reading after empty lines from: Nirbhay Choubey


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/lib/libedit/el.c

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



CVS commit: src/sys/dev/ic

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:21:03 UTC 2011

Modified Files:
src/sys/dev/ic: i82365.c tcic2.c

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/ic/i82365.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/tcic2.c

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



CVS commit: src/sys/dev/sbus

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:22:41 UTC 2011

Modified Files:
src/sys/dev/sbus: stp4020.c

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/sbus/stp4020.c

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



CVS commit: src/sys/dev/pci

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:23:32 UTC 2011

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

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/dev/pci/pccbb.c

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



CVS commit: src/sys/dev/pcmcia

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:24:36 UTC 2011

Modified Files:
src/sys/dev/pcmcia: pcmcia.c pcmciachip.h pcmciavar.h

Log Message:
Don't copy iobase and iosize members from pcmciabus_attach_args to the
pcmcia_softc because they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pcmcia/pcmcia.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pcmcia/pcmciachip.h
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pcmcia/pcmciavar.h

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



CVS commit: [matt-nb5-pq3] src/etc

2011-07-26 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 26 22:50:15 UTC 2011

Modified Files:
src/etc [matt-nb5-pq3]: MAKEDEV.tmpl

Log Message:
Add flash


To generate a diff of this commit:
cvs rdiff -u -r1.113.2.7 -r1.113.2.7.4.1 src/etc/MAKEDEV.tmpl

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



CVS commit: src/sys/arch

2011-07-26 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Jul 26 22:52:49 UTC 2011

Modified Files:
src/sys/arch/amiga/dev: gayle_pcmcia.c
src/sys/arch/arm/at91: at91cf.c
src/sys/arch/arm/ep93xx: eppcic.c
src/sys/arch/arm/imx: imx_pcic.c
src/sys/arch/arm/sa11x0: sa11x1_pcic.c
src/sys/arch/arm/xscale: pxa2x0_pcic.c
src/sys/arch/evbarm/g42xxeb: gb225_pcic.c
src/sys/arch/evbsh3/ap_ms104_sh4: shpcmcia.c
src/sys/arch/hpcarm/dev: ipaq_pcic.c
src/sys/arch/hpcmips/dev: it8368.c plumpcmcia.c
src/sys/arch/hpcsh/dev/hd64461: hd64461pcmcia.c
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c
src/sys/arch/mips/alchemy/dev: aupcmcia.c
src/sys/arch/mmeye/dev: mmeyepcmcia.c
src/sys/arch/sparc/dev: ts102.c

Log Message:
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/dev/gayle_pcmcia.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/at91/at91cf.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ep93xx/eppcic.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/imx/imx_pcic.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/sa11x0/sa11x1_pcic.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/xscale/pxa2x0_pcic.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/g42xxeb/gb225_pcic.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbsh3/ap_ms104_sh4/shpcmcia.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hpcarm/dev/ipaq_pcic.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hpcmips/dev/it8368.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hpcmips/dev/plumpcmcia.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/alchemy/dev/aupcmcia.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mmeye/dev/mmeyepcmcia.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/dev/ts102.c

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



CVS commit: src/lib/libedit/TEST

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 27 02:18:01 UTC 2011

Modified Files:
src/lib/libedit/TEST: wtc1.c

Log Message:
add history testing code.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libedit/TEST/wtc1.c

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



CVS commit: src/lib/libedit

2011-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 27 02:23:30 UTC 2011

Modified Files:
src/lib/libedit: history.c

Log Message:
- don't leave cursor dangling on memory failure or after clearing the list
- compute the string length to be strvis'ed after the string is encoded


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/history.c

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



CVS commit: src/crypto/external/bsd/heimdal

2011-07-26 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jul 27 03:18:52 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal: Makefile.rules.inc

Log Message:
Workaround around make bug by using an intermediate file/rule.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/heimdal/Makefile.rules.inc

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



CVS commit: src/tests/lib/libc/gen

2011-07-26 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Jul 27 05:04:11 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_getcwd.c

Log Message:
As per PR bin/45180, do not traverse too deep.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_getcwd.c

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