CVS commit: xsrc/external/mit/xf86-video-geode

2015-07-20 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Mon Jul 20 06:34:03 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-geode/dist/src: geode.h
Removed Files:
xsrc/external/mit/xf86-video-geode/include: config.h

Log Message:
make this work in a config.h-less way.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-video-geode/dist/src/geode.h
cvs rdiff -u -r1.5 -r0 xsrc/external/mit/xf86-video-geode/include/config.h

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

Modified files:

Index: xsrc/external/mit/xf86-video-geode/dist/src/geode.h
diff -u xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.1.1.4 xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.2
--- xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.1.1.4	Thu Mar 20 06:54:20 2014
+++ xsrc/external/mit/xf86-video-geode/dist/src/geode.h	Mon Jul 20 06:34:03 2015
@@ -28,7 +28,9 @@
 #define _GEODE_H_
 
 #include geode_pcirename.h
+#ifdef HAVE_CONFIG_H
 #include config.h
+#endif
 
 #ifdef HAVE_XAA_H
 #include xaa.h



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-geode

2015-07-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 20 06:34:30 UTC 2015

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-geode: Makefile

Log Message:
use xorg-pkg-ver.mk


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile:1.2 src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile:1.3
--- src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile:1.2	Wed May 18 20:55:09 2011
+++ src/external/mit/xorg/server/drivers/xf86-video-geode/Makefile	Mon Jul 20 06:34:29 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/05/18 20:55:09 plunky Exp $
+#	$NetBSD: Makefile,v 1.3 2015/07/20 06:34:29 mrg Exp $
 
 DRIVER=		xf86-video-geode
 DRIVER_NAME=	geode_drv
@@ -37,8 +37,6 @@ CPPFLAGS+=	-I${X11SRCDIR.${DRIVER}}/src/
 		-I${X11SRCDIR.${DRIVER}}/src/gfx \
 		-I${X11SRCDIR.${DRIVER}}/src/panel
 
-CPPFLAGS+=	-DHAVE_CONFIG_H -I${X11SRCDIR.${DRIVER}}/../include
-
 # XXX ugh
 CPPFLAGS+=	-Doff64_t=off_t -Dlseek64=lseek
 
@@ -47,3 +45,6 @@ COPTS.lx_memory.c+=	-Wno-error	# XXX
 COPTS.panel.c+=		-Wno-error	# XXX -- huh? don't get this one
 
 .include ../Makefile.xf86-driver
+
+XORG_PKG_VER_PROG=	${DRIVER}
+.include ../../../xorg-pkg-ver.mk



CVS commit: [netbsd-7] src/doc

