CVS commit: src/sys/dev/usb

2012-01-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 21 12:50:28 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add a bunch of Standard Microsystems devices.

>From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.605 -r1.606 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.605 src/sys/dev/usb/usbdevs:1.606
--- src/sys/dev/usb/usbdevs:1.605	Thu Jan 19 14:54:32 2012
+++ src/sys/dev/usb/usbdevs	Sat Jan 21 12:50:28 2012
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.605 2012/01/19 14:54:32 nonaka Exp $
+$NetBSD: usbdevs,v 1.606 2012/01/21 12:50:28 skrll Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2620,6 +2620,24 @@ product SMC 2202USB		0x0200	10/100 ether
 product SMC 2206USB		0x0201	EZ Connect USB Ethernet Adapter
 product SMC 2862WG		0xee13	EZ Connect g Wireless USB Adapter
 product SMC2 2020HUB		0x2020	USB Hub
+product SMC2 SMSC9500		0x9500	SMSC9500 Ethernet device
+product SMC2 SMSC9505		0x9505	SMSC9505 Ethernet device
+product SMC2 SMSC9500A		0x9e00	SMSC9500A Ethernet device
+product SMC2 SMSC9505A		0x9e01	SMSC9505A Ethernet device
+product SMC2 SMSC9512_14	0xec00	SMSC9512/9514 USB Hub & Ethernet device
+product SMC2 SMSC9500_SAL10	0x9900	SMSC9500 Ethernet device (SAL10)
+product SMC2 SMSC9505_SAL10	0x9901	SMSC9505 Ethernet device (SAL10)
+product SMC2 SMSC9500A_SAL10	0x9902	SMSC9500A Ethernet device (SAL10)
+product SMC2 SMSC9505A_SAL10	0x9903	SMSC9505A Ethernet device (SAL10)
+product SMC2 SMSC9512_14_SAL10	0x9904	SMSC9512/14 Hub & Ethernet Device (SAL10)
+product SMC2 SMSC9500A_HAL	0x9905	SMSC9500A Ethernet Device (HAL)
+product SMC2 SMSC9505A_HAL	0x9906	SMSC9505A Ethernet Device (HAL)
+product SMC2 SMSC9500_ALT	0x9907	SMSC9500 Ethernet Device
+product SMC2 SMSC9500A_ALT	0x9908	SMSC9500A Ethernet Device
+product SMC2 SMSC9512_14_ALT	0x9909	SMSC9512 Hub & Ethernet Device
+product SMC2 LAN9530		0x9530	LAN9530 Ethernet Device
+product SMC2 LAN9730		0x9730	LAN9730 Ethernet Device
+product SMC2 LAN89530		0x9e08	LAN89530
 product SMC3 2662WV1		0xa001	EZ Connect 11Mbps
 product SMC3 2662WUSB		0xa002	2662W-AR Wireless Adapter
 



CVS commit: src/sys/dev/usb

2012-01-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 21 12:53:04 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.598 -r1.599 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.599 -r1.600 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.598 src/sys/dev/usb/usbdevs.h:1.599
--- src/sys/dev/usb/usbdevs.h:1.598	Thu Jan 19 14:55:21 2012
+++ src/sys/dev/usb/usbdevs.h	Sat Jan 21 12:53:04 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.598 2012/01/19 14:55:21 nonaka Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.599 2012/01/21 12:53:04 skrll Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.605 2012/01/19 14:54:32 nonaka Exp
+ *	NetBSD: usbdevs,v 1.606 2012/01/21 12:50:28 skrll Exp
  */
 
 /*
@@ -2627,6 +2627,24 @@
 #define	USB_PRODUCT_SMC_2206USB	0x0201		/* EZ Connect USB Ethernet Adapter */
 #define	USB_PRODUCT_SMC_2862WG	0xee13		/* EZ Connect g Wireless USB Adapter */
 #define	USB_PRODUCT_SMC2_2020HUB	0x2020		/* USB Hub */
+#define	USB_PRODUCT_SMC2_SMSC9500	0x9500		/* SMSC9500 Ethernet device */
+#define	USB_PRODUCT_SMC2_SMSC9505	0x9505		/* SMSC9505 Ethernet device */
+#define	USB_PRODUCT_SMC2_SMSC9500A	0x9e00		/* SMSC9500A Ethernet device */
+#define	USB_PRODUCT_SMC2_SMSC9505A	0x9e01		/* SMSC9505A Ethernet device */
+#define	USB_PRODUCT_SMC2_SMSC9512_14	0xec00		/* SMSC9512/9514 USB Hub & Ethernet device */
+#define	USB_PRODUCT_SMC2_SMSC9500_SAL10	0x9900		/* SMSC9500 Ethernet device (SAL10) */
+#define	USB_PRODUCT_SMC2_SMSC9505_SAL10	0x9901		/* SMSC9505 Ethernet device (SAL10) */
+#define	USB_PRODUCT_SMC2_SMSC9500A_SAL10	0x9902		/* SMSC9500A Ethernet device (SAL10) */
+#define	USB_PRODUCT_SMC2_SMSC9505A_SAL10	0x9903		/* SMSC9505A Ethernet device (SAL10) */
+#define	USB_PRODUCT_SMC2_SMSC9512_14_SAL10	0x9904		/* SMSC9512/14 Hub & Ethernet Device (SAL10) */
+#define	USB_PRODUCT_SMC2_SMSC9500A_HAL	0x9905		/* SMSC9500A Ethernet Device (HAL) */
+#define	USB_PRODUCT_SMC2_SMSC9505A_HAL	0x9906		/* SMSC9505A Ethernet Device (HAL) */
+#define	USB_PRODUCT_SMC2_SMSC9500_ALT	0x9907		/* SMSC9500 Ethernet Device */
+#define	USB_PRODUCT_SMC2_SMSC9500A_ALT	0x9908		/* SMSC9500A Ethernet Device */
+#define	USB_PRODUCT_SMC2_SMSC9512_14_ALT	0x9909		/* SMSC9512 Hub & Ethernet Device */
+#define	USB_PRODUCT_SMC2_LAN9530	0x9530		/* LAN9530 Ethernet Device */
+#define	USB_PRODUCT_SMC2_LAN9730	0x9730		/* LAN9730 Ethernet Device */
+#define	USB_PRODUCT_SMC2_LAN89530	0x9e08		/* LAN89530 */
 #define	USB_PRODUCT_SMC3_2662WV1	0xa001		/* EZ Connect 11Mbps */
 #define	USB_PRODUCT_SMC3_2662WUSB	0xa002		/* 2662W-AR Wireless Adapter */
 

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.599 src/sys/dev/usb/usbdevs_data.h:1.600
--- src/sys/dev/usb/usbdevs_data.h:1.599	Thu Jan 19 14:55:21 2012
+++ src/sys/dev/usb/usbdevs_data.h	Sat Jan 21 12:53:04 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.599 2012/01/19 14:55:21 nonaka Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.600 2012/01/21 12:53:04 skrll Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.605 2012/01/19 14:54:32 nonaka Exp
+ *	NetBSD: usbdevs,v 1.606 2012/01/21 12:50:28 skrll Exp
  */
 
 /*
@@ -7871,6 +7871,78 @@ const struct usb_product usb_products[] 
 	"USB Hub",
 	},
 	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500,
+	"SMSC9500 Ethernet device",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9505,
+	"SMSC9505 Ethernet device",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500A,
+	"SMSC9500A Ethernet device",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9505A,
+	"SMSC9505A Ethernet device",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9512_14,
+	"SMSC9512/9514 USB Hub & Ethernet device",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500_SAL10,
+	"SMSC9500 Ethernet device (SAL10)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9505_SAL10,
+	"SMSC9505 Ethernet device (SAL10)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500A_SAL10,
+	"SMSC9500A Ethernet device (SAL10)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9505A_SAL10,
+	"SMSC9505A Ethernet device (SAL10)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9512_14_SAL10,
+	"SMSC9512/14 Hub & Ethernet Device (SAL10)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500A_HAL,
+	"SMSC9500A Ethernet Device (HAL)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9505A_HAL,
+	"SMSC9505A Ethernet Device (HAL)",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500_ALT,
+	"SMSC9500 Ethernet Device",
+	},
+	{
+	USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9500A_A

CVS commit: src/lib/libintl

2012-01-21 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Sat Jan 21 13:35:49 UTC 2012

Modified Files:
src/lib/libintl: gettext.c

Log Message:
libintl crash when *.mo file lacks header section(old gettext format).
reported by jun@ -san, tested by tsutsui@ -san. thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libintl/gettext.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/libintl/gettext.c
diff -u src/lib/libintl/gettext.c:1.25 src/lib/libintl/gettext.c:1.26
--- src/lib/libintl/gettext.c:1.25	Tue Sep 25 08:19:09 2007
+++ src/lib/libintl/gettext.c	Sat Jan 21 13:35:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: gettext.c,v 1.25 2007/09/25 08:19:09 junyoung Exp $	*/
+/*	$NetBSD: gettext.c,v 1.26 2012/01/21 13:35:49 tnozaki Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 Citrus Project,
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: gettext.c,v 1.25 2007/09/25 08:19:09 junyoung Exp $");
+__RCSID("$NetBSD: gettext.c,v 1.26 2012/01/21 13:35:49 tnozaki Exp $");
 
 #include 
 #include 
@@ -624,7 +624,8 @@ mapit(const char *path, struct domainbin
 		if (v)
 			*v = '\0';
 	}
-	if (_gettext_parse_plural(&mohandle->mo.mo_plural,
+	if (!mohandle->mo.mo_header ||
+	_gettext_parse_plural(&mohandle->mo.mo_plural,
   &mohandle->mo.mo_nplurals,
   mohandle->mo.mo_header, headerlen))
 		mohandle->mo.mo_plural = NULL;



CVS commit: src/sys/dev/ic

2012-01-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 21 15:50:13 UTC 2012

Modified Files:
src/sys/dev/ic: nslm7x.c

Log Message:
Add module glue. (Better late than never.)


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/ic/nslm7x.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/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.58 src/sys/dev/ic/nslm7x.c:1.59
--- src/sys/dev/ic/nslm7x.c:1.58	Mon Jun 20 17:48:46 2011
+++ src/sys/dev/ic/nslm7x.c	Sat Jan 21 15:50:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7x.c,v 1.58 2011/06/20 17:48:46 pgoyette Exp $ */
+/*	$NetBSD: nslm7x.c,v 1.59 2012/01/21 15:50:13 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,13 +30,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.58 2011/06/20 17:48:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.59 2012/01/21 15:50:13 jakllsch Exp $");
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -2260,3 +2261,17 @@ as_refresh_temp(struct lm_softc *sc, int
 	DPRINTF(("%s: temp[%d] data=0x%x value_cur=%d\n",
 	__func__, n, data, sc->sensors[n].value_cur));
 }
+
+MODULE(MODULE_CLASS_DRIVER, lm, NULL);
+
+static int
+lm_modcmd(modcmd_t cmd, void *opaque)
+{
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+	case MODULE_CMD_FINI:
+		return 0;
+	default:
+		return ENOTTY;
+	}
+}



CVS commit: src/sys/dev/pci

2012-01-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 21 16:12:57 UTC 2012

Modified Files:
src/sys/dev/pci: voodoofbreg.h

Log Message:
Silence "large integer implicitly truncated to unsigned type" warning on LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/voodoofbreg.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/pci/voodoofbreg.h
diff -u src/sys/dev/pci/voodoofbreg.h:1.3 src/sys/dev/pci/voodoofbreg.h:1.4
--- src/sys/dev/pci/voodoofbreg.h:1.3	Thu Jan 19 18:35:27 2012
+++ src/sys/dev/pci/voodoofbreg.h	Sat Jan 21 16:12:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: voodoofbreg.h,v 1.3 2012/01/19 18:35:27 macallan Exp $	*/
+/*	$NetBSD: voodoofbreg.h,v 1.4 2012/01/21 16:12:57 jakllsch Exp $	*/
 
 /*
  * Copyright 2005, 2006 by Michael Lorenz.
@@ -197,9 +197,9 @@
 #define BIT(x) (1UL << (x))
 
 /* COMMAND_2D reg. values */