2015-07-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jul 20 06:13:53 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
842


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.343 -r1.1.2.344 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.343 src/doc/CHANGES-7.0:1.1.2.344
--- src/doc/CHANGES-7.0:1.1.2.343	Fri Jul 17 04:48:52 2015
+++ src/doc/CHANGES-7.0	Mon Jul 20 06:13:52 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.343 2015/07/17 04:48:52 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.344 2015/07/20 06:13:52 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -33397,3 +33397,14 @@ sys/dev/pci/hdaudio/hdaudio_pci.c		patch
 	Deregister pmf hook when attach failed.
 	[nonaka, ticket #881]
 
+sys/arch/sparc/stand/ofwboot/loadfile_machdep.c	1.14
+sys/arch/sparc/stand/ofwboot/version		1.21
+sys/arch/sparc64/include/cpu.h			1.115
+sys/arch/sparc64/sparc64/autoconf.c		1.203
+sys/arch/sparc64/sparc64/mp_subr.S		1.9 via patch
+sys/arch/sparc64/sparc64/pmap.c			1.295, 1.295 via patch
+
+	Fix booting of sparc64 kernels with more than 4 MB combined
+	.data and .bss segment.
+	[martin, ticket #842]
+



CVS commit: xsrc/external/mit/xman/dist

2015-07-20 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Mon Jul 20 08:20:04 UTC 2015

Modified Files:
xsrc/external/mit/xman/dist: handler.c

Log Message:
Fix mismerge.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xman/dist/handler.c

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

Modified files:

Index: xsrc/external/mit/xman/dist/handler.c
diff -u xsrc/external/mit/xman/dist/handler.c:1.5 xsrc/external/mit/xman/dist/handler.c:1.6
--- xsrc/external/mit/xman/dist/handler.c:1.5	Sun Jul 19 23:04:04 2015
+++ xsrc/external/mit/xman/dist/handler.c	Mon Jul 20 08:20:04 2015
@@ -320,7 +320,7 @@ SaveFormattedPage(Widget w, XEvent * eve
  * If we are not active then take no action.
  */
 
-if (man_globals-tempfile == NULL || man_globals-tempfile[0] == '\0')
+if (man_globals-tempfile[0] == '\0')
 return;
 
 switch (params[0][0]) {



CVS commit: [netbsd-7] src/sys/arch

2015-07-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jul 20 06:12:23 UTC 2015

Modified Files:
src/sys/arch/sparc/stand/ofwboot [netbsd-7]: loadfile_machdep.c version
src/sys/arch/sparc64/include [netbsd-7]: cpu.h
src/sys/arch/sparc64/sparc64 [netbsd-7]: autoconf.c mp_subr.S pmap.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #842):
sys/arch/sparc/stand/ofwboot/loadfile_machdep.c: revision 1.14
sys/arch/sparc/stand/ofwboot/version: revision 1.21
sys/arch/sparc64/include/cpu.h: revision 1.115
sys/arch/sparc64/sparc64/autoconf.c: revision 1.203
sys/arch/sparc64/sparc64/mp_subr.S: revision 1.9 via patch
sys/arch/sparc64/sparc64/pmap.c: revisions 1.295, 1.295 via patch
Fix available length calculation in kvamap_extract when reusing existing
mappings.
--
Bump version now that we can load kernels with sizeof(.data)+sizeof(.bss) 4 MB
--
Do not hardcode the assumption that .data and .bss fit together in a single
4 MB page. This allows booting kernels with options USB_DEBUG again.
--
Slightly optimize the ITLB usage on secondary processors


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.2.1 \
src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
cvs rdiff -u -r1.20 -r1.20.4.1 src/sys/arch/sparc/stand/ofwboot/version
cvs rdiff -u -r1.111 -r1.111.2.1 src/sys/arch/sparc64/include/cpu.h
cvs rdiff -u -r1.198.2.2 -r1.198.2.3 src/sys/arch/sparc64/sparc64/autoconf.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/sparc64/sparc64/mp_subr.S
cvs rdiff -u -r1.289 -r1.289.2.1 src/sys/arch/sparc64/sparc64/pmap.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/sparc/stand/ofwboot/loadfile_machdep.c
diff -u src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.13 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.13.2.1
--- src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.13	Mon Apr 21 18:10:40 2014
+++ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c	Mon Jul 20 06:12:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadfile_machdep.c,v 1.13 2014/04/21 18:10:40 palle Exp $	*/
+/*	$NetBSD: loadfile_machdep.c,v 1.13.2.1 2015/07/20 06:12:23 snj Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -136,13 +136,13 @@ kvamap_extract(vaddr_t va, vsize_t len, 
 		if (kvamap[i].start == NULL)
 			break;
 		if ((kvamap[i].start = va)  (va  kvamap[i].end)) {
-			uint64_t va_len = kvamap[i].end - va + kvamap[i].start;
+			uint64_t va_len = kvamap[i].end - va;
 			len = (va_len  len) ? len - va_len : 0;
 			*new_va = kvamap[i].end;
 		}
 	}
 
-	return (len);
+	return len;
 }
 
 /*

Index: src/sys/arch/sparc/stand/ofwboot/version
diff -u src/sys/arch/sparc/stand/ofwboot/version:1.20 src/sys/arch/sparc/stand/ofwboot/version:1.20.4.1
--- src/sys/arch/sparc/stand/ofwboot/version:1.20	Sun Dec  8 14:41:28 2013
+++ src/sys/arch/sparc/stand/ofwboot/version	Mon Jul 20 06:12:23 2015
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.20 2013/12/08 14:41:28 palle Exp $
+$NetBSD: version,v 1.20.4.1 2015/07/20 06:12:23 snj Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
@@ -21,3 +21,4 @@ is taken as the current.
 1.15:	Properly close the firmware handle before starting the kernel
 1.16:	Add support to boot with root on cd9660
 1.17:	Add support for sun4v architecture
+1.18:	Fix loading of kernels with huge .bss

Index: src/sys/arch/sparc64/include/cpu.h
diff -u src/sys/arch/sparc64/include/cpu.h:1.111 src/sys/arch/sparc64/include/cpu.h:1.111.2.1
--- src/sys/arch/sparc64/include/cpu.h:1.111	Sun Jun  8 17:33:24 2014
+++ src/sys/arch/sparc64/include/cpu.h	Mon Jul 20 06:12:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.111 2014/06/08 17:33:24 palle Exp $ */
+/*	$NetBSD: cpu.h,v 1.111.2.1 2015/07/20 06:12:23 snj Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -261,7 +261,7 @@ extern vaddr_t cpu_spinup_trampoline;
 
 extern  char   *mp_tramp_code;
 extern  u_long  mp_tramp_code_len;
-extern  u_long  mp_tramp_tlb_slots;
+extern  u_long  mp_tramp_dtlb_slots, mp_tramp_itlb_slots;
 extern  u_long  mp_tramp_func;
 extern  u_long  mp_tramp_ci;
 

Index: src/sys/arch/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.198.2.2 src/sys/arch/sparc64/sparc64/autoconf.c:1.198.2.3
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.198.2.2	Sat Mar 21 17:32:13 2015
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Mon Jul 20 06:12:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.198.2.2 2015/03/21 17:32:13 snj Exp $ */
+/*	$NetBSD: autoconf.c,v 1.198.2.3 2015/07/20 06:12:23 snj Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.198.2.2 2015/03/21 17:32:13 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.198.2.3 2015/07/20 06:12:23 snj Exp $);
 
 #include 

CVS commit: xsrc/external/mit/xf86-video-ast/dist/src

2015-07-20 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Mon Jul 20 08:33:18 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-ast/dist/src: ast_accel.c

Log Message:
Remove merge artifact.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-ast/dist/src/ast_accel.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-ast/dist/src/ast_accel.c
diff -u xsrc/external/mit/xf86-video-ast/dist/src/ast_accel.c:1.3 xsrc/external/mit/xf86-video-ast/dist/src/ast_accel.c:1.4
--- xsrc/external/mit/xf86-video-ast/dist/src/ast_accel.c:1.3	Mon Jul 20 00:10:28 2015
+++ xsrc/external/mit/xf86-video-ast/dist/src/ast_accel.c	Mon Jul 20 08:33:18 2015
@@ -54,8 +54,6 @@
 #include ast.h
 #include ast_2dtool.h
 
-extern UCHAR *pjRequestCMDQ(ASTRecPtr pAST, ULONG ulDataLen);
-
 #ifdef	Accel_2D
 
 #ifdef HAVE_XAA_H



CVS commit: src/share/mk

2015-07-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jul 20 12:20:26 UTC 2015

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
Simplify the build of library archives by no longer doing a topological
sort.


To generate a diff of this commit:
cvs rdiff -u -r1.358 -r1.359 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.358 src/share/mk/bsd.lib.mk:1.359
--- src/share/mk/bsd.lib.mk:1.358	Thu Jun  4 06:01:24 2015
+++ src/share/mk/bsd.lib.mk	Mon Jul 20 12:20:26 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.358 2015/06/04 06:01:24 mrg Exp $
+#	$NetBSD: bsd.lib.mk,v 1.359 2015/07/20 12:20:26 joerg Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -542,7 +542,7 @@ _INSTRANLIB=${empty(PRESERVE):?-a ${RAN
 __archivebuild: .USE
 	${_MKTARGET_BUILD}
 	rm -f ${.TARGET}
-	${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
+	${AR} ${_ARFL} ${.TARGET} ${.ALLSRC:M*o:O}
 .endif
 
 .if !target(__archiveinstall)



CVS commit: src/external/bsd/ntp/dist/ntpd

2015-07-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jul 20 13:13:31 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_timer.c

Log Message:
Don't use fabs on integers.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/ntpd/ntp_timer.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/bsd/ntp/dist/ntpd/ntp_timer.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.3 src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.4
--- src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.3	Fri Jul 10 14:20:32 2015
+++ src/external/bsd/ntp/dist/ntpd/ntp_timer.c	Mon Jul 20 13:13:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_timer.c,v 1.3 2015/07/10 14:20:32 christos Exp $	*/
+/*	$NetBSD: ntp_timer.c,v 1.4 2015/07/20 13:13:31 joerg Exp $	*/
 
 /*
  * ntp_timer.c - event timer support routines
@@ -624,7 +624,7 @@ check_leapsec(
 		const char *leapmsg = NULL;
 		if (lsdata.warped  0) {
 			if (clock_max_back  0.0 
-			clock_max_back  fabs(lsdata.warped)) {
+			clock_max_back  abs(lsdata.warped)) {
 step_systime(lsdata.warped);
 leapmsg = leapmsg_p_step;
 			} else {
@@ -632,7 +632,7 @@ check_leapsec(
 			}
 		} else 	if (lsdata.warped  0) {
 			if (clock_max_fwd  0.0 
-			clock_max_fwd  fabs(lsdata.warped)) {
+			clock_max_fwd  abs(lsdata.warped)) {
 step_systime(lsdata.warped);
 leapmsg = leapmsg_n_step;
 			} else {



CVS commit: src/lib/libc/time

2015-07-20 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Mon Jul 20 14:37:11 UTC 2015

Modified Files:
src/lib/libc/time: strptime.c

Log Message:
KNF and additional comments


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/time/strptime.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/libc/time/strptime.c
diff -u src/lib/libc/time/strptime.c:1.45 src/lib/libc/time/strptime.c:1.46
--- src/lib/libc/time/strptime.c:1.45	Wed Jul 15 13:54:38 2015
+++ src/lib/libc/time/strptime.c	Mon Jul 20 14:37:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $	*/
+/*	$NetBSD: strptime.c,v 1.46 2015/07/20 14:37:11 ginsbach Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $);
+__RCSID($NetBSD: strptime.c,v 1.46 2015/07/20 14:37:11 ginsbach Exp $);
 #endif
 
 #include namespace.h
@@ -50,6 +50,10 @@ __weak_alias(strptime,_strptime)
 __weak_alias(strptime_l, _strptime_l)
 #endif
 
+static const u_char *conv_num(const unsigned char *, int *, uint, uint);
+static const u_char *find_string(const u_char *, int *, const char * const *,
+	const char * const *, int);
+
 #define _TIME_LOCALE(loc) \
 ((_TimeLocale *)((loc)-part_impl[(size_t)LC_TIME]))
 
@@ -83,12 +87,14 @@ static const char * const nadt[5] = {
EDT,CDT,MDT,PDT,\0\0\0
 };
 
-static const u_char *conv_num(const unsigned char *, int *, uint, uint);
-static const u_char *find_string(const u_char *, int *, const char * const *,
-	const char * const *, int);
-
+/*
+ * Table to determine the ordinal date for the start of a month.
+ * Ref: http://en.wikipedia.org/wiki/ISO_week_date
+ */
 static const int start_of_month[2][13] = {
+	/* non-leap year */
 	{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
+	/* leap year */
 	{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
 };
 
@@ -586,11 +592,13 @@ literal:
 
 	if (!HAVE_YDAY(state)  HAVE_YEAR(state)) {
 		if (HAVE_MON(state)  HAVE_MDAY(state)) {
+			/* calculate day of year (ordinal date) */
 			tm-tm_yday =  start_of_month[isleap_sum(tm-tm_year,
 			TM_YEAR_BASE)][tm-tm_mon] + (tm-tm_mday - 1);
 			state |= S_YDAY;
 		} else if (day_offset != -1) {
-			/* Set the date to the first Sunday (or Monday)
+			/*
+			 * Set the date to the first Sunday (or Monday)
 			 * of the specified week of the year.
 			 */
 			if (!HAVE_WDAY(state)) {
@@ -607,7 +615,9 @@ literal:
 
 	if (HAVE_YDAY(state)  HAVE_YEAR(state)) {
 		int isleap;
+
 		if (!HAVE_MON(state)) {
+			/* calculate month of day of year */
 			i = 0;
 			isleap = isleap_sum(tm-tm_year, TM_YEAR_BASE);
 			while (tm-tm_yday = start_of_month[isleap][i])
@@ -620,13 +630,17 @@ literal:
 			tm-tm_mon = i - 1;
 			state |= S_MON;
 		}
+
 		if (!HAVE_MDAY(state)) {
+			/* calculate day of month */
 			isleap = isleap_sum(tm-tm_year, TM_YEAR_BASE);
 			tm-tm_mday = tm-tm_yday -
 			start_of_month[isleap][tm-tm_mon] + 1;
 			state |= S_MDAY;
 		}
+
 		if (!HAVE_WDAY(state)) {
+			/* calculate day of week */
 			i = 0;
 			week_offset = first_wday_of(tm-tm_year);
 			while (i++ = tm-tm_yday) {



CVS commit: src/external/bsd/ntp/dist/libntp

2015-07-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 20 15:35:00 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/libntp: work_fork.c

Log Message:
we set SIGCHLD to SIG_IGN so we are not going to generate zombies so it
will be an error to wait.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/libntp/work_fork.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/bsd/ntp/dist/libntp/work_fork.c
diff -u src/external/bsd/ntp/dist/libntp/work_fork.c:1.6 src/external/bsd/ntp/dist/libntp/work_fork.c:1.7
--- src/external/bsd/ntp/dist/libntp/work_fork.c:1.6	Fri Jul 17 11:17:07 2015
+++ src/external/bsd/ntp/dist/libntp/work_fork.c	Mon Jul 20 11:35:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: work_fork.c,v 1.6 2015/07/17 15:17:07 christos Exp $	*/
+/*	$NetBSD: work_fork.c,v 1.7 2015/07/20 15:35:00 christos Exp $	*/
 
 /*
  * work_fork.c - fork implementation for blocking worker child.
@@ -127,7 +127,13 @@ harvest_child_status(
 		/* Wait on the child so it can finish terminating */
 		if (waitpid(c-pid, NULL, 0) == c-pid)
 			TRACE(4, (harvested child %d\n, c-pid));
-		else msyslog(LOG_ERR, error waiting on child %d: %m, c-pid);
+		else if (errno != ECHILD) {
+			/*
+			 * SIG_IGN on SIGCHLD on some os's means do not wait
+			 * but reap automaticallyi
+			 */
+			msyslog(LOG_ERR, error waiting on child %d: %m, c-pid);
+		}
 		c-pid = 0;
 	}
 }



CVS commit: src/distrib/zaurus/ramdisk

2015-07-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 21 01:53:44 UTC 2015

Modified Files:
src/distrib/zaurus/ramdisk: Makefile

Log Message:
Adding -DNDEBUG saves about 5KB of text and disable asserts.
Adding -mthumb -mthumb-interwork, knowing this is Xscale which
has thumb, saves about 340KB of text.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/distrib/zaurus/ramdisk/Makefile

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

Modified files:

Index: src/distrib/zaurus/ramdisk/Makefile
diff -u src/distrib/zaurus/ramdisk/Makefile:1.19 src/distrib/zaurus/ramdisk/Makefile:1.20
--- src/distrib/zaurus/ramdisk/Makefile:1.19	Sun Jul 19 09:23:53 2015
+++ src/distrib/zaurus/ramdisk/Makefile	Tue Jul 21 01:53:44 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2015/07/19 09:23:53 martin Exp $
+#	$NetBSD: Makefile,v 1.20 2015/07/21 01:53:44 matt Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -9,6 +9,8 @@ MAKEFS_FLAGS=	-f 14
 
 WARNS=		1
 DBG=		-Os
+DBG+=		-mthumb -mthumb-interwork
+DBG+=		-DNDEBUG
 
 CRUNCHBIN=	ramdiskbin
 LISTS=		${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst



CVS commit: src/sys/dev/mii

2015-07-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 21 02:04:24 UTC 2015

Modified Files:
src/sys/dev/mii: mii.h

Log Message:
 Fix typos reported by yuo@.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/mii/mii.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/mii/mii.h
diff -u src/sys/dev/mii/mii.h:1.18 src/sys/dev/mii/mii.h:1.19
--- src/sys/dev/mii/mii.h:1.18	Mon Jun 16 14:43:22 2014
+++ src/sys/dev/mii/mii.h	Tue Jul 21 02:04:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii.h,v 1.18 2014/06/16 14:43:22 msaitoh Exp $	*/
+/*	$NetBSD: mii.h,v 1.19 2015/07/21 02:04:24 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.  All rights reserved.
@@ -198,9 +198,9 @@
 #define	PSECR_PSEDIS	0x	/* PSE Disabled */
 
 #define	MII_PSESR	0x0c	/* PSE status register */
-#define	PSESR_PWRDENIED	0x1000	/* Power Deined */
+#define	PSESR_PWRDENIED	0x1000	/* Power Denied */
 #define	PSESR_VALSIG	0x0800	/* Valid PD signature detected */
-#define	PSESR_INVALSIG	0x0400	/* Inalid PD signature detected */
+#define	PSESR_INVALSIG	0x0400	/* Invalid PD signature detected */
 #define	PSESR_SHORTCIRC	0x0200	/* Short circuit condition detected */
 #define	PSESR_OVERLOAD	0x0100	/* Overload condition detected */
 #define	PSESR_MPSABSENT	0x0080	/* MPS absent condition detected */



CVS commit: src/external/mit/xorg

2015-07-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 20 23:50:23 UTC 2015

Modified Files:
src/external/mit/xorg: xorg-pkg-ver.mk
src/external/mit/xorg/bin/appres: Makefile
src/external/mit/xorg/bin/bdftopcf: Makefile
src/external/mit/xorg/bin/iceauth: Makefile
src/external/mit/xorg/bin/mkfontscale: Makefile
src/external/mit/xorg/bin/xkbcomp: Makefile
src/external/mit/xorg/bin/xkbutils: Makefile.xkbutils
src/external/mit/xorg/bin/xmag: Makefile
src/external/mit/xorg/bin/xman: Makefile

Log Message:
add PACKAGE_NAME support to xorg-pkg-ver.mk.
switch to using xorg-pkg-ver.mk.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/xorg-pkg-ver.mk
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/bin/appres/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/bdftopcf/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/iceauth/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/bin/mkfontscale/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/mit/xorg/bin/xkbcomp/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/bin/xkbutils/Makefile.xkbutils
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/xmag/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/bin/xman/Makefile

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

Modified files:

Index: src/external/mit/xorg/xorg-pkg-ver.mk
diff -u src/external/mit/xorg/xorg-pkg-ver.mk:1.3 src/external/mit/xorg/xorg-pkg-ver.mk:1.4
--- src/external/mit/xorg/xorg-pkg-ver.mk:1.3	Mon Jul 20 04:10:40 2015
+++ src/external/mit/xorg/xorg-pkg-ver.mk	Mon Jul 20 23:50:22 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: xorg-pkg-ver.mk,v 1.3 2015/07/20 04:10:40 mrg Exp $
+#	$NetBSD: xorg-pkg-ver.mk,v 1.4 2015/07/20 23:50:22 mrg Exp $
 
 # when including this make sure PROG is set so that $X11SRCDIR.$PROG
 # is a valid setting.  set XORG_PKG_VER_PROG if PROG is wrong.
@@ -32,4 +32,15 @@ XORG_PKG_PACKAGE_STRING!= \
 CPPFLAGS+=	-DPACKAGE_STRING=\${XORG_PKG_PACKAGE_STRING:Q}\
 .endif
 
+XORG_PKG_PACKAGE_NAME!= \
+	awk -F= '/^PACKAGE_NAME=/ {\
+	 match($$2, '''[a-zA-Z-_0-9]+''');		\
+	 name = substr($$2, RSTART, RLENGTH);		\
+	 print name;	\
+	 exit 0;		\
+	}' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
+.if !empty(XORG_PKG_PACKAGE_NAME)
+CPPFLAGS+=	-DPACKAGE_NAME=\${XORG_PKG_PACKAGE_NAME:Q}\
+.endif
+
 .endif

Index: src/external/mit/xorg/bin/appres/Makefile
diff -u src/external/mit/xorg/bin/appres/Makefile:1.4 src/external/mit/xorg/bin/appres/Makefile:1.5
--- src/external/mit/xorg/bin/appres/Makefile:1.4	Wed Jan 22 15:23:06 2014
+++ src/external/mit/xorg/bin/appres/Makefile	Mon Jul 20 23:50:22 2015
@@ -1,16 +1,16 @@
-#	$NetBSD: Makefile,v 1.4 2014/01/22 15:23:06 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2015/07/20 23:50:22 mrg Exp $
 
 .include bsd.own.mk
 
 PROG=	appres
 
-CPPFLAGS+=	-I${X11SRCDIR.${PROG}}/../include -DHAVE_CONFIG_H
-
 LDADD+=	-lXt -lSM -lICE -lXext -lX11 -lxcb -lXdmcp -lXau
 DPADD+=	${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11} ${LIBXCB} ${LIBXDMCP} ${LIBXAU}
 
 .PATH:	${X11SRCDIR.${PROG}}
 .PATH:	${X11SRCDIR.${PROG}}/man
 
+.include ../../xorg-pkg-ver.mk
+
 .include bsd.x11.mk
 .include bsd.prog.mk

Index: src/external/mit/xorg/bin/bdftopcf/Makefile
diff -u src/external/mit/xorg/bin/bdftopcf/Makefile:1.3 src/external/mit/xorg/bin/bdftopcf/Makefile:1.4
--- src/external/mit/xorg/bin/bdftopcf/Makefile:1.3	Fri May 31 05:24:49 2013
+++ src/external/mit/xorg/bin/bdftopcf/Makefile	Mon Jul 20 23:50:22 2015
@@ -1,16 +1,16 @@
-#	$NetBSD: Makefile,v 1.3 2013/05/31 05:24:49 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2015/07/20 23:50:22 mrg Exp $
 
 .include bsd.own.mk
 
 PROG=	bdftopcf
 
-CPPFLAGS+=	-I${X11SRCDIR.${PROG}}/../include -DHAVE_CONFIG_H
-
 LDADD+=	-lXfont -lfontenc -lfreetype -lm -lz -lbz2
 DPADD+=	${LIBXFONT} ${LIBFONTENC} ${LIBFREETYPE} ${LIBM} ${LIBZ} ${LIBBZ2}
 
 .PATH:	${X11SRCDIR.${PROG}}
 .PATH:	${X11SRCDIR.${PROG}}/man
 
+.include ../../xorg-pkg-ver.mk
+
 .include bsd.x11.mk
 .include bsd.prog.mk

Index: src/external/mit/xorg/bin/iceauth/Makefile
diff -u src/external/mit/xorg/bin/iceauth/Makefile:1.3 src/external/mit/xorg/bin/iceauth/Makefile:1.4
--- src/external/mit/xorg/bin/iceauth/Makefile:1.3	Fri Jul 17 08:29:31 2015
+++ src/external/mit/xorg/bin/iceauth/Makefile	Mon Jul 20 23:50:23 2015
@@ -1,16 +1,16 @@
-#	$NetBSD: Makefile,v 1.3 2015/07/17 08:29:31 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2015/07/20 23:50:23 mrg Exp $
 
 .include bsd.own.mk
 
 PROG=	iceauth
 SRCS=	iceauth.c process.c
 
-CPPFLAGS+=	-I${X11SRCDIR.${PROG}}/../include -DHAVE_CONFIG_H
-
 LDADD+=	-lICE
 DPADD+=	${LIBICE}
 
 .PATH:	${X11SRCDIR.${PROG}} ${X11SRCDIR.${PROG}}/man
 
+.include ../../xorg-pkg-ver.mk
+
 .include bsd.x11.mk
 .include bsd.prog.mk

Index: src/external/mit/xorg/bin/mkfontscale/Makefile
diff -u src/external/mit/xorg/bin/mkfontscale/Makefile:1.4 

CVS commit: xsrc/external/mit/xmag/dist

2015-07-20 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Mon Jul 20 23:49:02 UTC 2015

Modified Files:
xsrc/external/mit/xmag/dist: Scale.c xmag.c

Log Message:
protect config.h with HAVE_CONFIG_H.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/xmag/dist/Scale.c \
xsrc/external/mit/xmag/dist/xmag.c

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

Modified files:

Index: xsrc/external/mit/xmag/dist/Scale.c
diff -u xsrc/external/mit/xmag/dist/Scale.c:1.1.1.4 xsrc/external/mit/xmag/dist/Scale.c:1.2
--- xsrc/external/mit/xmag/dist/Scale.c:1.1.1.4	Sun Jul 19 23:00:53 2015
+++ xsrc/external/mit/xmag/dist/Scale.c	Mon Jul 20 23:49:02 2015
@@ -30,7 +30,9 @@ from The Open Group.
  * Author:  Davor Matic, MIT X Consortium
  */
 
+#ifdef HAVE_CONFIG_H
 #include config.h
+#endif
 
 #include stdio.h
 #include ctype.h
Index: xsrc/external/mit/xmag/dist/xmag.c
diff -u xsrc/external/mit/xmag/dist/xmag.c:1.1.1.4 xsrc/external/mit/xmag/dist/xmag.c:1.2
--- xsrc/external/mit/xmag/dist/xmag.c:1.1.1.4	Sun Jul 19 23:00:53 2015
+++ xsrc/external/mit/xmag/dist/xmag.c	Mon Jul 20 23:49:02 2015
@@ -26,7 +26,9 @@ from The Open Group.
 
 */
 
+#ifdef HAVE_CONFIG_H
 #include config.h
+#endif
 
 #include stdlib.h		/* for exit() and abs() */
 #include stdio.h



CVS commit: src/external/mit/xorg/lib/xkeyboard-config/rules

2015-07-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 20 22:45:10 UTC 2015

Modified Files:
src/external/mit/xorg/lib/xkeyboard-config/rules: base base.lst evdev
evdev.lst

Log Message:
rebuild these for xkeyboard-config 2.15.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/mit/xorg/lib/xkeyboard-config/rules/base \
src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst \
src/external/mit/xorg/lib/xkeyboard-config/rules/evdev \
src/external/mit/xorg/lib/xkeyboard-config/rules/evdev.lst

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

Modified files:

Index: src/external/mit/xorg/lib/xkeyboard-config/rules/base
diff -u src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.8 src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.9
--- src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.8	Fri Jul 11 19:14:09 2014
+++ src/external/mit/xorg/lib/xkeyboard-config/rules/base	Mon Jul 20 22:45:10 2015
@@ -1118,6 +1118,10 @@
   ctrl:rctrl_ralt	=	+ctrl(rctrl_ralt)
   ctrl:menu_rctrl	=	+ctrl(menu_rctrl)
   ctrl:ralt_rctrl	=	+ctrl(ralt_rctrl)
+  ctrl:swap_lalt_lctl	=	+ctrl(swap_lalt_lctl)
+  ctrl:swap_lwin_lctl	=	+ctrl(swap_lwin_lctl)
+  ctrl:swap_rwin_rctl	=	+ctrl(swap_rwin_rctl)
+  ctrl:swap_lalt_lctl_lwin  =	+ctrl(swap_lalt_lctl_lwin)
   compose:ralt		=	+compose(ralt)
   compose:lwin		=	+compose(lwin)
   compose:lwin-altgr	=	+compose(lwin-altgr)
@@ -1160,6 +1164,8 @@
   nbsp:level4nl =	+nbsp(level4nl)
   japan:nicola_f_bs =	+jp(nicola_f_bs)
   japan:hztg_escape =	+jp(hztg_escape)
+  korean:ralt_rctrl =	+kr(ralt_hangul)+kr(rctrl_hanja)
+  korean:rctrl_ralt =	+kr(rctrl_hangul)+kr(ralt_hanja)
   kpdl:dot  =	+kpdl(dot)
   kpdl:comma=	+kpdl(comma)
   kpdl:dotoss   =	+kpdl(dotoss)
Index: src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst
diff -u src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst:1.8 src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst:1.9
--- src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst:1.8	Fri Jul 11 19:14:09 2014
+++ src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst	Mon Jul 20 22:45:10 2015
@@ -112,7 +112,7 @@
   mx1998  Memorex MX1998
   mx2500  Memorex MX2500 EZ-Access Keyboard
   mx2750  Memorex MX2750
-  microsoft4000   Microsoft Natural Wireless Ergonomic Keyboard 4000
+  microsoft4000   Microsoft Natural Ergonomic Keyboard 4000
   microsoft7000   Microsoft Natural Wireless Ergonomic Keyboard 7000
   microsoftinet   Microsoft Internet Keyboard
   microsoftproMicrosoft Natural Keyboard Pro / Microsoft Internet Keyboard Pro
@@ -311,6 +311,7 @@
   qwerty  ara: Arabic (qwerty)
   qwerty_digits   ara: Arabic (qwerty/digits)
   buckwalter  ara: Arabic (Buckwalter)
+  mac ara: Arabic (Macintosh)
   plisi-d1al: Albanian (Plisi D1)
   phoneticam: Armenian (phonetic)
   phonetic-altam: Armenian (alternative phonetic)
@@ -500,6 +501,7 @@
   102_qwerty_dot_nodead hu: Hungarian (102/qwerty/dot/eliminate dead keys)
   Sundeadkeys is: Icelandic (Sun dead keys)
   nodeadkeys  is: Icelandic (eliminate dead keys)
+  mac_legacy  is: Icelandic (Macintosh, legacy)
   mac is: Icelandic (Macintosh)
   dvorak  is: Icelandic (Dvorak)
   lyx il: Hebrew (lyx)
@@ -523,6 +525,7 @@
   nodeadkeys  latam: Spanish (Latin American, eliminate dead keys)
   deadtilde   latam: Spanish (Latin American, include dead tilde)
   sundeadkeys latam: Spanish (Latin American, Sun dead keys)
+  dvorak  latam: Spanish (Latin American, Dvorak)
   std lt: Lithuanian (standard)
   us  lt: Lithuanian (US keyboard with Lithuanian letters)
   ibm lt: Lithuanian (IBM LST 1205-92)
@@ -591,6 +594,8 @@
   srp ru: Serbian (Russia)
   bak ru: Bashkirian
   chm ru: Mari
+  phonetic_azerty ru: Russian (phonetic azerty)
+  phonetic_fr ru: Russian (phonetic French)
   yz  rs: Serbian (Cyrillic, ZE and ZHE swapped)
   latin   rs: Serbian (Latin)
   latinunicoders: Serbian (Latin Unicode)
@@ -636,6 +641,7 @@
   legacy  tj: Tajik (legacy)
   tam_unicode lk: Tamil (Sri Lanka, Unicode)
   tam_TAB lk: Tamil (Sri Lanka, TAB Typewriter)
+  us  lk: Sinhala (US keyboard with Sinhala letters)
   tis th: Thai (TIS-820.2538)
   pat th: Thai (Pattachote)
   f   tr: Turkish (F)
@@ -762,6 +768,7 @@
   ctrl:ctrl_ralt   Right Alt as Right Ctrl
   ctrl:swap_lalt_lctl  Swap Left Alt key with Left Ctrl key
   ctrl:swap_lwin_lctl  Swap Left Win key with Left Ctrl key
+  ctrl:swap_rwin_rctl  Swap Right Win key with Right Ctrl key
   ctrl:swap_lalt_lctl_lwin Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt
   grp_led  Use 

CVS commit: xsrc/external/mit

2015-07-20 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Mon Jul 20 23:49:32 UTC 2015

Removed Files:
xsrc/external/mit/appres/include: config.h
xsrc/external/mit/bdftopcf/include: config.h
xsrc/external/mit/iceauth/include: config.h
xsrc/external/mit/mkfontscale/include: config.h
xsrc/external/mit/xkbcomp/include: config.h
xsrc/external/mit/xkbutils/include: config.h
xsrc/external/mit/xmag/include: config.h
xsrc/external/mit/xman/include: config.h

Log Message:
remove no longer used files.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 xsrc/external/mit/appres/include/config.h
cvs rdiff -u -r1.1 -r0 xsrc/external/mit/bdftopcf/include/config.h
cvs rdiff -u -r1.1 -r0 xsrc/external/mit/iceauth/include/config.h
cvs rdiff -u -r1.2 -r0 xsrc/external/mit/mkfontscale/include/config.h
cvs rdiff -u -r1.4 -r0 xsrc/external/mit/xkbcomp/include/config.h
cvs rdiff -u -r1.1 -r0 xsrc/external/mit/xkbutils/include/config.h
cvs rdiff -u -r1.4 -r0 xsrc/external/mit/xmag/include/config.h
cvs rdiff -u -r1.2 -r0 xsrc/external/mit/xman/include/config.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

2015-07-20 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Jul 21 03:10:42 UTC 2015

Modified Files:
src/sys/arch/x86/include: pci_machdep_common.h
src/sys/arch/x86/pci: pci_intr_machdep.c

Log Message:
add pci_intr_alloc() API


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/include/pci_machdep_common.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/pci/pci_intr_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/x86/include/pci_machdep_common.h
diff -u src/sys/arch/x86/include/pci_machdep_common.h:1.18 src/sys/arch/x86/include/pci_machdep_common.h:1.19
--- src/sys/arch/x86/include/pci_machdep_common.h:1.18	Fri May 15 08:36:41 2015
+++ src/sys/arch/x86/include/pci_machdep_common.h	Tue Jul 21 03:10:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep_common.h,v 1.18 2015/05/15 08:36:41 knakahara Exp $	*/
+/*	$NetBSD: pci_machdep_common.h,v 1.19 2015/07/21 03:10:42 knakahara Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -120,6 +120,15 @@ void		*pci_intr_establish(pci_chipset_ta
 void		pci_intr_disestablish(pci_chipset_tag_t, void *);
 int		pci_intr_distribute(void *, const kcpuset_t *, kcpuset_t *);
 
+typedef enum {
+	PCI_INTR_TYPE_INTX = 0,
+	PCI_INTR_TYPE_MSI,
+	PCI_INTR_TYPE_MSIX,
+	PCI_INTR_TYPE_SIZE,
+} pci_intr_type_t;
+
+pci_intr_type_t	pci_intr_type(pci_intr_handle_t);
+
 /*
  * If device drivers use MSI/MSI-X, they should use these API for INTx
  * instead of pci_intr_map(), because of conforming the pci_intr_handle
@@ -128,6 +137,13 @@ int		pci_intr_distribute(void *, const k
 int		pci_intx_alloc(const struct pci_attach_args *,
 		pci_intr_handle_t **);
 
+/*
+ * Wrapper function for generally unitied allocation to fallback MSI-X/MSI/INTx
+ * automatically.
+ */
+int		pci_intr_alloc(const struct pci_attach_args *,
+		pci_intr_handle_t **, int *, pci_intr_type_t);
+
 /* experimental MSI support */
 int		pci_msi_count(const struct pci_attach_args *);
 int		pci_msi_alloc(const struct pci_attach_args *,

Index: src/sys/arch/x86/pci/pci_intr_machdep.c
diff -u src/sys/arch/x86/pci/pci_intr_machdep.c:1.33 src/sys/arch/x86/pci/pci_intr_machdep.c:1.34
--- src/sys/arch/x86/pci/pci_intr_machdep.c:1.33	Fri May 15 08:36:41 2015
+++ src/sys/arch/x86/pci/pci_intr_machdep.c	Tue Jul 21 03:10:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_intr_machdep.c,v 1.33 2015/05/15 08:36:41 knakahara Exp $	*/
+/*	$NetBSD: pci_intr_machdep.c,v 1.34 2015/07/21 03:10:42 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.33 2015/05/15 08:36:41 knakahara Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.34 2015/07/21 03:10:42 knakahara Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -350,6 +350,20 @@ pci_intr_distribute(void *cookie, const 
 }
 
 #if NIOAPIC  0
+pci_intr_type_t
+pci_intr_type(pci_intr_handle_t ih)
+{
+
+	if (INT_VIA_MSI(ih)) {
+		if (MSI_INT_IS_MSIX(ih))
+			return PCI_INTR_TYPE_MSIX;
+		else
+			return PCI_INTR_TYPE_MSI;
+	} else {
+		return PCI_INTR_TYPE_INTX;
+	}
+}
+
 static void
 x86_pci_intx_release(pci_chipset_tag_t pc, pci_intr_handle_t *pih)
 {
@@ -404,6 +418,112 @@ error:
 	return error;
 }
 
+/*
+ * Interrupt handler allocation utility. This function calls each allocation
+ * function as specified by arguments.
+ * Currently callee functions are pci_intx_alloc(), pci_msi_alloc_exact(),
+ * and pci_msix_alloc_exact().
+ * pa   : pci_attach_args
+ * ihps : interrupt handlers
+ * counts   : The array of number of required interrupt handlers.
+ *It is overwritten by allocated the number of handlers.
+ *CAUTION: The size of counts[] must be PCI_INTR_TYPE_SIZE.
+ * max_type : max type of using interrupts. See below.
+ * e.g.
+ * If you want to use 5 MSI-X, 1 MSI, or INTx, you use counts as
+ * int counts[PCI_INTR_TYPE_SIZE];
+ * counts[PCI_INTR_TYPE_MSIX] = 5;
+ * counts[PCI_INTR_TYPE_MSI] = 1;
+ * counts[PCI_INTR_TYPE_INTX] = 1;
+ * error = pci_intr_alloc(pa, ihps, counts, PCI_INTR_TYPE_MSIX);
+ *
+ * If you want to use hardware max number MSI-X or 1 MSI,
+ * and not to use INTx, you use counts as
+ * int counts[PCI_INTR_TYPE_SIZE];
+ * counts[PCI_INTR_TYPE_MSIX] = -1;
+ * counts[PCI_INTR_TYPE_MSI] = 1;
+ * counts[PCI_INTR_TYPE_INTX] = 0;
+ * error = pci_intr_alloc(pa, ihps, counts, PCI_INTR_TYPE_MSIX);
+ *
+ * If you want to use 3 MSI or INTx, you can use counts as
+ * int counts[PCI_INTR_TYPE_SIZE];
+ * counts[PCI_INTR_TYPE_MSI] = 3;
+ * counts[PCI_INTR_TYPE_INTX] = 1;
+ * error = pci_intr_alloc(pa, ihps, counts, 

CVS commit: src

2015-07-20 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Jul 21 03:12:50 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile pci_msi.9

Log Message:
add pci_intr_alloc() man


To generate a diff of this commit:
cvs rdiff -u -r1.1970 -r1.1971 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.388 -r1.389 src/share/man/man9/Makefile
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/pci_msi.9

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1970 src/distrib/sets/lists/comp/mi:1.1971
--- src/distrib/sets/lists/comp/mi:1.1970	Sun Jul 12 08:11:27 2015
+++ src/distrib/sets/lists/comp/mi	Tue Jul 21 03:12:50 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1970 2015/07/12 08:11:27 hannken Exp $
+#	$NetBSD: mi,v 1.1971 2015/07/21 03:12:50 knakahara Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -10618,12 +10618,15 @@
 ./usr/share/man/cat9/pci_get_capability.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_get_powerstate.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr.0			comp-sys-catman		.cat
+./usr/share/man/cat9/pci_intr_alloc.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr_disestablish.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr_distribute.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr_establish.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr_evcnt.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr_map.0		comp-sys-catman		.cat
+./usr/share/man/cat9/pci_intr_release.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intr_string.0		comp-sys-catman		.cat
+./usr/share/man/cat9/pci_intr_type.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intx_alloc.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_intx_release.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pci_make_tag.0		comp-sys-catman		.cat
@@ -17422,12 +17425,15 @@
 ./usr/share/man/html9/pci_get_capability.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_get_powerstate.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr.html		comp-sys-htmlman	html
+./usr/share/man/html9/pci_intr_alloc.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr_disestablish.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr_distribute.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr_establish.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr_evcnt.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr_map.html		comp-sys-htmlman	html
+./usr/share/man/html9/pci_intr_release.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intr_string.html	comp-sys-htmlman	html
+./usr/share/man/html9/pci_intr_type.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intx_alloc.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_intx_release.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pci_make_tag.html		comp-sys-htmlman	html
@@ -24391,12 +24397,15 @@
 ./usr/share/man/man9/pci_get_capability.9	comp-sys-man		.man
 ./usr/share/man/man9/pci_get_powerstate.9	comp-sys-man		.man
 ./usr/share/man/man9/pci_intr.9			comp-sys-man		.man
+./usr/share/man/man9/pci_intr_alloc.9		comp-sys-man		.man
 ./usr/share/man/man9/pci_intr_disestablish.9	comp-sys-man		.man
 ./usr/share/man/man9/pci_intr_distribute.9	comp-sys-man		.man
 ./usr/share/man/man9/pci_intr_establish.9	comp-sys-man		.man
 ./usr/share/man/man9/pci_intr_evcnt.9		comp-sys-man		.man
 ./usr/share/man/man9/pci_intr_map.9		comp-sys-man		.man
+./usr/share/man/man9/pci_intr_release.9		comp-sys-man		.man
 ./usr/share/man/man9/pci_intr_string.9		comp-sys-man		.man
+./usr/share/man/man9/pci_intr_type.9		comp-sys-man		.man
 ./usr/share/man/man9/pci_intx_alloc.9		comp-sys-man		.man
 ./usr/share/man/man9/pci_intx_release.9		comp-sys-man		.man
 ./usr/share/man/man9/pci_make_tag.9		comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.388 src/share/man/man9/Makefile:1.389
--- src/share/man/man9/Makefile:1.388	Sun Jul 12 08:11:27 2015
+++ src/share/man/man9/Makefile	Tue Jul 21 03:12:50 2015
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.388 2015/07/12 08:11:27 hannken Exp $
+#   $NetBSD: Makefile,v 1.389 2015/07/21 03:12:50 knakahara Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -578,6 +578,9 @@ MLINKS+=pci.9 pci_conf_read.9 \
 	pci.9 PCI_PRODUCT.9 \
 	pci.9 PCI_REVISION.9
 MLINKS+=pci_msi.9 pci_msix.9 \
+	pci_msi.9 pci_intr_alloc.9 \
+	pci_msi.9 pci_intr_release.9 \
+	pci_msi.9 pci_intr_type.9 \
 	pci_msi.9 pci_intx_alloc.9 \
 	pci_msi.9 pci_intx_release.9 \
 	pci_msi.9 pci_msi_count.9 \

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.3 src/share/man/man9/pci_msi.9:1.4
--- src/share/man/man9/pci_msi.9:1.3	Fri May 15 08:39:14 2015
+++ src/share/man/man9/pci_msi.9	Tue Jul 21 03:12:50 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: 

CVS commit: src/sys/dev/pci

2015-07-20 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Jul 21 03:15:50 UTC 2015

Modified Files:
src/sys/dev/pci: if_bge.c if_wm.c

Log Message:
mofity for if_wm and if_bge to use pci_intr_alloc()


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.339 -r1.340 src/sys/dev/pci/if_wm.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/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.292 src/sys/dev/pci/if_bge.c:1.293
--- src/sys/dev/pci/if_bge.c:1.292	Sun Jun 14 08:46:33 2015
+++ src/sys/dev/pci/if_bge.c	Tue Jul 21 03:15:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.292 2015/06/14 08:46:33 martin Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.293 2015/07/21 03:15:50 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.292 2015/06/14 08:46:33 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.293 2015/07/21 03:15:50 knakahara Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3341,6 +3341,9 @@ bge_attach(device_t parent, device_t sel
 	pci_chipset_tag_t	pc;
 #ifndef __HAVE_PCI_MSI_MSIX
 	pci_intr_handle_t	ih;
+#else
+	int counts[PCI_INTR_TYPE_SIZE];
+	pci_intr_type_t intr_type, max_type;
 #endif
 	const char		*intrstr = NULL;
 	uint32_t 		hwcfg, hwcfg2, hwcfg3, hwcfg4, hwcfg5;
@@ -3356,9 +3359,6 @@ bge_attach(device_t parent, device_t sel
 	int			capmask;
 	int			mii_flags;
 	int			map_flags;
-#ifdef __HAVE_PCI_MSI_MSIX
-	int			rv;
-#endif
 	char intrbuf[PCI_INTRSTR_LEN];
 
 	bp = bge_lookup(pa);
@@ -3727,27 +3727,19 @@ bge_attach(device_t parent, device_t sel
 	}
 
 #ifdef __HAVE_PCI_MSI_MSIX
-	DPRINTFN(5, (pci_get_capability\n));
+	counts[PCI_INTR_TYPE_MSI] = 1;
+	counts[PCI_INTR_TYPE_INTX] = 1;
 	/* Check MSI capability */
-	if (pci_get_capability(pa-pa_pc, pa-pa_tag, PCI_CAP_MSI,
-		sc-bge_msicap, NULL) != 0) {
-		if (bge_can_use_msi(sc) != 0)
-			sc-bge_flags |= BGEF_MSI;
-	}
-	rv = -1;
-	if (((sc-bge_flags  BGEF_MSI) != 0)  (pci_msi_count(pa)  0)) {
-		DPRINTFN(5, (pci_msi_alloc\n));
-		rv = pci_msi_alloc_exact(pa, sc-bge_pihp, 1);
-		if (rv != 0)
-			sc-bge_flags = ~BGEF_MSI;
-	}
-	if (rv != 0) {
-		DPRINTFN(5, (pci_intx_alloc\n));
-		if (pci_intx_alloc(pa, sc-bge_pihp)) {
-			aprint_error_dev(self, can't map interrupt\n);
-			return;
-		}
-		sc-bge_flags = ~BGEF_MSI;
+	if (bge_can_use_msi(sc) != 0) {
+		max_type = PCI_INTR_TYPE_MSI;
+		sc-bge_flags |= BGEF_MSI;
+	} else
+		max_type = PCI_INTR_TYPE_INTX;
+
+alloc_retry:
+	if (pci_intr_alloc(pa, sc-bge_pihp, counts, max_type) != 0) {
+		aprint_error_dev(sc-bge_dev, couldn't alloc interrupt\n);
+		return;
 	}
 #else	/* !__HAVE_PCI_MSI_MSIX */
 	DPRINTFN(5, (pci_intr_map\n));
@@ -3757,15 +3749,32 @@ bge_attach(device_t parent, device_t sel
 	}
 #endif
 
-#ifdef __HAVE_PCI_MSI_MSIX
 	DPRINTFN(5, (pci_intr_string\n));
+#ifdef __HAVE_PCI_MSI_MSIX
 	intrstr = pci_intr_string(pc, sc-bge_pihp[0], intrbuf,
 	sizeof(intrbuf));
 	DPRINTFN(5, (pci_intr_establish\n));
 	sc-bge_intrhand = pci_intr_establish(pc, sc-bge_pihp[0], IPL_NET,
 	bge_intr, sc);
+	if (sc-bge_intrhand == NULL) {
+		intr_type = pci_intr_type(sc-bge_pihp[0]);
+		aprint_error_dev(sc-bge_dev,unable to establish %s\n,
+		(intr_type == PCI_INTR_TYPE_MSI) ? MSI : INTx);
+		pci_intr_release(pc, sc-bge_pihp, 1);
+		switch (intr_type) {
+		case PCI_INTR_TYPE_MSI:
+			/* The next try is for INTx: Disable MSI */
+			max_type = PCI_INTR_TYPE_INTX;
+			counts[PCI_INTR_TYPE_INTX] = 1;
+			sc-bge_flags = ~BGEF_MSI;
+			goto alloc_retry;
+		case PCI_INTR_TYPE_INTX:
+		default:
+			/* See below */
+			break;
+		}
+	}
 #else	/* !__HAVE_PCI_MSI_MSIX */
-	DPRINTFN(5, (pci_intr_string\n));
 	intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
 
 	DPRINTFN(5, (pci_intr_establish\n));

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.339 src/sys/dev/pci/if_wm.c:1.340
--- src/sys/dev/pci/if_wm.c:1.339	Wed Jul 15 07:40:54 2015
+++ src/sys/dev/pci/if_wm.c	Tue Jul 21 03:15:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.339 2015/07/15 07:40:54 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.340 2015/07/21 03:15:50 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.339 2015/07/15 07:40:54 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.340 2015/07/21 03:15:50 knakahara Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_net_mpsafe.h
@@ -155,27 +155,29 @@ int	wm_debug = WM_DEBUG_TX | WM_DEBUG_RX
 #endif
 
 #ifdef __HAVE_PCI_MSI_MSIX
-#define WM_MSI_MSIX	1 /* Enable by default */
+#if 0 /* off by default */
+#define WM_MSI_MSIX	1
+#endif
 #endif
 
 /*
  * This device driver divides interrupt to TX, RX and link state.
  * Each MSI-X vector indexes are below.
  */
-#define WM_NINTR		3
-#define 

CVS commit: src/sbin/raidctl

2015-07-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul 21 05:54:44 UTC 2015

Modified Files:
src/sbin/raidctl: raidctl.c

Log Message:
convert component* into absent for START disks part of the
output from raidctl -G.  now this actually works when fed back
into raidctl -[cC].


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sbin/raidctl/raidctl.c

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

Modified files:

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.61 src/sbin/raidctl/raidctl.c:1.62
--- src/sbin/raidctl/raidctl.c:1.61	Tue Jun 30 17:02:14 2015
+++ src/sbin/raidctl/raidctl.c	Tue Jul 21 05:54:44 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.61 2015/06/30 17:02:14 sborrill Exp $   */
+/*  $NetBSD: raidctl.c,v 1.62 2015/07/21 05:54:44 mrg Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: raidctl.c,v 1.61 2015/06/30 17:02:14 sborrill Exp $);
+__RCSID($NetBSD: raidctl.c,v 1.62 2015/07/21 05:54:44 mrg Exp $);
 #endif
 
 
@@ -576,6 +576,14 @@ rf_pm_configure(int fd, int raidID, char
 	raidID, dis ? dis : en);
 }
 
+/* convert component0 into absent */
+static const char *rf_output_devname(const char *devname)
+{
+
+	if (strncmp(devname, component, 9) == 0)
+		return absent;
+	return devname;
+}
 
 static void
 rf_output_configuration(int fd, const char *name)
@@ -602,7 +610,8 @@ rf_output_configuration(int fd, const ch
 
 	printf(START disks\n);
 	for(i=0; i  device_config.ndevs; i++)
-		printf(%s\n, device_config.devs[i].devname);
+		printf(%s\n,
+		rf_output_devname(device_config.devs[i].devname));
 	printf(\n);
 
 	if (device_config.nspares  0) {