-#define ROP_COPY	0xcc // src
-#define ROP_INVERT  0x55 // NOT dst
-#define ROP_XOR 0x66 // src XOR dst
+#define ROP_COPY	0xccU// src
+#define ROP_INVERT	0x55U// NOT dst
+#define ROP_XOR		0x66U// src XOR dst
 
 #define AUTOINC_DSTXBIT(10)
 #define AUTOINC_DSTYBIT(11)



CVS commit: src/bin/rm

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 16:38:41 UTC 2012

Modified Files:
src/bin/rm: rm.c

Log Message:
Siginfo support from Daniel Loffgren


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/bin/rm/rm.c

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

Modified files:

Index: src/bin/rm/rm.c
diff -u src/bin/rm/rm.c:1.50 src/bin/rm/rm.c:1.51
--- src/bin/rm/rm.c:1.50	Mon Aug 29 10:48:46 2011
+++ src/bin/rm/rm.c	Sat Jan 21 11:38:41 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: rm.c,v 1.50 2011/08/29 14:48:46 joerg Exp $ */
+/* $NetBSD: rm.c,v 1.51 2012/01/21 16:38:41 christos Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993, 1994, 2003
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19
 #if 0
 static char sccsid[] = "@(#)rm.c	8.8 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: rm.c,v 1.50 2011/08/29 14:48:46 joerg Exp $");
+__RCSID("$NetBSD: rm.c,v 1.51 2012/01/21 16:38:41 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -54,15 +54,18 @@ __RCSID("$NetBSD: rm.c,v 1.50 2011/08/29
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 
 static int dflag, eval, fflag, iflag, Pflag, stdin_ok, vflag, Wflag;
+static sig_atomic_t pinfo;
 
 static int	check(char *, char *, struct stat *);
 static void	checkdot(char **);
+static void	progress(int);
 static void	rm_file(char **);
 static int	rm_overwrite(char *, struct stat *);
 static void	rm_tree(char **);
@@ -131,6 +134,8 @@ main(int argc, char *argv[])
 		usage();
 	}
 
+	(void)signal(SIGINFO, progress);
+
 	checkdot(argv);
 
 	if (*argv) {
@@ -252,8 +257,10 @@ rm_tree(char **argv)
 		if (rval != 0) {
 			warn("%s", p->fts_path);
 			eval = 1;
-		} else if (vflag)
+		} else if (vflag || pinfo) {
+			pinfo = 0;
 			(void)printf("%s\n", p->fts_path);
+		}
 	}
 	if (errno)
 		err(1, "fts_read");
@@ -579,3 +586,10 @@ usage(void)
 	exit(1);
 	/* NOTREACHED */
 }
+
+static void
+progress(int sig __unused)
+{
+	
+	pinfo++;
+}



CVS commit: src/sys/dev/mii

2012-01-21 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Jan 21 16:48:08 UTC 2012

Modified Files:
src/sys/dev/mii: makphy.c

Log Message:
disable the entry for Marvell E1149 for now since this driver doesn't work
with some instances of this hardware (in particular, the ones on the
motherboard of an HP XW9400 workstation, which is supposedly a Tyan S2915).
ukphy works fine for this.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/mii/makphy.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/mii/makphy.c
diff -u src/sys/dev/mii/makphy.c:1.36 src/sys/dev/mii/makphy.c:1.37
--- src/sys/dev/mii/makphy.c:1.36	Sat Nov 12 11:10:49 2011
+++ src/sys/dev/mii/makphy.c	Sat Jan 21 16:48:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: makphy.c,v 1.36 2011/11/12 11:10:49 sekiya Exp $	*/
+/*	$NetBSD: makphy.c,v 1.37 2012/01/21 16:48:08 chs Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.36 2011/11/12 11:10:49 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.37 2012/01/21 16:48:08 chs Exp $");
 
 #include 
 #include 
@@ -101,8 +101,11 @@ static const struct mii_phydesc makphys[
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1011,
 	  MII_STR_xxMARVELL_E1011 },
 
+#if 0
+/* doesn't work on eg. HP XW9400 */
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1149,
 	  MII_STR_xxMARVELL_E1149 },
+#endif
 
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E,
 	  MII_STR_xxMARVELL_E },



CVS commit: src/sys/arch

2012-01-21 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Jan 21 16:48:57 UTC 2012

Modified Files:
src/sys/arch/amd64/include: cpu.h types.h
src/sys/arch/x86/x86: vm_machdep.c

Log Message:
allocate uareas contiguously and access them via the direct map.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/amd64/include/cpu.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/amd64/include/types.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/x86/vm_machdep.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/amd64/include/cpu.h
diff -u src/sys/arch/amd64/include/cpu.h:1.59 src/sys/arch/amd64/include/cpu.h:1.60
--- src/sys/arch/amd64/include/cpu.h:1.59	Tue Dec 30 12:35:23 2008
+++ src/sys/arch/amd64/include/cpu.h	Sat Jan 21 16:48:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.59 2008/12/30 12:35:23 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.60 2012/01/21 16:48:56 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -89,6 +89,9 @@ cpu_set_curpri(int pri)
 #define CLKF_INTR(frame)	(curcpu()->ci_idepth > 0)
 #define LWP_PC(l)		((l)->l_md.md_regs->tf_rip)
 
+void	*cpu_uarea_alloc(bool);
+bool	cpu_uarea_free(void *);
+
 #endif	/* _KERNEL */
 
 #else	/*	__x86_64__	*/

Index: src/sys/arch/amd64/include/types.h
diff -u src/sys/arch/amd64/include/types.h:1.40 src/sys/arch/amd64/include/types.h:1.41
--- src/sys/arch/amd64/include/types.h:1.40	Sun Dec  4 16:24:13 2011
+++ src/sys/arch/amd64/include/types.h	Sat Jan 21 16:48:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.40 2011/12/04 16:24:13 chs Exp $	*/
+/*	$NetBSD: types.h,v 1.41 2012/01/21 16:48:56 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -99,6 +99,7 @@ typedef	volatile unsigned char		__cpu_si
 #define	__HAVE_DIRECT_MAP 1
 #define	__HAVE_MM_MD_DIRECT_MAPPED_IO
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#define	__HAVE_CPU_UAREA_ROUTINES
 #endif
 #endif
 

Index: src/sys/arch/x86/x86/vm_machdep.c
diff -u src/sys/arch/x86/x86/vm_machdep.c:1.13 src/sys/arch/x86/x86/vm_machdep.c:1.14
--- src/sys/arch/x86/x86/vm_machdep.c:1.13	Thu Feb 10 14:46:48 2011
+++ src/sys/arch/x86/x86/vm_machdep.c	Sat Jan 21 16:48:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.13 2011/02/10 14:46:48 pooka Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.14 2012/01/21 16:48:57 chs Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.13 2011/02/10 14:46:48 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.14 2012/01/21 16:48:57 chs Exp $");
 
 #include "opt_mtrr.h"
 
@@ -93,7 +93,7 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 #include 
@@ -356,3 +356,58 @@ vunmapbuf(struct buf *bp, vsize_t len)
 	bp->b_data = bp->b_saveaddr;
 	bp->b_saveaddr = 0;
 }
+
+#ifdef __HAVE_CPU_UAREA_ROUTINES
+void *
+cpu_uarea_alloc(bool system)
+{
+	struct pglist pglist;
+	int error;
+
+	/*
+	 * Allocate a new physically contiguous uarea which can be
+	 * direct-mapped.
+	 */
+	error = uvm_pglistalloc(USPACE, 0, ptoa(physmem), 0, 0, &pglist, 1, 1);
+	if (error) {
+		return NULL;
+	}
+
+	/*
+	 * Get the physical address from the first page.
+	 */
+	const struct vm_page * const pg = TAILQ_FIRST(&pglist);
+	KASSERT(pg != NULL);
+	const paddr_t pa = VM_PAGE_TO_PHYS(pg);
+
+	/*
+	 * We need to return a direct-mapped VA for the pa.
+	 */
+
+	return (void *)PMAP_MAP_POOLPAGE(pa);
+}
+
+/*
+ * Return true if we freed it, false if we didn't.
+ */
+bool
+cpu_uarea_free(void *vva)
+{
+	vaddr_t va = (vaddr_t) vva;
+
+	if (va >= VM_MIN_KERNEL_ADDRESS && va < VM_MAX_KERNEL_ADDRESS) {
+		return false;
+	}
+
+	/*
+	 * Since the pages are physically contiguous, the vm_page structures
+	 * will be as well.
+	 */
+	struct vm_page *pg = PHYS_TO_VM_PAGE(PMAP_UNMAP_POOLPAGE(va));
+	KASSERT(pg != NULL);
+	for (size_t i = 0; i < UPAGES; i++, pg++) {
+		uvm_pagefree(pg);
+	}
+	return true;
+}
+#endif /* __HAVE_CPU_UAREA_ROUTINES */



CVS commit: src/sys/dev/ic

2012-01-21 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Jan 21 16:49:26 UTC 2012

Modified Files:
src/sys/dev/ic: mpu.c

Log Message:
src/sys/dev/ic/mpu.c
fix assertions after audiomp.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/mpu.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/mpu.c
diff -u src/sys/dev/ic/mpu.c:1.18 src/sys/dev/ic/mpu.c:1.19
--- src/sys/dev/ic/mpu.c:1.18	Wed Nov 23 23:07:32 2011
+++ src/sys/dev/ic/mpu.c	Sat Jan 21 16:49:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpu.c,v 1.18 2011/11/23 23:07:32 jmcneill Exp $	*/
+/*	$NetBSD: mpu.c,v 1.19 2012/01/21 16:49:26 chs Exp $	*/
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpu.c,v 1.18 2011/11/23 23:07:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpu.c,v 1.19 2012/01/21 16:49:26 chs Exp $");
 
 #include 
 #include 
@@ -123,9 +123,9 @@ mpu_waitready(struct mpu_softc *sc)
 {
 	int i;
 
-	KASSERT(mutex_owned(sc->lock));
+	KASSERT(sc->lock == NULL || mutex_owned(sc->lock));
 
-	for(i = 0; i < MPU_MAXWAIT; i++) {
+	for (i = 0; i < MPU_MAXWAIT; i++) {
 		if (!(MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY))
 			return 0;
 		delay(10);
@@ -140,14 +140,14 @@ mpu_reset(struct mpu_softc *sc)
 	bus_space_handle_t ioh = sc->ioh;
 	int i;
 
-	KASSERT(mutex_owned(sc->lock));
+	KASSERT(sc->lock == NULL || mutex_owned(sc->lock));
 
 	if (mpu_waitready(sc)) {
 		DPRINTF(("%s: not ready\n", __func__));
 		return EIO;
 	}
 	bus_space_write_1(iot, ioh, MPU_COMMAND, MPU_RESET);
-	for(i = 0; i < 2*MPU_MAXWAIT; i++) {
+	for (i = 0; i < 2*MPU_MAXWAIT; i++) {
 		if (!(MPU_GETSTATUS(iot, ioh) & MPU_INPUT_EMPTY) &&
 		bus_space_read_1(iot, ioh, MPU_DATA) == MPU_ACK) {
 			return 0;



CVS commit: src/sys/uvm

2012-01-21 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Jan 21 16:51:38 UTC 2012

Modified Files:
src/sys/uvm: uvm_map.h

Log Message:
fix UVM_MAP_CLIP_* to only clip if the clip address is within the entry
(which would only not be true if the clip address is at one of the boundaries
of the entry).  fixes PR 44788.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/uvm/uvm_map.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/uvm/uvm_map.h
diff -u src/sys/uvm/uvm_map.h:1.68 src/sys/uvm/uvm_map.h:1.69
--- src/sys/uvm/uvm_map.h:1.68	Tue Dec 20 15:41:01 2011
+++ src/sys/uvm/uvm_map.h	Sat Jan 21 16:51:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.h,v 1.68 2011/12/20 15:41:01 reinoud Exp $	*/
+/*	$NetBSD: uvm_map.h,v 1.69 2012/01/21 16:51:38 chs Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -82,7 +82,10 @@
  */
 
 #define UVM_MAP_CLIP_START(MAP,ENTRY,VA,UMR) { \
-	if ((VA) > (ENTRY)->start) uvm_map_clip_start(MAP,ENTRY,VA,UMR); }
+	if ((VA) > (ENTRY)->start && (VA) < (ENTRY)->end) { \
+		uvm_map_clip_start(MAP,ENTRY,VA,UMR); \
+	} \
+}
 
 /*
  * UVM_MAP_CLIP_END: ensure that the entry ends at or before
@@ -92,7 +95,10 @@
  */
 
 #define UVM_MAP_CLIP_END(MAP,ENTRY,VA,UMR) { \
-	if ((VA) < (ENTRY)->end) uvm_map_clip_end(MAP,ENTRY,VA,UMR); }
+	if ((VA) > (ENTRY)->start && (VA) < (ENTRY)->end) { \
+		uvm_map_clip_end(MAP,ENTRY,VA,UMR); \
+	} \
+} 
 
 /*
  * extract flags



CVS commit: src/dist/nvi

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 17:12:56 UTC 2012

Modified Files:
src/dist/nvi/common: delete.c
src/dist/nvi/vi: getc.c

Log Message:
PR/10367: Mason Loring Bliss: fix delete word near end of file. Patch
from tnozaki.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/common/delete.c
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/vi/getc.c

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

Modified files:

Index: src/dist/nvi/common/delete.c
diff -u src/dist/nvi/common/delete.c:1.1.1.2 src/dist/nvi/common/delete.c:1.2
--- src/dist/nvi/common/delete.c:1.1.1.2	Sun May 18 10:29:41 2008
+++ src/dist/nvi/common/delete.c	Sat Jan 21 12:12:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: delete.c,v 1.1.1.2 2008/05/18 14:29:41 aymeric Exp $ */
+/*	$NetBSD: delete.c,v 1.2 2012/01/21 17:12:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -89,6 +89,11 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo
 
 	/* Case 3 -- delete within a single line. */
 	if (tm->lno == fm->lno) {
+		if (tm->cno == fm->cno) {
+			if (db_delete(sp, fm->lno))
+return (1);
+			goto done;
+		}
 		if (db_get(sp, fm->lno, DBG_FATAL, &p, &len))
 			return (1);
 		GET_SPACE_RETW(sp, bp, blen, len);

Index: src/dist/nvi/vi/getc.c
diff -u src/dist/nvi/vi/getc.c:1.3 src/dist/nvi/vi/getc.c:1.4
--- src/dist/nvi/vi/getc.c:1.3	Mon Mar 21 10:53:04 2011
+++ src/dist/nvi/vi/getc.c	Sat Jan 21 12:12:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: getc.c,v 1.3 2011/03/21 14:53:04 tnozaki Exp $ */
+/*	$NetBSD: getc.c,v 1.4 2012/01/21 17:12:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -143,10 +143,12 @@ cs_fspace(SCR *sp, VCS *csp)
 int
 cs_fblank(SCR *sp, VCS *csp)
 {
+	if (csp->cs_flags == CS_EMP)
+		return (0);
 	for (;;) {
 		if (cs_next(sp, csp))
 			return (1);
-		if (csp->cs_flags == CS_EOL || csp->cs_flags == CS_EMP ||
+		if (csp->cs_flags == CS_EOL ||
 		(csp->cs_flags == 0 && ISBLANK2(csp->cs_ch)))
 			continue;
 		break;
@@ -212,10 +214,12 @@ cs_prev(SCR *sp, VCS *csp)
 int
 cs_bblank(SCR *sp, VCS *csp)
 {
+	if (csp->cs_flags == CS_EMP)
+		return (0);
 	for (;;) {
 		if (cs_prev(sp, csp))
 			return (1);
-		if (csp->cs_flags == CS_EOL || csp->cs_flags == CS_EMP ||
+		if (csp->cs_flags == CS_EOL ||
 		(csp->cs_flags == 0 && ISBLANK2(csp->cs_ch)))
 			continue;
 		break;



CVS commit: src/sys/dev/acpi

2012-01-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 21 18:13:56 UTC 2012

Modified Files:
src/sys/dev/acpi: asus_acpi.c

Log Message:
initialize fan sensor state to ENVSYS_SINVALID, should fix:

asus0 at acpi0 (ATKD, ASUS010-16843008)
sme_update_sensor_dictionary: can not update sensor state 0 unknown
asus0: couldn't register with envsys


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/asus_acpi.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/acpi/asus_acpi.c
diff -u src/sys/dev/acpi/asus_acpi.c:1.22 src/sys/dev/acpi/asus_acpi.c:1.23
--- src/sys/dev/acpi/asus_acpi.c:1.22	Wed Feb 16 09:05:12 2011
+++ src/sys/dev/acpi/asus_acpi.c	Sat Jan 21 18:13:56 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: asus_acpi.c,v 1.22 2011/02/16 09:05:12 jruoho Exp $ */
+/* $NetBSD: asus_acpi.c,v 1.23 2012/01/21 18:13:56 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: asus_acpi.c,v 1.22 2011/02/16 09:05:12 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asus_acpi.c,v 1.23 2012/01/21 18:13:56 jmcneill Exp $");
 
 #include 
 #include 
@@ -153,6 +153,7 @@ asus_attach(device_t parent, device_t se
 
 	strcpy(sc->sc_sensor[ASUS_SENSOR_FAN].desc, "fan");
 	sc->sc_sensor[ASUS_SENSOR_FAN].units = ENVSYS_SFANRPM;
+	sc->sc_sensor[ASUS_SENSOR_FAN].state = ENVSYS_SINVALID;
 	sysmon_envsys_sensor_attach(sc->sc_sme,
 	&sc->sc_sensor[ASUS_SENSOR_FAN]);
 



CVS commit: src/sys/dev/ic

2012-01-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 21 18:33:17 UTC 2012

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Correct some typos in comments, as was done in wdc.c 1.266.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/mvsata.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/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.12 src/sys/dev/ic/mvsata.c:1.13
--- src/sys/dev/ic/mvsata.c:1.12	Mon Jan  9 01:01:49 2012
+++ src/sys/dev/ic/mvsata.c	Sat Jan 21 18:33:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.12 2012/01/09 01:01:49 jakllsch Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.13 2012/01/21 18:33:17 jakllsch Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.12 2012/01/09 01:01:49 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.13 2012/01/21 18:33:17 jakllsch Exp $");
 
 #include "opt_mvsata.h"
 
@@ -1601,8 +1601,8 @@ again:
 	/*
 	 * after a ATAPI_SOFT_RESET, the device will have released the bus.
 	 * Reselect again, it doesn't hurt for others commands, and the time
-	 * penalty for the extra regiter write is acceptable,
-	 * wdc_exec_command() isn't called often (mosly for autoconfig)
+	 * penalty for the extra register write is acceptable,
+	 * wdc_exec_command() isn't called often (mostly for autoconfig)
 	 */
 	MVSATA_WDC_WRITE_1(mvport, SRB_H, WDSD_IBM);
 	if ((ata_c->flags & AT_XFDONE) != 0) {



CVS commit: src/sys/arch/zaurus

2012-01-21 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Jan 21 18:56:52 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c zmci.c
src/sys/arch/zaurus/zaurus: kloader_machdep.c kloader_zaurus.S

Log Message:
fix my license notice.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/dev/zmci.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/zaurus/zaurus/kloader_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/zaurus/kloader_zaurus.S

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

Modified files:

Index: src/sys/arch/zaurus/dev/zaudio.c
diff -u src/sys/arch/zaurus/dev/zaudio.c:1.16 src/sys/arch/zaurus/dev/zaudio.c:1.17
--- src/sys/arch/zaurus/dev/zaudio.c:1.16	Wed Nov 23 23:07:30 2011
+++ src/sys/arch/zaurus/dev/zaudio.c	Sat Jan 21 18:56:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zaudio.c,v 1.16 2011/11/23 23:07:30 jmcneill Exp $	*/
+/*	$NetBSD: zaudio.c,v 1.17 2012/01/21 18:56:51 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 /*-
- * Copyright (c) 2009 NONAKA Kimihiro 
+ * Copyright (C) 2009 NONAKA Kimihiro 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,17 +30,16 @@
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 /*
@@ -51,7 +50,7 @@
 #include "opt_zaudio.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zaudio.c,v 1.16 2011/11/23 23:07:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zaudio.c,v 1.17 2012/01/21 18:56:51 nonaka Exp $");
 
 #include 
 #include 

Index: src/sys/arch/zaurus/dev/zmci.c
diff -u src/sys/arch/zaurus/dev/zmci.c:1.3 src/sys/arch/zaurus/dev/zmci.c:1.4
--- src/sys/arch/zaurus/dev/zmci.c:1.3	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/zmci.c	Sat Jan 21 18:56:51 2012
@@ -1,7 +1,7 @@
-/*	$NetBSD: zmci.c,v 1.3 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: zmci.c,v 1.4 2012/01/21 18:56:51 nonaka Exp $	*/
 
 /*-
- * Copyright (c) 2006-2008 NONAKA Kimihiro 
+ * Copyright (C) 2006-2008 NONAKA Kimihiro 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -13,21 +13,20 @@
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 

CVS commit: src/sys/arch/usermode

2012-01-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 21 19:17:33 UTC 2012

Modified Files:
src/sys/arch/usermode/include: thunk.h
src/sys/arch/usermode/usermode: thunk.c

Log Message:
Add the complement to sigemptyset(), sigfillset()!


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/usermode/include/thunk.h
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/usermode/usermode/thunk.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/usermode/include/thunk.h
diff -u src/sys/arch/usermode/include/thunk.h:1.59 src/sys/arch/usermode/include/thunk.h:1.60
--- src/sys/arch/usermode/include/thunk.h:1.59	Wed Jan 11 12:37:50 2012
+++ src/sys/arch/usermode/include/thunk.h	Sat Jan 21 19:17:33 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.59 2012/01/11 12:37:50 reinoud Exp $ */
+/* $NetBSD: thunk.h,v 1.60 2012/01/21 19:17:33 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill 
@@ -132,6 +132,7 @@ void	thunk_signal(int, void (*)(int));
 int	thunk_sigblock(int);
 int	thunk_sigunblock(int);
 int	thunk_sigemptyset(sigset_t *sa_mask);
+int	thunk_sigfillset(sigset_t *sa_mask);
 void	thunk_sigaddset(sigset_t *sa_mask, int sig);
 int	thunk_sigprocmask(int how, const sigset_t * set, sigset_t *oset);
 int	thunk_atexit(void (*function)(void));

Index: src/sys/arch/usermode/usermode/thunk.c
diff -u src/sys/arch/usermode/usermode/thunk.c:1.79 src/sys/arch/usermode/usermode/thunk.c:1.80
--- src/sys/arch/usermode/usermode/thunk.c:1.79	Sun Jan 15 10:35:08 2012
+++ src/sys/arch/usermode/usermode/thunk.c	Sat Jan 21 19:17:33 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.79 2012/01/15 10:35:08 jmcneill Exp $ */
+/* $NetBSD: thunk.c,v 1.80 2012/01/21 19:17:33 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 #ifdef __NetBSD__
-__RCSID("$NetBSD: thunk.c,v 1.79 2012/01/15 10:35:08 jmcneill Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.80 2012/01/21 19:17:33 reinoud Exp $");
 #endif
 
 #include 
@@ -605,6 +605,13 @@ thunk_sigemptyset(sigset_t *sa_mask)
 }
 
 
+int
+thunk_sigfillset(sigset_t *sa_mask)
+{
+	return sigfillset(sa_mask);
+}
+
+
 void
 thunk_sigaddset(sigset_t *sa_mask, int sig)
 {



CVS commit: src/dist/nvi

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 19:29:41 UTC 2012

Modified Files:
src/dist/nvi/common: delete.c
src/dist/nvi/vi: getc.c

Log Message:
undo previous, it is wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/delete.c
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/vi/getc.c

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

Modified files:

Index: src/dist/nvi/common/delete.c
diff -u src/dist/nvi/common/delete.c:1.2 src/dist/nvi/common/delete.c:1.3
--- src/dist/nvi/common/delete.c:1.2	Sat Jan 21 12:12:56 2012
+++ src/dist/nvi/common/delete.c	Sat Jan 21 14:29:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: delete.c,v 1.2 2012/01/21 17:12:56 christos Exp $ */
+/*	$NetBSD: delete.c,v 1.3 2012/01/21 19:29:41 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -89,11 +89,6 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo
 
 	/* Case 3 -- delete within a single line. */
 	if (tm->lno == fm->lno) {
-		if (tm->cno == fm->cno) {
-			if (db_delete(sp, fm->lno))
-return (1);
-			goto done;
-		}
 		if (db_get(sp, fm->lno, DBG_FATAL, &p, &len))
 			return (1);
 		GET_SPACE_RETW(sp, bp, blen, len);

Index: src/dist/nvi/vi/getc.c
diff -u src/dist/nvi/vi/getc.c:1.4 src/dist/nvi/vi/getc.c:1.5
--- src/dist/nvi/vi/getc.c:1.4	Sat Jan 21 12:12:56 2012
+++ src/dist/nvi/vi/getc.c	Sat Jan 21 14:29:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: getc.c,v 1.4 2012/01/21 17:12:56 christos Exp $ */
+/*	$NetBSD: getc.c,v 1.5 2012/01/21 19:29:41 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -143,12 +143,10 @@ cs_fspace(SCR *sp, VCS *csp)
 int
 cs_fblank(SCR *sp, VCS *csp)
 {
-	if (csp->cs_flags == CS_EMP)
-		return (0);
 	for (;;) {
 		if (cs_next(sp, csp))
 			return (1);
-		if (csp->cs_flags == CS_EOL ||
+		if (csp->cs_flags == CS_EOL || csp->cs_flags == CS_EMP ||
 		(csp->cs_flags == 0 && ISBLANK2(csp->cs_ch)))
 			continue;
 		break;
@@ -214,12 +212,10 @@ cs_prev(SCR *sp, VCS *csp)
 int
 cs_bblank(SCR *sp, VCS *csp)
 {
-	if (csp->cs_flags == CS_EMP)
-		return (0);
 	for (;;) {
 		if (cs_prev(sp, csp))
 			return (1);
-		if (csp->cs_flags == CS_EOL ||
+		if (csp->cs_flags == CS_EOL || csp->cs_flags == CS_EMP ||
 		(csp->cs_flags == 0 && ISBLANK2(csp->cs_ch)))
 			continue;
 		break;



CVS commit: src/dist/nvi/common

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 19:32:37 UTC 2012

Modified Files:
src/dist/nvi/common: cut.c

Log Message:
PR/10367:

Restore lost fix:
http://mail-index.netbsd.org/source-changes/2001/09/09/0042.html

Define ENTIRE_LINE to be -1 instead of 0 since we may want to copy 0 characters.
(and use ENTIRE_LINE instead of 0 where appropriate)

This fixes a bug in the dw command with for example:


a b c

~
~
if you hit dw there, only the empty line would be killed but both the empty
line and the subsequent one would be pasted when asked for with P for example.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/common/cut.c

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

Modified files:

Index: src/dist/nvi/common/cut.c
diff -u src/dist/nvi/common/cut.c:1.5 src/dist/nvi/common/cut.c:1.6
--- src/dist/nvi/common/cut.c:1.5	Wed Nov 23 14:25:28 2011
+++ src/dist/nvi/common/cut.c	Sat Jan 21 14:32:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cut.c,v 1.5 2011/11/23 19:25:28 tnozaki Exp $ */
+/*	$NetBSD: cut.c,v 1.6 2012/01/21 19:32:37 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -134,16 +134,16 @@ copyloop:
 	}
 
 
-#define	ENTIRE_LINE	0
+#define	ENTIRE_LINE	-1
 	/* In line mode, it's pretty easy, just cut the lines. */
 	if (LF_ISSET(CUT_LINEMODE)) {
 		cbp->flags |= CB_LMODE;
 		for (lno = fm->lno; lno <= tm->lno; ++lno)
-			if (cut_line(sp, lno, 0, 0, cbp))
+			if (cut_line(sp, lno, 0, ENTIRE_LINE, cbp))
 goto cut_line_err;
 	} else {
 		/*
-		 * Get the first line.  A length of 0 causes cut_line
+		 * Get the first line.  A length of ENTIRE_LINE causes cut_line
 		 * to cut from the MARK to the end of the line.
 		 */
 		if (cut_line(sp, fm->lno, fm->cno, fm->lno != tm->lno ?
@@ -257,7 +257,7 @@ cut_line(SCR *sp, db_recno_t lno, size_t
 	 * copy the portion we want, and reset the TEXT length.
 	 */
 	if (len != 0) {
-		if (clen == 0)
+		if (clen == ENTIRE_LINE)
 			clen = len - fcno;
 		MEMCPYW(tp->lb, p + fcno, clen);
 		tp->len = clen;



CVS commit: src/dist/nvi/common

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 19:35:02 UTC 2012

Modified Files:
src/dist/nvi/common: delete.c

Log Message:
PR/10367: Second part.
Restore lost fix:
http://mail-index.netbsd.org/source-changes/2001/09/09/0043.html

Fix a test condition for EOF.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/common/delete.c

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

Modified files:

Index: src/dist/nvi/common/delete.c
diff -u src/dist/nvi/common/delete.c:1.3 src/dist/nvi/common/delete.c:1.4
--- src/dist/nvi/common/delete.c:1.3	Sat Jan 21 14:29:41 2012
+++ src/dist/nvi/common/delete.c	Sat Jan 21 14:35:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: delete.c,v 1.3 2012/01/21 19:29:41 christos Exp $ */
+/*	$NetBSD: delete.c,v 1.4 2012/01/21 19:35:02 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -65,7 +65,7 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo
 		if (tm->lno == lno) {
 			if (db_get(sp, lno, DBG_FATAL, &p, &len))
 return (1);
-			eof = tm->cno >= len ? 1 : 0;
+			eof = tm->cno != -1 && tm->cno >= len ? 1 : 0;
 		} else
 			eof = 1;
 		if (eof) {



CVS commit: src/dist/nvi/common

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 19:49:56 UTC 2012

Modified Files:
src/dist/nvi/common: cut.c delete.c

Log Message:
make the previous patch compile.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/common/cut.c
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/common/delete.c

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

Modified files:

Index: src/dist/nvi/common/cut.c
diff -u src/dist/nvi/common/cut.c:1.6 src/dist/nvi/common/cut.c:1.7
--- src/dist/nvi/common/cut.c:1.6	Sat Jan 21 14:32:37 2012
+++ src/dist/nvi/common/cut.c	Sat Jan 21 14:49:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cut.c,v 1.6 2012/01/21 19:32:37 christos Exp $ */
+/*	$NetBSD: cut.c,v 1.7 2012/01/21 19:49:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -134,7 +134,7 @@ copyloop:
 	}
 
 
-#define	ENTIRE_LINE	-1
+#define	ENTIRE_LINE	(size_t)-1
 	/* In line mode, it's pretty easy, just cut the lines. */
 	if (LF_ISSET(CUT_LINEMODE)) {
 		cbp->flags |= CB_LMODE;
@@ -257,6 +257,7 @@ cut_line(SCR *sp, db_recno_t lno, size_t
 	 * copy the portion we want, and reset the TEXT length.
 	 */
 	if (len != 0) {
+/*###260 [cc] error: comparison between signed and unsigned integer expressions%%%*/
 		if (clen == ENTIRE_LINE)
 			clen = len - fcno;
 		MEMCPYW(tp->lb, p + fcno, clen);

Index: src/dist/nvi/common/delete.c
diff -u src/dist/nvi/common/delete.c:1.4 src/dist/nvi/common/delete.c:1.5
--- src/dist/nvi/common/delete.c:1.4	Sat Jan 21 14:35:02 2012
+++ src/dist/nvi/common/delete.c	Sat Jan 21 14:49:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: delete.c,v 1.4 2012/01/21 19:35:02 christos Exp $ */
+/*	$NetBSD: delete.c,v 1.5 2012/01/21 19:49:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -65,7 +65,7 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo
 		if (tm->lno == lno) {
 			if (db_get(sp, lno, DBG_FATAL, &p, &len))
 return (1);
-			eof = tm->cno != -1 && tm->cno >= len ? 1 : 0;
+			eof = tm->cno != (size_t)-1 && tm->cno >= len ? 1 : 0;
 		} else
 			eof = 1;
 		if (eof) {



CVS commit: src/dist/nvi/common

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 19:56:46 UTC 2012

Modified Files:
src/dist/nvi/common: cut.c

Log Message:
remove error(1) line.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/common/cut.c

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

Modified files:

Index: src/dist/nvi/common/cut.c
diff -u src/dist/nvi/common/cut.c:1.7 src/dist/nvi/common/cut.c:1.8
--- src/dist/nvi/common/cut.c:1.7	Sat Jan 21 14:49:56 2012
+++ src/dist/nvi/common/cut.c	Sat Jan 21 14:56:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cut.c,v 1.7 2012/01/21 19:49:56 christos Exp $ */
+/*	$NetBSD: cut.c,v 1.8 2012/01/21 19:56:46 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -257,7 +257,6 @@ cut_line(SCR *sp, db_recno_t lno, size_t
 	 * copy the portion we want, and reset the TEXT length.
 	 */
 	if (len != 0) {
-/*###260 [cc] error: comparison between signed and unsigned integer expressions%%%*/
 		if (clen == ENTIRE_LINE)
 			clen = len - fcno;
 		MEMCPYW(tp->lb, p + fcno, clen);



CVS commit: src/tools/compat

2012-01-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 21 20:05:27 UTC 2012

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
Always redefine DEV_BSIZE=512.
All references of DEV_BSIZE in tools are to manipulate target
(i.e. NetBSD's) file images (in installboot(8) and makefs(8) etc.) and
no host's DEV_BSIZE is required for the moment.  Closes PR toolchain/42574.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/tools/compat/compat_defs.h

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.82 src/tools/compat/compat_defs.h:1.83
--- src/tools/compat/compat_defs.h:1.82	Thu Nov  3 14:13:53 2011
+++ src/tools/compat/compat_defs.h	Sat Jan 21 20:05:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.82 2011/11/03 14:13:53 joerg Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.83 2012/01/21 20:05:27 tsutsui Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -1052,9 +1052,9 @@ __GEN_ENDIAN_DEC(64, le)
 #define BYTE_ORDER LITTLE_ENDIAN
 #endif
 
-#ifndef DEV_BSIZE
+/* all references of DEV_BSIZE in tools are for NetBSD's file images */
+#undef DEV_BSIZE
 #define DEV_BSIZE (1 << 9)
-#endif
 
 #undef MIN
 #undef MAX



CVS commit: src/sys/arch/x68k

2012-01-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 21 20:19:55 UTC 2012

Modified Files:
src/sys/arch/x68k/include: vmparam.h
src/sys/arch/x68k/x68k: machdep.c

Log Message:
Give higher priority to faster local memory on uvm_page_physload().
Tested by Y.Sugahara on his 060turbo with 128MB local memory and
this improved even simple benchmark.  Ok'ed by isaki@.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x68k/include/vmparam.h
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/x68k/x68k/machdep.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/x68k/include/vmparam.h
diff -u src/sys/arch/x68k/include/vmparam.h:1.34 src/sys/arch/x68k/include/vmparam.h:1.35
--- src/sys/arch/x68k/include/vmparam.h:1.34	Sun Oct  9 08:42:15 2011
+++ src/sys/arch/x68k/include/vmparam.h	Sat Jan 21 20:19:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.34 2011/10/09 08:42:15 tsutsui Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.35 2012/01/21 20:19:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -116,8 +116,10 @@
 #define VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
 /* Actually VM_PSTRAT_UPPERFIRST is needed */
 
-#define	VM_NFREELIST		1
+#define	VM_NFREELIST		2
 #define	VM_FREELIST_DEFAULT	0
+#define	VM_FREELIST_HIGHMEM	VM_FREELIST_DEFAULT
+#define	VM_FREELIST_MAINMEM	1
 
 #define	__HAVE_PMAP_PHYSSEG
 

Index: src/sys/arch/x68k/x68k/machdep.c
diff -u src/sys/arch/x68k/x68k/machdep.c:1.179 src/sys/arch/x68k/x68k/machdep.c:1.180
--- src/sys/arch/x68k/x68k/machdep.c:1.179	Mon Dec 12 19:03:12 2011
+++ src/sys/arch/x68k/x68k/machdep.c	Sat Jan 21 20:19:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.179 2011/12/12 19:03:12 mrg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.180 2012/01/21 20:19:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.179 2011/12/12 19:03:12 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.180 2012/01/21 20:19:55 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -180,7 +180,7 @@ x68k_init(void)
 	 */
 	uvm_page_physload(atop(avail_start), atop(avail_end),
 	atop(avail_start), atop(avail_end),
-	VM_FREELIST_DEFAULT);
+	VM_FREELIST_MAINMEM);
 #ifdef EXTENDED_MEMORY
 	setmemrange();
 #endif
@@ -1144,7 +1144,7 @@ setmemrange(void)
 		if ((u_long)mlist[i].base < h) {
 			uvm_page_physload(atop(mlist[i].base), atop(h),
 			atop(mlist[i].base), atop(h),
-			VM_FREELIST_DEFAULT);
+			VM_FREELIST_HIGHMEM);
 			mem_size += h - (u_long) mlist[i].base;
 		}
 	}



CVS commit: src/sys/sys

2012-01-21 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jan 21 21:44:03 UTC 2012

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Kill duplicate SHF_MASKOS/SHF_MASKPROC defines.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/sys/exec_elf.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/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.120 src/sys/sys/exec_elf.h:1.121
--- src/sys/sys/exec_elf.h:1.120	Thu Jan 19 21:35:11 2012
+++ src/sys/sys/exec_elf.h	Sat Jan 21 21:44:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.120 2012/01/19 21:35:11 christos Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.121 2012/01/21 21:44:03 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -446,8 +446,6 @@ typedef struct {
 #define SHF_TLS		 0x0400 /* Holds thread-local data */
 #define SHF_MASKOS	 0x0ff0 /* Operating system specific values */
 #define SHF_MASKPROC	 0xf000 /* Processor-specific values */
-#define SHF_MASKOS	 0x0ff0 /* OS-specific.	 */
-#define SHF_MASKPROC	 0xf000 /* Processor-specific */
 #define SHF_ORDERED	 0x4000 /* Ordering requirement (Solaris) */
 #define SHF_EXCLUDE	 0x8000 /* Excluded unless unles ref/alloc
 	   (Solaris).*/



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

2012-01-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 21 21:49:50 UTC 2012

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

Log Message:
cpu_uarea_free returns bool, not void


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/alpha/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/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.77 src/sys/arch/alpha/include/cpu.h:1.78
--- src/sys/arch/alpha/include/cpu.h:1.77	Tue Jun 14 07:53:29 2011
+++ src/sys/arch/alpha/include/cpu.h	Sat Jan 21 21:49:50 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.77 2011/06/14 07:53:29 matt Exp $ */
+/* $NetBSD: cpu.h,v 1.78 2012/01/21 21:49:50 matt Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -250,7 +250,7 @@ struct trapframe;
 
 int	badaddr(void *, size_t);
 void *	cpu_uarea_alloc(bool);
-void	cpu_uarea_free(void *);
+bool	cpu_uarea_free(void *);
 
 #define	cpu_idle()	/* nothing */
 



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

2012-01-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 21 21:50:24 UTC 2012

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

Log Message:
For cpu_uarea, need uvm.h instead of uvm_extern.h


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/alpha/alpha/vm_machdep.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/vm_machdep.c
diff -u src/sys/arch/alpha/alpha/vm_machdep.c:1.108 src/sys/arch/alpha/alpha/vm_machdep.c:1.109
--- src/sys/arch/alpha/alpha/vm_machdep.c:1.108	Tue Jun 14 07:53:29 2011
+++ src/sys/arch/alpha/alpha/vm_machdep.c	Sat Jan 21 21:50:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.108 2011/06/14 07:53:29 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.109 2012/01/21 21:50:24 matt Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.108 2011/06/14 07:53:29 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.109 2012/01/21 21:50:24 matt Exp $");
 
 #include 
 #include 
@@ -40,7 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 #include 



CVS commit: src/sys/arch/usermode/target/i386

2012-01-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 21 22:05:06 UTC 2012

Modified Files:
src/sys/arch/usermode/target/i386: cpu_i386.c

Log Message:
Add extra kasserts to make sure we dont derive paramters from zero ucp's


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/target/i386/cpu_i386.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/usermode/target/i386/cpu_i386.c
diff -u src/sys/arch/usermode/target/i386/cpu_i386.c:1.2 src/sys/arch/usermode/target/i386/cpu_i386.c:1.3
--- src/sys/arch/usermode/target/i386/cpu_i386.c:1.2	Sat Jan 14 17:42:52 2012
+++ src/sys/arch/usermode/target/i386/cpu_i386.c	Sat Jan 21 22:05:06 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_i386.c,v 1.2 2012/01/14 17:42:52 reinoud Exp $ */
+/* $NetBSD: cpu_i386.c,v 1.3 2012/01/21 22:05:06 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk 
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_i386.c,v 1.2 2012/01/14 17:42:52 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_i386.c,v 1.3 2012/01/21 22:05:06 reinoud Exp $");
 
 #include 
 #include 
@@ -268,6 +268,7 @@ md_syscall_set_returnargs(lwp_t *l, ucon
 register_t
 md_get_pc(ucontext_t *ucp)
 {
+	KASSERT(ucp);
 	register_t *reg = (register_t *) &ucp->uc_mcontext;
 
 	return reg[14];			/* EIP */
@@ -276,6 +277,7 @@ md_get_pc(ucontext_t *ucp)
 register_t
 md_get_sp(ucontext_t *ucp)
 {
+	KASSERT(ucp);
 	register_t *reg = (register_t *) &ucp->uc_mcontext;
 
 	return reg[17];			/* ESP */
@@ -303,6 +305,7 @@ md_syscall_check_opcode(ucontext_t *ucp)
 void
 md_syscall_get_opcode(ucontext_t *ucp, uint32_t *opcode)
 {
+	KASSERT(ucp);
 	register_t *reg = (register_t *) &ucp->uc_mcontext;
 //	uint8_t  *p8  = (uint8_t *) (reg[14]);
 	uint16_t *p16 = (uint16_t*) (reg[14]);	/* EIP */
@@ -323,6 +326,7 @@ md_syscall_get_opcode(ucontext_t *ucp, u
 void
 md_syscall_inc_pc(ucontext_t *ucp, uint32_t opcode)
 {
+	KASSERT(ucp);
 	uint *reg = (int *) &ucp->uc_mcontext;
 
 	/* advance program counter */
@@ -343,6 +347,7 @@ md_syscall_inc_pc(ucontext_t *ucp, uint3
 void
 md_syscall_dec_pc(ucontext_t *ucp, uint32_t opcode)
 {
+	KASSERT(ucp);
 	uint *reg = (int *) &ucp->uc_mcontext;
 
 	switch (opcode) {



CVS commit: src/sys/arch/usermode

2012-01-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 21 22:09:57 UTC 2012

Modified Files:
src/sys/arch/usermode/dev: clock.c cpu.c if_veth.c ld_thunkbus.c
ttycons.c
src/sys/arch/usermode/include: intr.h
src/sys/arch/usermode/usermode: intr.c trap.c

Log Message:
Complete rewrite of the signal and spl framework for NetBSD/usermode

Signals are now moved from the sigaltstack ASAP and stacked on a replacement
stack for each processes.

Preemption now works though could be enhanced a bit more


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/usermode/dev/clock.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/dev/if_veth.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/usermode/dev/ld_thunkbus.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/usermode/dev/ttycons.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/usermode/include/intr.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/usermode/usermode/intr.c
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/usermode/usermode/trap.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/usermode/dev/clock.c
diff -u src/sys/arch/usermode/dev/clock.c:1.25 src/sys/arch/usermode/dev/clock.c:1.26
--- src/sys/arch/usermode/dev/clock.c:1.25	Sat Jan 14 21:42:51 2012
+++ src/sys/arch/usermode/dev/clock.c	Sat Jan 21 22:09:56 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.25 2012/01/14 21:42:51 reinoud Exp $ */
+/* $NetBSD: clock.c,v 1.26 2012/01/21 22:09:56 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_hz.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.25 2012/01/14 21:42:51 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.26 2012/01/21 22:09:56 reinoud Exp $");
 
 #include 
 #include 
@@ -50,11 +50,14 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.
 static int	clock_match(device_t, cfdata_t, void *);
 static void	clock_attach(device_t, device_t, void *);
 
-static void	clock_signal(int sig, siginfo_t *info, void *ctx);
 static unsigned int clock_getcounter(struct timecounter *);
 
 static int	clock_todr_gettime(struct todr_chip_handle *, struct timeval *);
 
+extern void setup_clock_intr(void);
+void clock_intr(void *priv);
+
+
 struct clock_softc {
 	device_t		sc_dev;
 	struct todr_chip_handle	sc_todr;
@@ -72,6 +75,7 @@ static struct timecounter clock_timecoun
 };
 
 timer_t clock_timerid;
+int clock_running = 0;
 
 CFATTACH_DECL_NEW(clock, sizeof(struct clock_softc),
 clock_match, clock_attach, NULL, NULL);
@@ -90,7 +94,6 @@ clock_match(device_t parent, cfdata_t ma
 static void
 clock_attach(device_t parent, device_t self, void *opaque)
 {
-	static struct sigaction sa;
 	struct clock_softc *sc = device_private(self);
 
 	aprint_naive("\n");
@@ -101,21 +104,15 @@ clock_attach(device_t parent, device_t s
 	sc->sc_todr.todr_gettime = clock_todr_gettime;
 	todr_attach(&sc->sc_todr);
 
-	memset(&sa, 0, sizeof(sa));
-	thunk_sigemptyset(&sa.sa_mask);
-	sa.sa_sigaction = clock_signal;
-	sa.sa_flags = SA_RESTART | SA_ONSTACK;
-	if (thunk_sigaction(SIGALRM, &sa, NULL) == -1)
-		panic("couldn't register SIGALRM handler : %d",
-		thunk_geterrno());
-
 	clock_timerid = thunk_timer_attach();
-
 	clock_timecounter.tc_quality = 1000;
 	tc_init(&clock_timecounter);
+
+	setup_clock_intr();
+	clock_running = 1;
 }
 
-static void
+void
 clock_intr(void *priv)
 {
 	struct clockframe cf;
@@ -126,13 +123,6 @@ clock_intr(void *priv)
 	}
 }
 
-static void
-clock_signal(int sig, siginfo_t *info, void *ctx)
-{
-	curcpu()->ci_idepth++;
-	spl_intr(IPL_SOFTCLOCK, clock_intr, NULL);
-	curcpu()->ci_idepth--;
-}
 
 static unsigned int
 clock_getcounter(struct timecounter *tc)

Index: src/sys/arch/usermode/dev/cpu.c
diff -u src/sys/arch/usermode/dev/cpu.c:1.68 src/sys/arch/usermode/dev/cpu.c:1.69
--- src/sys/arch/usermode/dev/cpu.c:1.68	Wed Jan 18 19:17:02 2012
+++ src/sys/arch/usermode/dev/cpu.c	Sat Jan 21 22:09:56 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.68 2012/01/18 19:17:02 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.69 2012/01/21 22:09:56 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -30,7 +30,7 @@
 #include "opt_hz.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.68 2012/01/18 19:17:02 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.69 2012/01/21 22:09:56 reinoud Exp $");
 
 #include 
 #include 
@@ -244,12 +244,13 @@ cpu_switchto(lwp_t *oldlwp, lwp_t *newlw
 	thunk_makecontext(&sc->sc_ucp, (void (*)(void)) cpu_switchto_atomic,
 			2, oldlwp, newlwp, NULL);
 
-	if (!oldpcb) {
-		thunk_setcontext(&sc->sc_ucp);
-		/* never returns */
-	} else {
+	KASSERT(sc);
+	if (oldpcb) {
 		thunk_swapcontext(&oldpcb->pcb_ucp, &sc->sc_ucp);
 		/* returns here */
+	} else {
+		thunk_setcontext(&sc->sc_ucp);
+		/* never returns */
 	}
 
 #ifdef CPU_DEBUG
@@ -374,8 +375,10 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	/* ge

CVS commit: src/tools

2012-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 21 22:31:15 UTC 2012

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
remove dup target.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.36 src/tools/Makefile.gnuhost:1.37
--- src/tools/Makefile.gnuhost:1.36	Fri Jan 20 18:01:05 2012
+++ src/tools/Makefile.gnuhost	Sat Jan 21 17:31:15 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.36 2012/01/20 23:01:05 christos Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.37 2012/01/21 22:31:15 christos Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -107,16 +107,6 @@ configure_cleanup:
 configure_cleanup=configure_cleanup
 .endif
 
-BUILD_PLATFORM!= uname -srm | tr ' ' '-'
-CONFIGURE_PLATFORM!= if [ -s .configure_done ]; then cat .configure_done; else echo none; fi
-.if "${BUILD_PLATFORM}" != "${CONFIGURE_PLATFORM}"
-configure_cleanup:
-	@mkdir build 2>/dev/null || true
-	@(echo "Cleaning stale cache files ${BUILD_PLATFORM} != ${CONFIGURE_PLATFORM}")
-	@(cd build && find . -name config.cache -print0 | xargs -0 rm -f)
-configure_cleanup=configure_cleanup
-.endif
-
 .configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile ${configure_cleanup}
 	@mkdir build 2>/dev/null || true
 	@(cd build && ${CONFIGURE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure ${CONFIGURE_ARGS})



CVS commit: [matt-nb5-mips64] src/sys/uvm

2012-01-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 21 23:20:58 UTC 2012

Modified Files:
src/sys/uvm [matt-nb5-mips64]: uvm_pdpolicy_clock.c

Log Message:
Use pg instead p as a pointer to struct uvm_page.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.16.1 src/sys/uvm/uvm_pdpolicy_clock.c

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

Modified files:

Index: src/sys/uvm/uvm_pdpolicy_clock.c
diff -u src/sys/uvm/uvm_pdpolicy_clock.c:1.12 src/sys/uvm/uvm_pdpolicy_clock.c:1.12.16.1
--- src/sys/uvm/uvm_pdpolicy_clock.c:1.12	Wed Jun  4 12:41:40 2008
+++ src/sys/uvm/uvm_pdpolicy_clock.c	Sat Jan 21 23:20:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pdpolicy_clock.c,v 1.12 2008/06/04 12:41:40 ad Exp $	*/
+/*	$NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.1 2012/01/21 23:20:58 matt Exp $	*/
 /*	NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $	*/
 
 /*
@@ -74,7 +74,7 @@
 #else /* defined(PDSIM) */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.12 2008/06/04 12:41:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.12.16.1 2012/01/21 23:20:58 matt Exp $");
 
 #include 
 #include 
@@ -246,7 +246,7 @@ void
 uvmpdpol_balancequeue(int swap_shortage)
 {
 	int inactive_shortage;
-	struct vm_page *p, *nextpg;
+	struct vm_page *pg, *nextpg;
 
 	/*
 	 * we have done the scan to get free pages.   now we work on meeting
@@ -254,17 +254,17 @@ uvmpdpol_balancequeue(int swap_shortage)
 	 */
 
 	inactive_shortage = pdpol_state.s_inactarg - pdpol_state.s_inactive;
-	for (p = TAILQ_FIRST(&pdpol_state.s_activeq);
-	 p != NULL && (inactive_shortage > 0 || swap_shortage > 0);
-	 p = nextpg) {
-		nextpg = TAILQ_NEXT(p, pageq.queue);
+	for (pg = TAILQ_FIRST(&pdpol_state.s_activeq);
+	 pg != NULL && (inactive_shortage > 0 || swap_shortage > 0);
+	 pg = nextpg) {
+		nextpg = TAILQ_NEXT(pg, pageq.queue);
 
 		/*
 		 * if there's a shortage of swap slots, try to free it.
 		 */
 
-		if (swap_shortage > 0 && (p->pqflags & PQ_SWAPBACKED) != 0) {
-			if (uvmpd_trydropswap(p)) {
+		if (swap_shortage > 0 && (pg->pqflags & PQ_SWAPBACKED) != 0) {
+			if (uvmpd_trydropswap(pg)) {
 swap_shortage--;
 			}
 		}
@@ -275,7 +275,7 @@ uvmpdpol_balancequeue(int swap_shortage)
 
 		if (inactive_shortage > 0) {
 			/* no need to check wire_count as pg is "active" */
-			uvmpdpol_pagedeactivate(p);
+			uvmpdpol_pagedeactivate(pg);
 			uvmexp.pddeact++;
 			inactive_shortage--;
 		}



CVS commit: src/sys/dev/pci

2012-01-21 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Sat Jan 21 23:46:49 UTC 2012

Modified Files:
src/sys/dev/pci: files.pci

Log Message:
Change dependency iic to i2cbus for fb drivers. OK macallan.


To generate a diff of this commit:
cvs rdiff -u -r1.351 -r1.352 src/sys/dev/pci/files.pci

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/files.pci
diff -u src/sys/dev/pci/files.pci:1.351 src/sys/dev/pci/files.pci:1.352
--- src/sys/dev/pci/files.pci:1.351	Tue Jan  3 00:25:49 2012
+++ src/sys/dev/pci/files.pci	Sat Jan 21 23:46:49 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.351 2012/01/03 00:25:49 macallan Exp $
+#	$NetBSD: files.pci,v 1.352 2012/01/21 23:46:49 rkujawa Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -837,7 +837,7 @@ file	dev/pci/unichromefb.c		unichromefb 
 
 # ATI Radeon framebuffer console driver
 # (Note: to enable the BIOS parser, add options RADEON_BIOS_INIT to the config)
-device	radeonfb: wsemuldisplaydev, videomode, rasops8, rasops32, vcons, splash, iic, i2c_bitbang, ddc_read_edid, edid, drm
+device	radeonfb: wsemuldisplaydev, videomode, rasops8, rasops32, vcons, splash, i2cbus, i2c_bitbang, ddc_read_edid, edid, drm
 attach	radeonfb at pci
 file	dev/pci/radeonfb.c	radeonfb
 file	dev/pci/radeonfb_i2c.c	radeonfb
@@ -980,7 +980,7 @@ attach	ichsmb at pci
 file	dev/pci/ichsmb.c		ichsmb
 
 # ATI Rage 128 framebuffer console driver
-device	r128fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, iic, i2c_bitbang
+device	r128fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang
 attach	r128fb at pci
 file	dev/pci/r128fb.c		r128fb
 defflag	opt_r128fb.h	R128FB_DEBUG
@@ -1032,7 +1032,7 @@ file	dev/pci/mvsata_pci.c		mvsata_pci
 
 include "dev/pci/voyager/files.voyager"
 # Silicon Motion SM502 / Voyager GX
-device	voyager: iic, i2c_bitbang, voyagerbus, i2cbus
+device	voyager: i2cbus, i2c_bitbang, voyagerbus, i2cbus
 attach	voyager at pci
 file	dev/pci/voyager.c		voyager
 defflag	opt_voyager.h	VOYAGER_DEBUG
@@ -1041,7 +1041,7 @@ defflag	opt_voyager.h	VOYAGER_DEBUG
 include "dev/pci/hdaudio/files.hdaudio"
 
 # Permedia 2 / Sun PGX32 / Raptor
-device	pm2fb: wsemuldisplaydev, rasops8, vcons, videomode, iic, i2c_bitbang
+device	pm2fb: wsemuldisplaydev, rasops8, vcons, videomode, i2cbus, i2c_bitbang
 attach	pm2fb at pci
 file	dev/pci/pm2fb.c		pm2fb
 defflag	opt_pm2fb.h	PM2FB_DEBUG



CVS commit: src/sys/dev/pci

2012-01-21 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Sat Jan 21 23:54:57 UTC 2012

Modified Files:
src/sys/dev/pci: files.pci

Log Message:
Fix double i2cbus dependency for voyager


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/sys/dev/pci/files.pci

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/files.pci
diff -u src/sys/dev/pci/files.pci:1.352 src/sys/dev/pci/files.pci:1.353
--- src/sys/dev/pci/files.pci:1.352	Sat Jan 21 23:46:49 2012
+++ src/sys/dev/pci/files.pci	Sat Jan 21 23:54:57 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.352 2012/01/21 23:46:49 rkujawa Exp $
+#	$NetBSD: files.pci,v 1.353 2012/01/21 23:54:57 rkujawa Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -1032,7 +1032,7 @@ file	dev/pci/mvsata_pci.c		mvsata_pci
 
 include "dev/pci/voyager/files.voyager"
 # Silicon Motion SM502 / Voyager GX
-device	voyager: i2cbus, i2c_bitbang, voyagerbus, i2cbus
+device	voyager: i2c_bitbang, voyagerbus, i2cbus
 attach	voyager at pci
 file	dev/pci/voyager.c		voyager
 defflag	opt_voyager.h	VOYAGER_DEBUG



CVS commit: src

2012-01-21 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 22 02:55:47 UTC 2012

Modified Files:
src/share/man/man9: pcq.9
src/sys/kern: subr_pcq.c

Log Message:
Replace pcq(9) with the implementation from ad@ and minor changes by me.

PR/40516, PR/45631.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/pcq.9
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/subr_pcq.c

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

Modified files:

Index: src/share/man/man9/pcq.9
diff -u src/share/man/man9/pcq.9:1.5 src/share/man/man9/pcq.9:1.6
--- src/share/man/man9/pcq.9:1.5	Thu Dec  2 12:54:13 2010
+++ src/share/man/man9/pcq.9	Sun Jan 22 02:55:47 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: pcq.9,v 1.5 2010/12/02 12:54:13 wiz Exp $
+.\" $NetBSD: pcq.9,v 1.6 2012/01/22 02:55:47 rmind Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 8, 2010
+.Dd January 22, 2012
 .Dt PCQ 9
 .Os
 .Sh NAME
@@ -95,11 +95,11 @@ immediately, if resources are unavailabl
 Free the resources held by
 .Fa pcq .
 .It Fn pcq_get "pcq"
-Remove the next item to be consumed from the queue and return
-it.
+Remove the next item to be consumed from the queue and return it.
 If the queue is empty,
 return
 .Dv NULL .
+The caller must prevent concurrent gets from occuring.
 .It Fn pcq_maxitems "pcq"
 Return the maximum number of items that the queue can store at
 any one time.
@@ -132,8 +132,6 @@ The
 .Nm
 interface first appeared in
 .Nx 6.0 .
-.Sh AUTHORS
-.An Matt Thomas Aq m...@netbsd.org
 .\" .Sh CAVEATS
 .\" .Sh BUGS
 .\" .Sh SECURITY CONSIDERATIONS

Index: src/sys/kern/subr_pcq.c
diff -u src/sys/kern/subr_pcq.c:1.3 src/sys/kern/subr_pcq.c:1.4
--- src/sys/kern/subr_pcq.c:1.3	Tue Nov 11 21:45:33 2008
+++ src/sys/kern/subr_pcq.c	Sun Jan 22 02:55:47 2012
@@ -1,11 +1,11 @@
-/*	$NetBSD: subr_pcq.c,v 1.3 2008/11/11 21:45:33 rmind Exp $	*/
+/*	$NetBSD: subr_pcq.c,v 1.4 2012/01/22 02:55:47 rmind Exp $	*/
 
 /*-
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by Matt Thomas 
+ * by Andrew Doran.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -29,173 +29,181 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/*
+ * Lockless producer/consumer queue.
+ */
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.3 2008/11/11 21:45:33 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.4 2012/01/22 02:55:47 rmind Exp $");
 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
 
-typedef void * volatile pcq_entry_t;
-
+/*
+ * Internal producer-consumer queue structure.  Note: providing a separate
+ * cache-line both for pcq_t::pcq_pc and pcq_t::pcq_items.
+ */
 struct pcq {
-	pcq_entry_t *pcq_consumer;
-	pcq_entry_t *pcq_producer;
-	pcq_entry_t *pcq_limit;
-	pcq_entry_t pcq_base[];
+	u_int			pcq_nitems;
+	uint8_t			pcq_pad1[COHERENCY_UNIT - sizeof(u_int)];
+	volatile uint32_t	pcq_pc;
+	uint8_t			pcq_pad2[COHERENCY_UNIT - sizeof(uint32_t)];
+	void * volatile		pcq_items[];
 };
 
-static inline pcq_entry_t *
-pcq_advance(pcq_t *pcq, pcq_entry_t *ptr)
-{
+/*
+ * Producer (p) - stored in the lower 16 bits of pcq_t::pcq_pc.
+ * Consumer (c) - in the higher 16 bits.
+ *
+ * We have a limitation of 16 bits i.e. 0x items in the queue.
+ */
 
-	if (__predict_false(++ptr == pcq->pcq_limit))
-		return pcq->pcq_base;
+static inline void
+pcq_split(uint32_t v, u_int *p, u_int *c)
+{
 
-	return ptr;
+	*p = v & 0x;
+	*c = v >> 16;
 }
 
-bool
-pcq_put(pcq_t *pcq, void *item)
+static inline uint32_t
+pcq_combine(u_int p, u_int c)
 {
-	pcq_entry_t *producer;
-
-	KASSERT(item != NULL);
-
-	/*
-	 * Get our starting point,  While we are doing this, it is
-	 * imperative that pcq->pcq_base/pcq->pcq_limit not change
-	 * in value.  If you need to resize a pcq, init a new pcq
-	 * with the right size and swap pointers to it.
-	 */
-	membar_consumer();	/* see updates to pcq_producer */
-	producer = pcq->pcq_producer;
-	for (;;) {
-		/*
-		 * Preadvance so we reduce the window on updates.
-		 */
-		pcq_entry_t * const new_producer = pcq_advance(pcq, producer);
 
-		/*
-		 * Try to fill an empty slot
-		 */
-		if (NULL == atomic_cas_ptr(producer, NULL, item)) {
-			/*
-			 * We need to use atomic_cas_ptr since another thread
-			 * might have inserted between these two cas operations
-			 * and we don't want to overwrite a producer that's
-			 * more up-to-date.
-			 */
-			atomic_cas_ptr(&pcq->pcq_producer,
-			__UNVOLATILE(producer), 
-			__UNVOLATILE(new_producer));
-			/*
-			 * Tell them we were able to enque

CVS commit: src/sys/lib/libkern

2012-01-21 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 22 02:57:37 UTC 2012

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

Log Message:
Add CTASSERT_SIGNED() and CTASSERT_UNSIGNED().


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

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

Modified files:

Index: src/sys/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.104 src/sys/lib/libkern/libkern.h:1.105
--- src/sys/lib/libkern/libkern.h:1.104	Mon Nov 28 08:05:06 2011
+++ src/sys/lib/libkern/libkern.h	Sun Jan 22 02:57:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: libkern.h,v 1.104 2011/11/28 08:05:06 tls Exp $	*/
+/*	$NetBSD: libkern.h,v 1.105 2012/01/22 02:57:36 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -190,6 +190,8 @@ tolower(int ch)
 #endif
 
 #define	CTASSERT(x)		__CTASSERT(x)
+#define	CTASSERT_SIGNED(x)	__CTASSERT(((typeof(x))-1) < 0)
+#define	CTASSERT_UNSIGNED(x)	__CTASSERT(((typeof(x))-1) >= 0)
 
 #ifndef DIAGNOSTIC
 #define _DIAGASSERT(a)	(void)0



CVS commit: src/sys/fs/tmpfs

2012-01-21 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 22 03:13:20 UTC 2012

Modified Files:
src/sys/fs/tmpfs: tmpfs_vnops.c

Log Message:
tmpfs_access: simplify, no need to separate the logic.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/fs/tmpfs/tmpfs_vnops.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/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.93 src/sys/fs/tmpfs/tmpfs_vnops.c:1.94
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.93	Fri Nov 18 21:18:51 2011
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Sun Jan 22 03:13:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.93 2011/11/18 21:18:51 christos Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.94 2012/01/22 03:13:19 rmind Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.93 2011/11/18 21:18:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.94 2012/01/22 03:13:19 rmind Exp $");
 
 #include 
 #include 
@@ -382,11 +382,24 @@ tmpfs_close(void *v)
 	return 0;
 }
 
-static int
-tmpfs_check_possible(vnode_t *vp, tmpfs_node_t *node, mode_t mode)
+int
+tmpfs_access(void *v)
 {
+	struct vop_access_args /* {
+		struct vnode	*a_vp;
+		int		a_mode;
+		kauth_cred_t	a_cred;
+	} */ *ap = v;
+	vnode_t *vp = ap->a_vp;
+	mode_t mode = ap->a_mode;
+	kauth_cred_t cred = ap->a_cred;
+	tmpfs_node_t *node = VP_TO_TMPFS_NODE(vp);
 	const bool writing = (mode & VWRITE) != 0;
+	int error;
+
+	KASSERT(VOP_ISLOCKED(vp));
 
+	/* Possible? */
 	switch (vp->v_type) {
 	case VDIR:
 	case VLNK:
@@ -403,41 +416,16 @@ tmpfs_check_possible(vnode_t *vp, tmpfs_
 	default:
 		return EINVAL;
 	}
-	return (writing && (node->tn_flags & IMMUTABLE) != 0) ? EPERM : 0;
-}
-
-static int
-tmpfs_check_permitted(vnode_t *vp, tmpfs_node_t *node, mode_t mode,
-kauth_cred_t cred)
-{
+	if (writing && (node->tn_flags & IMMUTABLE) != 0) {
+		return EPERM;
+	}
 
-	return genfs_can_access(vp->v_type, node->tn_mode, node->tn_uid,
+	/* Permitted? */
+	error = genfs_can_access(vp->v_type, node->tn_mode, node->tn_uid,
 	node->tn_gid, mode, cred);
-}
 
-int
-tmpfs_access(void *v)
-{
-	struct vop_access_args /* {
-		struct vnode	*a_vp;
-		int		a_mode;
-		kauth_cred_t	a_cred;
-	} */ *ap = v;
-	vnode_t *vp = ap->a_vp;
-	mode_t mode = ap->a_mode;
-	kauth_cred_t cred = ap->a_cred;
-	tmpfs_node_t *node;
-	int error;
-
-	KASSERT(VOP_ISLOCKED(vp));
-
-	node = VP_TO_TMPFS_NODE(vp);
-	error = tmpfs_check_possible(vp, node, mode);
-	if (error) {
-		return error;
-	}
 	return kauth_authorize_vnode(cred, kauth_mode_to_action(mode), vp,
-	NULL, tmpfs_check_permitted(vp, node, mode, cred));
+	NULL, error);
 }
 
 int



CVS commit: src/sys/kern

2012-01-21 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 22 03:48:51 UTC 2012

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

Log Message:
fileassoc_file_delete: pre-check whether fileassoc was used and thus avoid
acquiring kernel-lock, which damages sys_unlink() performance.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/kern_fileassoc.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_fileassoc.c
diff -u src/sys/kern/kern_fileassoc.c:1.34 src/sys/kern/kern_fileassoc.c:1.35
--- src/sys/kern/kern_fileassoc.c:1.34	Fri Dec 25 20:07:18 2009
+++ src/sys/kern/kern_fileassoc.c	Sun Jan 22 03:48:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_fileassoc.c,v 1.34 2009/12/25 20:07:18 elad Exp $ */
+/* $NetBSD: kern_fileassoc.c,v 1.35 2012/01/22 03:48:51 rmind Exp $ */
 
 /*-
  * Copyright (c) 2006 Elad Efrat 
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_fileassoc.c,v 1.34 2009/12/25 20:07:18 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_fileassoc.c,v 1.35 2012/01/22 03:48:51 rmind Exp $");
 
 #include "opt_fileassoc.h"
 
@@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_fileass
 
 #define	FILEASSOC_INITIAL_TABLESIZE	128
 
-static specificdata_domain_t fileassoc_domain;
+static specificdata_domain_t fileassoc_domain = NULL;
 static specificdata_key_t fileassoc_mountspecific_key;
 static ONCE_DECL(control);
 
@@ -510,6 +510,10 @@ fileassoc_file_delete(struct vnode *vp)
 	struct fileassoc_table *tbl;
 	struct fileassoc_file *faf;
 
+	/* Pre-check if fileassoc is used. XXX */
+	if (!fileassoc_domain) {
+		return ENOENT;
+	}
 	KERNEL_LOCK(1, NULL);
 
 	faf = fileassoc_file_lookup(vp, NULL);



CVS commit: src/doc

2012-01-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 22 04:30:00 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note build.sh live-image and install-image target support.


To generate a diff of this commit:
cvs rdiff -u -r1.1648 -r1.1649 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/CHANGES
diff -u src/doc/CHANGES:1.1648 src/doc/CHANGES:1.1649
--- src/doc/CHANGES:1.1648	Thu Jan 19 00:41:33 2012
+++ src/doc/CHANGES	Sun Jan 22 04:30:00 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1648 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1649 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1204,3 +1204,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	atf(7): Import 0.15.  [jmmv 20120116]
 	p5pb(4): DCE Computer G-REX 1200 and G-REX 4000 PCI bridges are now
 		supported. [rkujawa 20120119]
+	build.sh: Add live-image and install-image targets.  [tsutsui 20120122]



CVS commit: src/doc

2012-01-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 22 04:40:47 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Tidy up for better output on http://www.NetBSD.org/changes/changes-6.0.html .


To generate a diff of this commit:
cvs rdiff -u -r1.1649 -r1.1650 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/CHANGES
diff -u src/doc/CHANGES:1.1649 src/doc/CHANGES:1.1650
--- src/doc/CHANGES:1.1649	Sun Jan 22 04:30:00 2012
+++ src/doc/CHANGES	Sun Jan 22 04:40:47 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1649 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1650 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1049,7 +1049,7 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	mpfr: Import mpfr 3.0.1.  [mrg 20110619]
 	GMP: Import GNU MP 5.0.2.  [mrg 20110619]
 	sandpoint: Add support for booting from RAID 1 [jdc 20110620]
-	GCC: Import version 4.5.3.  [mrg 20110620]
+	gcc(1): Import version 4.5.3.  [mrg 20110620]
 	ld.elf_so(1): Support ELF symbol versioning. [nonaka 20110625]
 	kernel: Add new system calls pipe2(2), dup3(2), paccept(2), kqueue1(2)
 		and flags SOCK_CLOEXEC/SOCK_NONBLOCK to socket(2), and
@@ -1062,9 +1062,9 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	acpi(4): Updated ACPICA to 20110623. [jruoho 20110628]
 	vnd(4): Allow vnd(4) to be backed by a sparse file. [hannken 20110629]
 	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]
+	mips: Rework Atheros MIPS-based SoC support.  Add initial support
+		for AR71xx (24K) and AR9344 (74K) SoCs. [matt 20110707]
 	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.
@@ -1124,22 +1124,22 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	yacc(1): Import byacc-20110908 [christos 20110910]
 	traceroute(8): Updated to 1.4a12 [christos 20110910]
 	bind: Update to 9.9.0a1 [christos 20110911]
-	file: Update to 5.09 [christos 20110916]
+	file(1): Update to 5.09 [christos 20110916]
 	mppb(4): Add driver for Prometheus Zorro III to PCI bridge.
 		[rkujawa 20110917]
 	xen: Provide experimental support for suspend/resume in
 		NetBSD domUs. [jym 20110920]
-	tty: Provide a sysctl and ioctl to dynamically change the tty buffer
+	tty(4): Provide a sysctl and ioctl to dynamically change the tty buffer
 		sizes [christos 20110923]
 	udp(4): Commit Vlad Balan's Google SoC project. This implements
 		RFC6056 port selection algorithms. The selection can
 		be done at the global level via sysctl(7), or at the socket
 		level via setsockopt(2) [christos 20110923]
 	binutils: updated to FSF binutils 2.21.1a.  [christos 20110924]
-	GDB: Updated to 7.3.1.  [christos 20110924]
+	gdb(1): Updated to 7.3.1.  [christos 20110924]
 	audiocfg(1): New tool to control default audio defaults, by Jared
 		D. McNeill.  [mrg 20111006]
-	GCC: Obsolete libgcc_pic.  [mrg 20111006]
+	gcc(1): Obsolete libgcc_pic.  [mrg 20111006]
 	amd64: Switch to GDB 7.3.1.  [christos 20111008]
 	i386: Switch to GDB 7.3.1.  [christos 20111008]
 	zoneinfo: Import tzdata2011l. [apb 20111010]
@@ -1179,7 +1179,7 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 		support. [tsutsui 2020]
 	arm: Add TLS (thread local storage) support.  [joerg 2018]
 	m68k: Add TLS (thread local storage) support.  [joerg 2022]
-	audio: Audio drivers are now MP-safe. [jmcneill 2023]
+	audio(9): Audio drivers are now MP-safe. [jmcneill 2023]
 	xbdback(4): driver is now MP-SAFE. [jym 2023]
 	resolvconf(8): import openresolv-3.4.5 [roy 2024]
 	mount_chfs(8): Add mount_chfs(8), a tool for mounting CHFS volumes.



CVS commit: src/etc/etc.macppc

2012-01-21 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Jan 22 06:10:35 UTC 2012

Added Files:
src/etc/etc.macppc: rc.conf.append

Log Message:
enable powerd by default


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/etc/etc.macppc/rc.conf.append

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

Added files:

Index: src/etc/etc.macppc/rc.conf.append
diff -u /dev/null src/etc/etc.macppc/rc.conf.append:1.1
--- /dev/null	Sun Jan 22 06:10:35 2012
+++ src/etc/etc.macppc/rc.conf.append	Sun Jan 22 06:10:35 2012
@@ -0,0 +1,8 @@
+#	$NetBSD: rc.conf.append,v 1.1 2012/01/22 06:10:35 macallan Exp $
+#
+# Arch-specific rc.conf(5) configuration.
+
+# All ADB keyboards and all supported laptops have power buttons which
+# generate events for powerd. Also, on most laptops we support AC and lid
+# events
+powerd=yes



CVS commit: src/etc/etc.macppc

2012-01-21 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Jan 22 06:13:55 UTC 2012

Modified Files:
src/etc/etc.macppc: ttys

Log Message:
use a more appropriate terminal type for ttyE*


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.macppc/ttys

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

Modified files:

Index: src/etc/etc.macppc/ttys
diff -u src/etc/etc.macppc/ttys:1.11 src/etc/etc.macppc/ttys:1.12
--- src/etc/etc.macppc/ttys:1.11	Tue Oct  7 10:00:02 2008
+++ src/etc/etc.macppc/ttys	Sun Jan 22 06:13:55 2012
@@ -1,14 +1,14 @@
 #
 #	from: @(#)ttys	5.1 (Berkeley) 4/17/89
-#	$NetBSD: ttys,v 1.11 2008/10/07 10:00:02 abs Exp $
+#	$NetBSD: ttys,v 1.12 2012/01/22 06:13:55 macallan Exp $
 #
 # name	gettytype	status		comments
 #
 console	"/usr/libexec/getty std.38400"	vt100	off secure
 constty	"/usr/libexec/getty std.38400"	vt100	off secure
-ttyE0	"/usr/libexec/getty std.9600"	vt100	on  secure
-ttyE1   "/usr/libexec/getty std.9600"   vt100   on  secure
-ttyE2   "/usr/libexec/getty std.9600"   vt100   on  secure
-ttyE3   "/usr/libexec/getty std.9600"   vt100   on  secure
+ttyE0	"/usr/libexec/getty std.9600"	wsvt25	on  secure
+ttyE1   "/usr/libexec/getty std.9600"   wsvt25  on  secure
+ttyE2   "/usr/libexec/getty std.9600"   wsvt25  on  secure
+ttyE3   "/usr/libexec/getty std.9600"   wsvt25  on  secure
 ttyZ0	"/usr/libexec/getty std.38400"	vt100	on  secure
 ttyZ1	"/usr/libexec/getty std.38400"	vt100	off secure