CVS commit: [netbsd-5-1] src

2014-11-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov 15 08:11:27 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-1]: main
src/doc [netbsd-5-1]: CHANGES-5.1.5 LAST_MINUTE
src/sys/sys [netbsd-5-1]: param.h

Log Message:
Welcome to 5.1.5!


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.14.2.9 -r1.425.2.14.2.10 src/distrib/notes/common/main
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-5.1.5
cvs rdiff -u -r1.2.30.2.2.4 -r1.2.30.2.2.5 src/doc/LAST_MINUTE
cvs rdiff -u -r1.330.4.15.2.9 -r1.330.4.15.2.10 src/sys/sys/param.h

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.14.2.9 src/distrib/notes/common/main:1.425.2.14.2.10
--- src/distrib/notes/common/main:1.425.2.14.2.9	Fri Nov  7 08:05:14 2014
+++ src/distrib/notes/common/main	Sat Nov 15 08:11:26 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.14.2.9 2014/11/07 08:05:14 msaitoh Exp $
+.\	$NetBSD: main,v 1.425.2.14.2.10 2014/11/15 08:11:26 snj Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd January 18, 2014
+.Dd November 15, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME
@@ -452,47 +452,91 @@ possible, it's likely that
 wouldn't exist.
 .
 .if \n[FOR_RELEASE] \{\
+.Ss Changes Between The NetBSD 5.1.4 and 5.1.5 Releases
+.Pp
+.Nx
+\*V
+is the fifth critical/security update of the NetBSD 5.1 release branch.
+It represents a selected subset of fixes deemed critical for security
+or stability reasons.
 .Pp
 The complete list of changes can be found in the
-CHANGES-5.1.4:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.1.4/CHANGES-5.1.4
-file in the top level directory of the NetBSD 5.1.4 release tree. An abbreviated list is as follows:
-.Ss2 Security Advisory Fixes
+CHANGES-5.1.5:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.1.5/CHANGES-5.1.5
+file in the top level directory of the NetBSD 5.1.5 release tree.
+An abbreviated list is as follows:
 .(bullet
-NetBSD-SA2013-010:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-010.txt.asc
-Use after free in Xserver handling of ImageText requests (CVE-2013-4396)
-.It
-NetBSD-SA2013-011:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-011.txt.asc
-embryonic TCP sockets local DoS
-.It
-NetBSD-SA2013-012:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-012.txt.asc
-Router Advertisement sysctl local Denial of Service
-.It
-NetBSD-SA2014-001:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-001.txt.asc
-Stack buffer overflow in libXfont (CVE-2013-6462)
-.It
-NetBSD-SA2014-002:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-002.txt.asc
-ntpd used as DDoS amplifier
+NetBSD-SA2014-005:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-005.txt.asc
+libXfont multiple vulnerabilities
+.It
+NetBSD-SA2014-006:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-006.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-007:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-007.txt.asc
+bozohttpd basic http authentication bypass
+.It
+NetBSD-SA2014-008:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-008.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-010:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-010.txt.asc
+Multiple vulnerabilities in the compatibility layers
+.It
+NetBSD-SA2014-011:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-011.txt.asc
+User-controlled memory allocation in the
+.Xr modctl 2
+system call
+.It
+NetBSD-SA2014-012:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-012.txt.asc
+Memory leak in the
+.Xr setsockopt 2
+system call
+.It
+NetBSD-SA2014-013:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-013.txt.asc
+.Xr ftp 1
+can be made to execute arbitrary commands
+.It
+NetBSD-SA2014-014:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-014.txt.asc
+Multiple vulnerabilities in the
+.Xr mount 2
+system call
+.It
+NetBSD-SA2014-015:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-015.txt.asc
+OpenSSL and SSLv3 vulnerabilities
 .bullet)
 .
 .Pp
-Advisories prior to NetBSD-SA2013-010 do not affect
-NetBSD 5.1.4:
-.Lk http://www.NetBSD.org/support/security/patches-5.1.4.html .
-.Ss2 Other Security Fixes
+Advisories prior to NetBSD-SA2014-005 do not affect
+NetBSD 5.1.5:
+.Lk http://www.NetBSD.org/support/security/patches-5.1.5.html .
+.Ss2 Kernel
 .(bullet
-bind: Fix CVE-2014-0591.
+Reject unaligned PCI config register ioctl requests before we kassert.

CVS commit: [netbsd-5-2] src

2014-11-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov 15 08:13:01 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-2]: main
src/doc [netbsd-5-2]: CHANGES-5.2.3 LAST_MINUTE
src/sys/sys [netbsd-5-2]: param.h

Log Message:
Welcome to 5.2.3!


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.16.2.7 -r1.425.2.16.2.8 src/distrib/notes/common/main
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-5.2.3
cvs rdiff -u -r1.2.30.3.2.2 -r1.2.30.3.2.3 src/doc/LAST_MINUTE
cvs rdiff -u -r1.330.4.18.2.5 -r1.330.4.18.2.6 src/sys/sys/param.h

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.16.2.7 src/distrib/notes/common/main:1.425.2.16.2.8
--- src/distrib/notes/common/main:1.425.2.16.2.7	Fri Nov  7 08:03:09 2014
+++ src/distrib/notes/common/main	Sat Nov 15 08:13:01 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.16.2.7 2014/11/07 08:03:09 msaitoh Exp $
+.\	$NetBSD: main,v 1.425.2.16.2.8 2014/11/15 08:13:01 snj Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd January 18, 2014
+.Dd November 15, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME
@@ -452,47 +452,91 @@ possible, it's likely that
 wouldn't exist.
 .
 .if \n[FOR_RELEASE] \{\
+.Ss Changes Between The NetBSD 5.2.2 and 5.2.3 Releases
+.Pp
+.Nx
+\*V
+is the third critical/security update of the NetBSD 5.2 release branch.
+It represents a selected subset of fixes deemed critical for security
+or stability reasons.
 .Pp
 The complete list of changes can be found in the
-CHANGES-5.2.2:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.2.2/CHANGES-5.2.2
-file in the top level directory of the NetBSD 5.2.2 release tree. An abbreviated list is as follows:
+CHANGES-5.2.3:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.2.3/CHANGES-5.2.3
+file in the top level directory of the NetBSD 5.2.3 release tree. An abbreviated list is as follows:
 .Ss2 Security Advisory Fixes
 .(bullet
-NetBSD-SA2013-010:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-010.txt.asc
-Use after free in Xserver handling of ImageText requests (CVE-2013-4396)
-.It
-NetBSD-SA2013-011:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-011.txt.asc
-embryonic TCP sockets local DoS
-.It
-NetBSD-SA2013-012:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-012.txt.asc
-Router Advertisement sysctl local Denial of Service
-.It
-NetBSD-SA2014-001:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-001.txt.asc
-Stack buffer overflow in libXfont (CVE-2013-6462)
-.It
-NetBSD-SA2014-002:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-002.txt.asc
-ntpd used as DDoS amplifier
+NetBSD-SA2014-005:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-005.txt.asc
+libXfont multiple vulnerabilities
+.It
+NetBSD-SA2014-006:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-006.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-007:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-007.txt.asc
+bozohttpd basic http authentication bypass
+.It
+NetBSD-SA2014-008:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-008.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-010:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-010.txt.asc
+Multiple vulnerabilities in the compatibility layers
+.It
+NetBSD-SA2014-011:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-011.txt.asc
+User-controlled memory allocation in the
+.Xr modctl 2
+system call
+.It
+NetBSD-SA2014-012:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-012.txt.asc
+Memory leak in the
+.Xr setsockopt 2
+system call
+.It
+NetBSD-SA2014-013:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-013.txt.asc
+.Xr ftp 1
+can be made to execute arbitrary commands
+.It
+NetBSD-SA2014-014:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-014.txt.asc
+Multiple vulnerabilities in the
+.Xr mount 2
+system call
+.It
+NetBSD-SA2014-015:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-015.txt.asc
+OpenSSL and SSLv3 vulnerabilities
 .bullet)
 .
 .Pp
-Advisories prior to NetBSD-SA2013-010 do not affect
-NetBSD 5.2.2:
-.Lk http://www.NetBSD.org/support/security/patches-5.2.2.html .
-.Ss2 Other Security Fixes
+Advisories prior to NetBSD-SA2014-005 do not affect
+NetBSD 5.2.3:
+.Lk http://www.NetBSD.org/support/security/patches-5.2.3.html .
+.Ss2 Kernel
 .(bullet
-bind: Fix CVE-2014-0591. 
+Reject unaligned PCI config register ioctl requests before we kassert.
 

CVS commit: src/sys/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 08:20:01 UTC 2014

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Separate linker script argument (${LINKSCRIPT}) from ${LINKFORMAT}

${LINKFORMAT} specifies ABI options, and used for ld -r.  ${LINKSCRIPT} (-T
ldscript) is used only for final link.


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.180 src/sys/conf/Makefile.kern.inc:1.181
--- src/sys/conf/Makefile.kern.inc:1.180	Thu Nov 13 13:44:31 2014
+++ src/sys/conf/Makefile.kern.inc	Sat Nov 15 08:20:01 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.180 2014/11/13 13:44:31 uebayasi Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.181 2014/11/15 08:20:01 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -215,8 +215,8 @@ ${_cfile:T:R}.o: ${_cfile}
 ##
 ## (5) link settings
 ##
-## TEXTADDR (or LOADADDRESS), LINKFORMAT, and any EXTRA_LINKFLAGS must
-## be set in the port's Makefile.  The port specific definitions for
+## TEXTADDR (or LOADADDRESS), LINKFORMAT, LINKSCRIPT, and any EXTRA_LINKFLAGS
+## must be set in the port's Makefile.  The port specific definitions for
 ## LINKFLAGS_NORMAL and LINKFLAGS_DEBUG will added to the LINKFLAGS
 ## depending on the value of DEBUG.
 ##
@@ -244,7 +244,7 @@ LINKTEXT?=	${TEXTADDR:C/.+/-Ttext /}
 LINKDATA?=	${DATAADDR:C/.+/-Tdata /}
 ENTRYPOINT?=	start
 LINKENTRY?=	${ENTRYPOINT:C/.+/-e /}
-LINKFLAGS?=	${LINKFORMAT} ${LINKTEXT} ${LINKDATA} ${LINKENTRY} \
+LINKFLAGS?=	${LINKFORMAT} ${LINKSCRIPT} ${LINKTEXT} ${LINKDATA} ${LINKENTRY} \
 		${EXTRA_LINKFLAGS}
 
 LINKFLAGS_DEBUG?=	-X



CVS commit: src/sys/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 08:20:42 UTC 2014

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Don't sort objects for modular build.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.181 src/sys/conf/Makefile.kern.inc:1.182
--- src/sys/conf/Makefile.kern.inc:1.181	Sat Nov 15 08:20:01 2014
+++ src/sys/conf/Makefile.kern.inc	Sat Nov 15 08:20:42 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.181 2014/11/15 08:20:01 uebayasi Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.182 2014/11/15 08:20:42 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -223,7 +223,11 @@ ${_cfile:T:R}.o: ${_cfile}
 # load lines for config xxx will be emitted as:
 # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel
 
+.if !empty(OBJS:Mnetbsd.ko)
+SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN}
+.else
 SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN}
+.endif
 SYSTEM_DEP+=	Makefile ${SYSTEM_OBJ:O} .gdbinit
 .if defined(KERNLDSCRIPT)
 SYSTEM_DEP+=	${KERNLDSCRIPT}



CVS commit: src/usr.bin/config

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 08:21:38 UTC 2014

Modified Files:
src/usr.bin/config: defs.h mkmakefile.c sem.c sem.h

Log Message:
config(1): Sort objects by weight in modular build

Sort per-module kernel objects (*.ko) by dependency weight.  Important modules
are placed in lower addresses.  The ``machdep'' module will be always placed
in the lowest.

(At this moment, the order is not exact because dependency information is
incomplete in config files (files.*).  Thus ``sysmon_power.ko'' comes lower
than ``machdep.ko'' and/or ``uvm.ko''; but still much better than alphabetical
sort.)


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.bin/config/defs.h
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/config/mkmakefile.c
cvs rdiff -u -r1.69 -r1.70 src/usr.bin/config/sem.c
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/config/sem.h

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

Modified files:

Index: src/usr.bin/config/defs.h
diff -u src/usr.bin/config/defs.h:1.62 src/usr.bin/config/defs.h:1.63
--- src/usr.bin/config/defs.h:1.62	Thu Nov  6 11:40:32 2014
+++ src/usr.bin/config/defs.h	Sat Nov 15 08:21:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.62 2014/11/06 11:40:32 uebayasi Exp $	*/
+/*	$NetBSD: defs.h,v 1.63 2014/11/15 08:21:38 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -159,6 +159,7 @@ struct module {
 #endif
 	int			m_expanding;
 	TAILQ_HEAD(, files)	m_files;
+	int			m_weight;
 };
 
 /*
@@ -183,6 +184,7 @@ struct attr {
 #define	a_deps		a_m.m_deps
 #define	a_expanding	a_m.m_expanding
 #define	a_files		a_m.m_files
+#define	a_weight	a_m.m_weight
 
 	/* interface attribute */
 	int	a_iattr;		/* true = allows children */

Index: src/usr.bin/config/mkmakefile.c
diff -u src/usr.bin/config/mkmakefile.c:1.26 src/usr.bin/config/mkmakefile.c:1.27
--- src/usr.bin/config/mkmakefile.c:1.26	Thu Nov  6 11:40:32 2014
+++ src/usr.bin/config/mkmakefile.c	Sat Nov 15 08:21:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkmakefile.c,v 1.26 2014/11/06 11:40:32 uebayasi Exp $	*/
+/*	$NetBSD: mkmakefile.c,v 1.27 2014/11/15 08:21:38 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: mkmakefile.c,v 1.26 2014/11/06 11:40:32 uebayasi Exp $);
+__RCSID($NetBSD: mkmakefile.c,v 1.27 2014/11/15 08:21:38 uebayasi Exp $);
 
 #include sys/param.h
 #include ctype.h
@@ -54,6 +54,7 @@ __RCSID($NetBSD: mkmakefile.c,v 1.26 20
 #include stdlib.h
 #include string.h
 #include err.h
+#include util.h
 #include defs.h
 #include sem.h
 
@@ -361,29 +362,73 @@ emitkobjs(FILE *fp)
 	emitattrkobjs(fp);
 }
 
+static int emitallkobjsweighcb(const char *name, void *v, void *arg);
+static void weighattr(struct attr *a);
+static int attrcmp(const void *l, const void *r);
+
+struct attr **attrbuf;
+int attridx;
+
 static void
 emitallkobjs(FILE *fp)
 {
+	int i;
 
-	fputs(OBJS=, fp);
+	attrbuf = ecalloc((size_t)nattrs, sizeof(attrbuf));
+
+	ht_enumerate(attrtab, emitallkobjsweighcb, NULL);
 	ht_enumerate(attrtab, emitallkobjscb, fp);
+	qsort(attrbuf, (size_t)attridx, sizeof(struct attr *), attrcmp);
+
+	fputs(OBJS=, fp);
+	for (i = 0; i  attridx; i++)
+		fprintf(fp,  %s.ko, attrbuf[i]-a_name);
 	putc('\n', fp);
+
+	free(attrbuf);
 }
 
 static int
 emitallkobjscb(const char *name, void *v, void *arg)
 {
 	struct attr *a = v;
-	FILE *fp = arg;
 
 	if (ht_lookup(selecttab, name) == NULL)
 		return 0;
 	if (TAILQ_EMPTY(a-a_files))
 		return 0;
-	fprintf(fp,  %s.ko, name);
+	attrbuf[attridx++] = a;
 	return 0;
 }
 
+static int
+emitallkobjsweighcb(const char *name, void *v, void *arg)
+{
+	struct attr *a = v;
+
+	weighattr(a);
+	return 0;
+}
+
+static void
+weighattr(struct attr *a)
+{
+	struct attrlist *al;
+
+	for (al = a-a_deps; al != NULL; al = al-al_next) {
+		weighattr(al-al_this);
+	}
+	a-a_weight++;
+}
+
+static int
+attrcmp(const void *l, const void *r)
+{
+	const struct attr * const *a = l, * const *b = r;
+	const int wa = (*a)-a_weight, wb = (*b)-a_weight;
+	return (wa  wb) ? -1 : (wa  wb) ? 1 : 0;
+}
+
 static void
 emitattrkobjs(FILE *fp)
 {
@@ -404,6 +449,7 @@ emitattrkobjscb(const char *name, void *
 	if (TAILQ_EMPTY(a-a_files))
 		return 0;
 	fputc('\n', fp);
+	fprintf(fp, # %s (%d)\n, name, a-a_weight);
 	fprintf(fp, OBJS.%s=, name);
 	TAILQ_FOREACH(fi, a-a_files, fi_anext) {
 		fprintf(fp,  %s.o, fi-fi_base);

Index: src/usr.bin/config/sem.c
diff -u src/usr.bin/config/sem.c:1.69 src/usr.bin/config/sem.c:1.70
--- src/usr.bin/config/sem.c:1.69	Tue Nov  4 23:02:14 2014
+++ src/usr.bin/config/sem.c	Sat Nov 15 08:21:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sem.c,v 1.69 2014/11/04 23:02:14 joerg Exp $	*/
+/*	$NetBSD: sem.c,v 1.70 2014/11/15 08:21:38 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: sem.c,v 1.69 2014/11/04 23:02:14 joerg Exp $);
+__RCSID($NetBSD: sem.c,v 1.70 2014/11/15 08:21:38 

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

2014-11-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov 15 11:31:40 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_debe.c awin_fb.c awin_var.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #239):
sys/arch/arm/allwinner/awin_debe.c: revision 1.8
sys/arch/arm/allwinner/awin_var.h: revision 1.24
sys/arch/arm/allwinner/awin_fb.c: revision 1.6
Implement WSDISPLAYIO_SVIDEO, WSDISPLAYIO_GVIDEO for screen blanking


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/arch/arm/allwinner/awin_fb.c
cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/sys/arch/arm/allwinner/awin_var.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/arm/allwinner/awin_debe.c
diff -u src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.3 src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.4
--- src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.3	Fri Nov 14 22:23:28 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Sat Nov 15 11:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.6.2.3 2014/11/14 22:23:28 martin Exp $ */
+/* $NetBSD: awin_debe.c,v 1.6.2.4 2014/11/15 11:31:40 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6.2.3 2014/11/14 22:23:28 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6.2.4 2014/11/15 11:31:40 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, $NetBSD: awin_debe.c,
 #include arm/allwinner/awin_var.h
 
 #include dev/videomode/videomode.h
+#include dev/wscons/wsconsio.h
 
 struct awin_debe_softc {
 	device_t sc_dev;
@@ -360,3 +361,30 @@ awin_debe_set_videomode(const struct vid
 		awin_debe_setup_fbdev(sc, mode);
 	}
 }
+
+int
+awin_debe_ioctl(device_t self, u_long cmd, void *data)
+{
+	struct awin_debe_softc *sc = device_private(self);
+	uint32_t val;
+	int enable;
+
+	switch (cmd) {
+	case WSDISPLAYIO_SVIDEO:
+		enable = *(int *)data;
+		val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
+		if (enable)
+			val |= AWIN_DEBE_MODCTL_LAY0_EN;
+		else
+			val = ~AWIN_DEBE_MODCTL_LAY0_EN;
+		DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
+		return 0;
+	case WSDISPLAYIO_GVIDEO:
+		val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
+		*(int *)data = !!(val  AWIN_DEBE_MODCTL_LAY0_EN);
+		return 0;
+	}
+
+	return EPASSTHROUGH;
+}
+

Index: src/sys/arch/arm/allwinner/awin_fb.c
diff -u src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.3 src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.4
--- src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.3	Fri Nov 14 22:23:28 2014
+++ src/sys/arch/arm/allwinner/awin_fb.c	Sat Nov 15 11:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_fb.c,v 1.4.2.3 2014/11/14 22:23:28 martin Exp $ */
+/* $NetBSD: awin_fb.c,v 1.4.2.4 2014/11/15 11:31:40 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 1.4.2.3 2014/11/14 22:23:28 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 1.4.2.4 2014/11/15 11:31:40 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 
 
 struct awin_fb_softc {
 	struct genfb_softc sc_gen;
+	device_t sc_debedev;
 
 	bus_dma_tag_t sc_dmat;
 	bus_dma_segment_t *sc_dmasegs;
@@ -82,6 +83,7 @@ awin_fb_attach(device_t parent, device_t
 		awin_fb_consoledev = self;
 
 	sc-sc_gen.sc_dev = self;
+	sc-sc_debedev = parent;
 	sc-sc_dmat = afb-afb_dmat;
 	sc-sc_dmasegs = afb-afb_dmasegs;
 	sc-sc_ndmasegs = afb-afb_ndmasegs;
@@ -144,6 +146,9 @@ awin_fb_ioctl(void *v, void *vs, u_long 
 		if (error == 0)
 			fbi-fbi_flags |= WSFB_VRAM_IS_RAM;
 		return error;
+	case WSDISPLAYIO_SVIDEO:
+	case WSDISPLAYIO_GVIDEO:
+		return awin_debe_ioctl(sc-sc_debedev, cmd, data);
 	default:
 		return EPASSTHROUGH;
 	}

Index: src/sys/arch/arm/allwinner/awin_var.h
diff -u src/sys/arch/arm/allwinner/awin_var.h:1.10.2.3 src/sys/arch/arm/allwinner/awin_var.h:1.10.2.4
--- src/sys/arch/arm/allwinner/awin_var.h:1.10.2.3	Fri Nov 14 22:23:28 2014
+++ src/sys/arch/arm/allwinner/awin_var.h	Sat Nov 15 11:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_var.h,v 1.10.2.3 2014/11/14 22:23:28 martin Exp $ */
+/* $NetBSD: awin_var.h,v 1.10.2.4 2014/11/15 11:31:40 martin Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -131,6 +131,7 @@ void	awin_tcon_set_videomode(const struc
 void	awin_tcon_enable(bool);
 void	awin_debe_set_videomode(const struct videomode *);
 void	awin_debe_enable(bool);
+int	awin_debe_ioctl(device_t, u_long, void *);
 void	awin_fb_set_videomode(device_t, u_int, u_int);
 void	awin_fb_ddb_trap_callback(int);
 



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

2014-11-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov 15 11:34:44 UTC 2014

Modified Files:
src/sys/arch/arm/include [netbsd-7]: locore.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #240):
sys/arch/arm/include/locore.h: revision 1.18
Guard a few inline functions by #ifndef _RUMPKERNEL, to allow including
this file in rump builds.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.6.1 src/sys/arch/arm/include/locore.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/arm/include/locore.h
diff -u src/sys/arch/arm/include/locore.h:1.16 src/sys/arch/arm/include/locore.h:1.16.6.1
--- src/sys/arch/arm/include/locore.h:1.16	Fri Mar 28 21:39:09 2014
+++ src/sys/arch/arm/include/locore.h	Sat Nov 15 11:34:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.16 2014/03/28 21:39:09 matt Exp $	*/
+/*	$NetBSD: locore.h,v 1.16.6.1 2014/11/15 11:34:44 martin Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -233,6 +233,7 @@ read_thumb_insn(vaddr_t va, bool user_p)
 	return insn;
 }
 
+#ifndef _RUMPKERNEL
 static inline void
 arm_dmb(void)
 {
@@ -259,6 +260,7 @@ arm_isb(void)
 	else if (CPU_IS_ARMV7_P())
 		__asm __volatile(isb);
 }
+#endif
 
 /*
  * Random cruft



CVS commit: [netbsd-7] src/doc

2014-11-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov 15 11:35:57 UTC 2014

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

Log Message:
Tickets #239 and #240


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.102 -r1.1.2.103 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.102 src/doc/CHANGES-7.0:1.1.2.103
--- src/doc/CHANGES-7.0:1.1.2.102	Fri Nov 14 22:27:05 2014
+++ src/doc/CHANGES-7.0	Sat Nov 15 11:35:57 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.102 2014/11/14 22:27:05 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.103 2014/11/15 11:35:57 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2656,3 +2656,16 @@ sys/arch/evbarm/awin/awin_machdep.c		1.2
 	want to see the whole screen.
 	[jmcneill, ticket #238]
 
+sys/arch/arm/allwinner/awin_debe.c		1.8
+sys/arch/arm/allwinner/awin_fb.c		1.6
+sys/arch/arm/allwinner/awin_var.h		1.24
+
+	Implement WSDISPLAYIO_SVIDEO, WSDISPLAYIO_GVIDEO for screen blanking.
+	[jmcneill, ticket #239]
+
+sys/arch/arm/include/locore.h			1.18
+
+	Guard a few inline functions by #ifndef _RUMPKERNEL, to allow
+	including this file in rump builds.
+	[skrll, ticket #240]
+



CVS commit: src/usr.bin/config

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:18:55 UTC 2014

Modified Files:
src/usr.bin/config: mkmakefile.c

Log Message:
config(1): Avoid buffer overrun (modular build)


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/config/mkmakefile.c

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

Modified files:

Index: src/usr.bin/config/mkmakefile.c
diff -u src/usr.bin/config/mkmakefile.c:1.27 src/usr.bin/config/mkmakefile.c:1.28
--- src/usr.bin/config/mkmakefile.c:1.27	Sat Nov 15 08:21:38 2014
+++ src/usr.bin/config/mkmakefile.c	Sat Nov 15 12:18:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkmakefile.c,v 1.27 2014/11/15 08:21:38 uebayasi Exp $	*/
+/*	$NetBSD: mkmakefile.c,v 1.28 2014/11/15 12:18:55 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: mkmakefile.c,v 1.27 2014/11/15 08:21:38 uebayasi Exp $);
+__RCSID($NetBSD: mkmakefile.c,v 1.28 2014/11/15 12:18:55 uebayasi Exp $);
 
 #include sys/param.h
 #include ctype.h
@@ -374,10 +374,10 @@ emitallkobjs(FILE *fp)
 {
 	int i;
 
-	attrbuf = ecalloc((size_t)nattrs, sizeof(attrbuf));
+	attrbuf = emalloc((size_t)nattrs * sizeof(attrbuf));
 
 	ht_enumerate(attrtab, emitallkobjsweighcb, NULL);
-	ht_enumerate(attrtab, emitallkobjscb, fp);
+	ht_enumerate(attrtab, emitallkobjscb, NULL);
 	qsort(attrbuf, (size_t)attridx, sizeof(struct attr *), attrcmp);
 
 	fputs(OBJS=, fp);
@@ -398,6 +398,11 @@ emitallkobjscb(const char *name, void *v
 	if (TAILQ_EMPTY(a-a_files))
 		return 0;
 	attrbuf[attridx++] = a;
+	/* XXX nattrs tracking is not exact yet */
+	if (attridx == nattrs) {
+		nattrs *= 2;
+		attrbuf = erealloc(attrbuf, (size_t)nattrs * sizeof(attrbuf));
+	}
 	return 0;
 }
 



CVS commit: src/sys/arch/hppa/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:20:07 UTC 2014

Modified Files:
src/sys/arch/hppa/conf: Makefile.hppa

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/conf/Makefile.hppa

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/hppa/conf/Makefile.hppa
diff -u src/sys/arch/hppa/conf/Makefile.hppa:1.1 src/sys/arch/hppa/conf/Makefile.hppa:1.2
--- src/sys/arch/hppa/conf/Makefile.hppa:1.1	Mon Feb 24 07:23:42 2014
+++ src/sys/arch/hppa/conf/Makefile.hppa	Sat Nov 15 12:20:06 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.hppa,v 1.1 2014/02/24 07:23:42 skrll Exp $
+# $NetBSD: Makefile.hppa,v 1.2 2014/11/15 12:20:06 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -67,7 +67,7 @@ locore.o: ${HPPA}/hppa/locore.S
 ##
 ## (5) link settings
 ##
-LINKFORMAT=	-T ${HPPA}/conf/ld.script
+LINKSCRIPT=	-T ${HPPA}/conf/ld.script
 TEXTADDR?=	0020
 LINKFLAGS_NORMAL=   -X
 EXTRA_LINKFLAGS= -Map $@.map



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

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:26:44 UTC 2014

Modified Files:
src/sys/arch/i386/conf: Makefile.i386

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/i386/conf/Makefile.i386

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

Modified files:

Index: src/sys/arch/i386/conf/Makefile.i386
diff -u src/sys/arch/i386/conf/Makefile.i386:1.182 src/sys/arch/i386/conf/Makefile.i386:1.183
--- src/sys/arch/i386/conf/Makefile.i386:1.182	Sat May 24 18:39:04 2014
+++ src/sys/arch/i386/conf/Makefile.i386	Sat Nov 15 12:26:44 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.i386,v 1.182 2014/05/24 18:39:04 jakllsch Exp $
+#	$NetBSD: Makefile.i386,v 1.183 2014/11/15 12:26:44 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -78,7 +78,7 @@ lock_stubs.o: ${I386}/i386/lock_stubs.S 
 TEXTADDR?=	c010
 LINKFLAGS_NORMAL=	-X
 KERN_LDSCRIPT?=	kern.ldscript
-LINKFORMAT=	-T ${I386}/conf/${KERN_LDSCRIPT}
+LINKSCRIPT=	-T ${I386}/conf/${KERN_LDSCRIPT}
 
 ##
 ## (6) port specific target dependencies



CVS commit: src/sys/arch

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:28:06 UTC 2014

Modified Files:
src/sys/arch/ia64/conf: Makefile.ia64
src/sys/arch/usermode/conf: Makefile.usermode

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/conf/Makefile.ia64
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/usermode/conf/Makefile.usermode

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/ia64/conf/Makefile.ia64
diff -u src/sys/arch/ia64/conf/Makefile.ia64:1.2 src/sys/arch/ia64/conf/Makefile.ia64:1.3
--- src/sys/arch/ia64/conf/Makefile.ia64:1.2	Thu Jan 17 01:56:02 2008
+++ src/sys/arch/ia64/conf/Makefile.ia64	Sat Nov 15 12:28:06 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ia64,v 1.2 2008/01/17 01:56:02 lukem Exp $
+#	$NetBSD: Makefile.ia64,v 1.3 2014/11/15 12:28:06 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -54,7 +54,7 @@ locore.o: ${IA64}/ia64/locore.S assym.h
 ##TEXTADDR?=	0xdeadbeeffeeddead
 LINKFLAGS_NORMAL=	-X
 KERN_LDSCRIPT?=	kern.ldscript
-LINKFORMAT=	-T ${IA64}/conf/${KERN_LDSCRIPT}
+LINKSCRIPT=	-T ${IA64}/conf/${KERN_LDSCRIPT}
 
 ##
 ## (6) port specific target dependencies

Index: src/sys/arch/usermode/conf/Makefile.usermode
diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.34 src/sys/arch/usermode/conf/Makefile.usermode:1.35
--- src/sys/arch/usermode/conf/Makefile.usermode:1.34	Sun Nov 10 19:49:49 2013
+++ src/sys/arch/usermode/conf/Makefile.usermode	Sat Nov 15 12:28:06 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.34 2013/11/10 19:49:49 jmcneill Exp $
+# $NetBSD: Makefile.usermode,v 1.35 2014/11/15 12:28:06 uebayasi Exp $
 
 USETOOLS?=			no
 NEED_OWN_INSTALL_TARGET?=	no
@@ -69,7 +69,7 @@ TEXTADDR?=	  %TEXTADDR%
 
 LINKFLAGS_NORMAL=	-X
 KERN_LDSCRIPT?=	kern.ldscript
-#LINKFORMAT=	-T ${USERMODE}/conf/${KERN_LDSCRIPT}
+#LINKSCRIPT=	-T ${USERMODE}/conf/${KERN_LDSCRIPT}
 
 SYSTEM_LD=	@${_MKSHMSG}link  ${.CURDIR:T}/${.TARGET}; \
 		${_MKSHECHO}\



CVS commit: src/sys/arch/mips/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:29:02 UTC 2014

Modified Files:
src/sys/arch/mips/conf: Makefile.mips

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/mips/conf/Makefile.mips

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/mips/conf/Makefile.mips
diff -u src/sys/arch/mips/conf/Makefile.mips:1.59 src/sys/arch/mips/conf/Makefile.mips:1.60
--- src/sys/arch/mips/conf/Makefile.mips:1.59	Sun Mar 10 07:18:20 2013
+++ src/sys/arch/mips/conf/Makefile.mips	Sat Nov 15 12:29:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mips,v 1.59 2013/03/10 07:18:20 christos Exp $
+#	$NetBSD: Makefile.mips,v 1.60 2014/11/15 12:29:02 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -102,7 +102,7 @@ TEXTADDR?=		${DEFTEXTADDR}
 .endif
 KERNLDSCRIPT?=		${MIPS}/conf/kern.ldscript
 # some mips ports specify a magic format
-LINKFORMAT+=		-T ${KERNLDSCRIPT}
+LINKSCRIPT+=		-T ${KERNLDSCRIPT}
 EXTRA_LINKFLAGS=	${GP} ${LDOPTS}
 LINKFLAGS_NORMAL=	-X
 STRIPFLAGS=		-g -X



CVS commit: src/distrib/i386/installimage

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:33:04 UTC 2014

Modified Files:
src/distrib/i386/installimage: Makefile

Log Message:
Bump image size from 512MB to 520MB.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/i386/installimage/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/i386/installimage/Makefile
diff -u src/distrib/i386/installimage/Makefile:1.5 src/distrib/i386/installimage/Makefile:1.6
--- src/distrib/i386/installimage/Makefile:1.5	Sat Sep 13 10:18:24 2014
+++ src/distrib/i386/installimage/Makefile	Sat Nov 15 12:33:04 2014
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.5 2014/09/13 10:18:24 roy Exp $
+#	$NetBSD: Makefile,v 1.6 2014/11/15 12:33:04 uebayasi Exp $
 
 .include bsd.own.mk
 
 INSTIMGBASE=	NetBSD-${DISTRIBVER}-i386-install	# gives ${IMGBASE}.img
 
 BOOTDISK=	sd0			# for USB flash etc.
-INSTIMAGEMB?=	512			# for all installation binaries
+INSTIMAGEMB?=	520			# for all installation binaries
 
 PRIMARY_BOOT=		bootxx_ffsv1
 SECONDARY_BOOT=		boot



CVS commit: src/sys/arch/powerpc/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:36:42 UTC 2014

Modified Files:
src/sys/arch/powerpc/conf: Makefile.powerpc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/powerpc/conf/Makefile.powerpc

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/powerpc/conf/Makefile.powerpc
diff -u src/sys/arch/powerpc/conf/Makefile.powerpc:1.57 src/sys/arch/powerpc/conf/Makefile.powerpc:1.58
--- src/sys/arch/powerpc/conf/Makefile.powerpc:1.57	Sun Aug 10 17:44:26 2014
+++ src/sys/arch/powerpc/conf/Makefile.powerpc	Sat Nov 15 12:36:42 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.powerpc,v 1.57 2014/08/10 17:44:26 joerg Exp $
+#	$NetBSD: Makefile.powerpc,v 1.58 2014/11/15 12:36:42 uebayasi Exp $
 #
 # Makefile for NetBSD
 #
@@ -84,7 +84,8 @@ ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFIL
 ##
 KERNLDSCRIPT?=	${POWERPC}/conf/kern.ldscript
 TEXTADDR?=	0x10
-LINKFORMAT=	-N -T ${KERNLDSCRIPT}
+LINKFORMAT=	-N
+LINKSCRIPT=	-T ${KERNLDSCRIPT}
 
 ENTRYPOINT=	__start
 



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

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:37:37 UTC 2014

Modified Files:
src/sys/arch/sparc/conf: Makefile.sparc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/sparc/conf/Makefile.sparc

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/conf/Makefile.sparc
diff -u src/sys/arch/sparc/conf/Makefile.sparc:1.89 src/sys/arch/sparc/conf/Makefile.sparc:1.90
--- src/sys/arch/sparc/conf/Makefile.sparc:1.89	Thu Oct  3 22:01:04 2013
+++ src/sys/arch/sparc/conf/Makefile.sparc	Sat Nov 15 12:37:37 2014
@@ -1,4 +1,4 @@
-# 	$NetBSD: Makefile.sparc,v 1.89 2013/10/03 22:01:04 mrg Exp $
+# 	$NetBSD: Makefile.sparc,v 1.90 2014/11/15 12:37:37 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -61,7 +61,8 @@ amd7930intr.o bsd_fdintr.o lock_stubs.o:
 TEXTADDR?=	F0004000
 EXTRA_LINKFLAGS=	-X
 KERN_LDSCRIPT?= kern.ldscript
-LINKFORMAT=	-n -T ${SPARC}/conf/${KERN_LDSCRIPT}
+LINKFORMAT=	-n
+LINKSCRIPT=	-T ${SPARC}/conf/${KERN_LDSCRIPT}
 
 ##
 ## (6) port specific target dependencies



CVS commit: src/sys/arch/sparc64/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:41:36 UTC 2014

Modified Files:
src/sys/arch/sparc64/conf: Makefile.sparc64

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/sparc64/conf/Makefile.sparc64

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/sparc64/conf/Makefile.sparc64
diff -u src/sys/arch/sparc64/conf/Makefile.sparc64:1.74 src/sys/arch/sparc64/conf/Makefile.sparc64:1.75
--- src/sys/arch/sparc64/conf/Makefile.sparc64:1.74	Fri Feb 21 20:45:12 2014
+++ src/sys/arch/sparc64/conf/Makefile.sparc64	Sat Nov 15 12:41:36 2014
@@ -1,4 +1,4 @@
-# 	$NetBSD: Makefile.sparc64,v 1.74 2014/02/21 20:45:12 joerg Exp $
+# 	$NetBSD: Makefile.sparc64,v 1.75 2014/11/15 12:41:36 uebayasi Exp $
 
 #=
 #
@@ -108,7 +108,7 @@ dependkernlib:	assym.h
 ## (5) link settings
 ##
 TEXTADDR?=	0100
-LINKFORMAT=	-T ${SPARC64}/conf/${KERN_LDSCRIPT}
+LINKSCRIPT=	-T ${SPARC64}/conf/${KERN_LDSCRIPT}
 .if ${LP64} == yes
 KERN_LDSCRIPT?= kern.ldscript
 .else



CVS commit: src/sys/arch

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:42:56 UTC 2014

Modified Files:
src/sys/arch/amd64/conf: Makefile.amd64
src/sys/arch/xen/conf: Makefile.xen

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/amd64/conf/Makefile.amd64
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/xen/conf/Makefile.xen

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/conf/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.45 src/sys/arch/amd64/conf/Makefile.amd64:1.46
--- src/sys/arch/amd64/conf/Makefile.amd64:1.45	Sat May 24 18:41:46 2014
+++ src/sys/arch/amd64/conf/Makefile.amd64	Sat Nov 15 12:42:56 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.45 2014/05/24 18:41:46 jakllsch Exp $
+#	$NetBSD: Makefile.amd64,v 1.46 2014/11/15 12:42:56 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -80,7 +80,7 @@ TEXTADDR?=	0x8010
 EXTRA_LINKFLAGS=	-z max-page-size=0x10
 LINKFLAGS_NORMAL=	-X
 KERN_LDSCRIPT?= kern.ldscript
-LINKFORMAT=	-T ${AMD64}/conf/${KERN_LDSCRIPT}
+LINKSCRIPT=	-T ${AMD64}/conf/${KERN_LDSCRIPT}
 
 ##
 ## (6) port specific target dependencies

Index: src/sys/arch/xen/conf/Makefile.xen
diff -u src/sys/arch/xen/conf/Makefile.xen:1.37 src/sys/arch/xen/conf/Makefile.xen:1.38
--- src/sys/arch/xen/conf/Makefile.xen:1.37	Sun Jul 20 16:51:29 2014
+++ src/sys/arch/xen/conf/Makefile.xen	Sat Nov 15 12:42:56 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.xen,v 1.37 2014/07/20 16:51:29 joerg Exp $
+#	$NetBSD: Makefile.xen,v 1.38 2014/11/15 12:42:56 uebayasi Exp $
 #	NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp 
 
 # Makefile for NetBSD
@@ -109,7 +109,7 @@ TEXTADDR?=	0x8010
 .endif
 LINKFLAGS_NORMAL=	-X
 KERN_LDSCRIPT?=	kern.ldscript.Xen
-LINKFORMAT=	-T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
+LINKSCRIPT=	-T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
 
 ##
 ## (6) port specific target dependencies



CVS commit: src/sys/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 12:56:28 UTC 2014

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Stop ordering dependencies alphabetically.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.182 src/sys/conf/Makefile.kern.inc:1.183
--- src/sys/conf/Makefile.kern.inc:1.182	Sat Nov 15 08:20:42 2014
+++ src/sys/conf/Makefile.kern.inc	Sat Nov 15 12:56:28 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.182 2014/11/15 08:20:42 uebayasi Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.183 2014/11/15 12:56:28 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -228,7 +228,7 @@ SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJ
 .else
 SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN}
 .endif
-SYSTEM_DEP+=	Makefile ${SYSTEM_OBJ:O} .gdbinit
+SYSTEM_DEP+=	Makefile ${SYSTEM_OBJ} .gdbinit
 .if defined(KERNLDSCRIPT)
 SYSTEM_DEP+=	${KERNLDSCRIPT}
 .endif
@@ -377,7 +377,7 @@ MKDEP_CFLAGS?=	${CFLAGS}
 SSRCS=${MD_SFILES} ${SFILES}
 CSRCS=${MD_CFILES} ${MI_CFILES} ${CFILES}
 SRCS=${SSRCS} ${CSRCS}
-DEPS=	${SRCS:T:O:u:R:S/$/.d/g}
+DEPS=	${SRCS:T:u:R:S/$/.d/g}
 
 .for _s in ${SSRCS}
 .if !target(${_s:T:R}.d)



CVS commit: src/sys/arch/zaurus/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 13:34:30 UTC 2014

Modified Files:
src/sys/arch/zaurus/conf: Makefile.zaurus.inc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/zaurus/conf/Makefile.zaurus.inc

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/conf/Makefile.zaurus.inc
diff -u src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.5 src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.6
--- src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.5	Sun Mar  2 16:18:41 2014
+++ src/sys/arch/zaurus/conf/Makefile.zaurus.inc	Sat Nov 15 13:34:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.zaurus.inc,v 1.5 2014/03/02 16:18:41 joerg Exp $
+#	$NetBSD: Makefile.zaurus.inc,v 1.6 2014/11/15 13:34:30 uebayasi Exp $
 
 MACHINE_ARCH?=		arm
 CPPFLAGS+=		-D${MACHINE}
@@ -19,7 +19,7 @@ SYSTEM_LD_TAIL_EXTRA+=; \
 
 KERNEL_BASE_VIRT=	$(LOADADDRESS)
 
-LINKFLAGS=		-T ldscript
+LINKSCRIPT=		-T ldscript
 
 EXTRA_CLEAN+=		netbsd.map assym.d ldscript tmp
 



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

2014-11-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Nov 15 13:40:39 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_ir.c awin_reg.h

Log Message:
Fix CIR setup. Works on A31 now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/allwinner/awin_ir.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/arm/allwinner/awin_reg.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/arm/allwinner/awin_ir.c
diff -u src/sys/arch/arm/allwinner/awin_ir.c:1.1 src/sys/arch/arm/allwinner/awin_ir.c:1.2
--- src/sys/arch/arm/allwinner/awin_ir.c:1.1	Sun Nov  2 23:55:48 2014
+++ src/sys/arch/arm/allwinner/awin_ir.c	Sat Nov 15 13:40:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_ir.c,v 1.1 2014/11/02 23:55:48 jmcneill Exp $ */
+/* $NetBSD: awin_ir.c,v 1.2 2014/11/15 13:40:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_ir.c,v 1.1 2014/11/02 23:55:48 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_ir.c,v 1.2 2014/11/15 13:40:39 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -175,11 +175,11 @@ awin_ir_init(struct awin_ir_softc *sc, s
 		clk = bus_space_read_4(sc-sc_bst, prcm_bsh,
 		AWIN_A31_PRCM_CIR_CLK_REG);
 		clk = ~AWIN_CLK_SRC_SEL;
-		clk |= 1;	/* HOSC */
+		clk |= __SHIFTIN(AWIN_CLK_SRC_SEL_CIR_HOSC, AWIN_CLK_SRC_SEL);
 		clk = ~AWIN_CLK_DIV_RATIO_M;
-		clk |= 7;	/* (24MHz / 3MHz) - 1 */
+		clk |= __SHIFTIN(7, AWIN_CLK_DIV_RATIO_M);
 		clk = ~AWIN_CLK_DIV_RATIO_N;
-		clk |= 0;	/* 1 - 1 */
+		clk |= __SHIFTIN(0, AWIN_CLK_DIV_RATIO_N);
 		clk |= AWIN_CLK_ENABLE;
 		bus_space_write_4(sc-sc_bst, prcm_bsh,
 		AWIN_A31_PRCM_CIR_CLK_REG, clk);
@@ -203,7 +203,7 @@ awin_ir_intr(void *priv)
 
 	IR_WRITE(sc, AWIN_IR_RXSTA_REG, sta  AWIN_IR_RXSTA_MASK);
 
-	if (sta  AWIN_IR_RXSTA_RA) {
+	if (sta  AWIN_IR_RXSTA_RPE) {
 		mutex_enter(sc-sc_lock);
 		sc-sc_avail = __SHIFTOUT(sta, AWIN_IR_RXSTA_RAC);
 		cv_broadcast(sc-sc_cv);
@@ -217,17 +217,25 @@ static int
 awin_ir_open(void *priv, int flag, int mode, struct proc *p)
 {
 	struct awin_ir_softc *sc = priv;
-	uint32_t ctl, rxint;
+	uint32_t ctl, rxint, cir;
 
 	ctl = __SHIFTIN(AWIN_IR_CTL_MD_CIR, AWIN_IR_CTL_MD);
 	IR_WRITE(sc, AWIN_IR_CTL_REG, ctl);
 
+	cir = __SHIFTIN(3, AWIN_IR_CIR_SCS);
+	cir |= __SHIFTIN(0, AWIN_IR_CIR_SCS2);
+	cir |= __SHIFTIN(8, AWIN_IR_CIR_NTHR);
+	cir |= __SHIFTIN(2, AWIN_IR_CIR_ITHR);
+	cir |= __SHIFTIN(99, AWIN_IR_CIR_ATHR);
+	cir |= __SHIFTIN(0, AWIN_IR_CIR_ATHC);
+	IR_WRITE(sc, AWIN_IR_CIR_REG, cir);
+
 	IR_WRITE(sc, AWIN_IR_RXCTL_REG, AWIN_IR_RXCTL_RPPI);
 
 	IR_WRITE(sc, AWIN_IR_RXSTA_REG, AWIN_IR_RXSTA_MASK);
 
-	rxint = AWIN_IR_RXINT_RAI_EN;
-	rxint |= __SHIFTIN(0, AWIN_IR_RXINT_RAL);
+	rxint = AWIN_IR_RXINT_RPEI_EN;
+	rxint |= __SHIFTIN(31, AWIN_IR_RXINT_RAL);
 	IR_WRITE(sc, AWIN_IR_RXINT_REG, rxint);
 
 	ctl |= AWIN_IR_CTL_GEN;

Index: src/sys/arch/arm/allwinner/awin_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.49 src/sys/arch/arm/allwinner/awin_reg.h:1.50
--- src/sys/arch/arm/allwinner/awin_reg.h:1.49	Fri Nov 14 00:31:54 2014
+++ src/sys/arch/arm/allwinner/awin_reg.h	Sat Nov 15 13:40:39 2014
@@ -816,7 +816,7 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_IR_TXSTA_TPE		__BIT(1)
 #define AWIN_IR_TXSTA_TU		__BIT(0)
 
-#define AWIN_IR_RXINT_RAL		__BITS(11,8)
+#define AWIN_IR_RXINT_RAL		__BITS(13,8)
 #define AWIN_IR_RXINT_DRQ_EN		__BIT(5)
 #define AWIN_IR_RXINT_RAI_EN		__BIT(4)
 #define AWIN_IR_RXINT_CRCI_EN		__BIT(3)
@@ -833,6 +833,8 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_IR_RXSTA_ROI		__BIT(0)
 
 #define AWIN_IR_CIR_SCS2		__BIT(24)
+#define AWIN_IR_CIR_ATHC		__BIT(23)
+#define AWIN_IR_CIR_ATHR		__BITS(22,16)
 #define AWIN_IR_CIR_ITHR		__BITS(15,8)
 #define AWIN_IR_CIR_NTHR		__BITS(7,2)
 #define AWIN_IR_CIR_SCS			__BITS(1,0)
@@ -1072,6 +1074,8 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_CLK_SRC_SEL_DE_PLL3	0
 #define AWIN_CLK_SRC_SEL_DE_PLL7	1
 #define AWIN_CLK_SRC_SEL_DE_PLL5	2
+#define AWIN_CLK_SRC_SEL_CIR_LOSC	0
+#define AWIN_CLK_SRC_SEL_CIR_HOSC	1
 #define AWIN_CLK_DIV_RATIO_N		__BITS(17,16)
 #define AWIN_CLK_DIV_RATIO_M		__BITS(3,0)
 



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

2014-11-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Nov 15 13:41:11 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_ir.c

Log Message:
hide a debug printf


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/allwinner/awin_ir.c

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

Modified files:

Index: src/sys/arch/arm/allwinner/awin_ir.c
diff -u src/sys/arch/arm/allwinner/awin_ir.c:1.2 src/sys/arch/arm/allwinner/awin_ir.c:1.3
--- src/sys/arch/arm/allwinner/awin_ir.c:1.2	Sat Nov 15 13:40:39 2014
+++ src/sys/arch/arm/allwinner/awin_ir.c	Sat Nov 15 13:41:11 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_ir.c,v 1.2 2014/11/15 13:40:39 jmcneill Exp $ */
+/* $NetBSD: awin_ir.c,v 1.3 2014/11/15 13:41:11 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_ir.c,v 1.2 2014/11/15 13:40:39 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_ir.c,v 1.3 2014/11/15 13:41:11 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -196,7 +196,9 @@ awin_ir_intr(void *priv)
 
 	sta = IR_READ(sc, AWIN_IR_RXSTA_REG);
 
+#ifdef AWIN_IR_DEBUG
 	printf(%s: sta = 0x%08x\n, __func__, sta);
+#endif
 
 	if ((sta  AWIN_IR_RXSTA_MASK) == 0)
 		return 0;



CVS commit: src/sys/arch/shark/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 13:41:17 UTC 2014

Modified Files:
src/sys/arch/shark/conf: Makefile.shark.inc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/shark/conf/Makefile.shark.inc

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

Modified files:

Index: src/sys/arch/shark/conf/Makefile.shark.inc
diff -u src/sys/arch/shark/conf/Makefile.shark.inc:1.20 src/sys/arch/shark/conf/Makefile.shark.inc:1.21
--- src/sys/arch/shark/conf/Makefile.shark.inc:1.20	Thu Nov 13 15:03:07 2014
+++ src/sys/arch/shark/conf/Makefile.shark.inc	Sat Nov 15 13:41:16 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.shark.inc,v 1.20 2014/11/13 15:03:07 uebayasi Exp $
+#	$NetBSD: Makefile.shark.inc,v 1.21 2014/11/15 13:41:16 uebayasi Exp $
 
 CPPFLAGS+=		-D${MACHINE}
 COPTS+=			-fno-unwind-tables
@@ -7,7 +7,7 @@ GENASSYM_EXTRAS+=	${THISARM}/shark/genas
 # Need to convert the kernel from ELF to a.out so that OpenFirmware
 # can load it.
 
-LINKFLAGS=	-T ldscript
+LINKSCRIPT=	-T ldscript
 
 SYSTEM_LD_HEAD_EXTRA+=; \
 	( cat ${ARM}/conf/kern.ldscript.head ; \



CVS commit: src/sys/arch/cats/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 14:02:19 UTC 2014

Modified Files:
src/sys/arch/cats/conf: Makefile.cats.inc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/cats/conf/Makefile.cats.inc

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/cats/conf/Makefile.cats.inc
diff -u src/sys/arch/cats/conf/Makefile.cats.inc:1.28 src/sys/arch/cats/conf/Makefile.cats.inc:1.29
--- src/sys/arch/cats/conf/Makefile.cats.inc:1.28	Thu Nov 13 15:03:06 2014
+++ src/sys/arch/cats/conf/Makefile.cats.inc	Sat Nov 15 14:02:19 2014
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile.cats.inc,v 1.28 2014/11/13 15:03:06 uebayasi Exp $
+#	$NetBSD: Makefile.cats.inc,v 1.29 2014/11/15 14:02:19 uebayasi Exp $
 
 MACHINE_ARCH?=	arm
 CPPFLAGS+=	-D${MACHINE}
 
 .if defined(ABLEELF)  (${ABLEELF} == 1)
 # use a standard ELF format, adjusted to align areas
-LINKFLAGS=	-T ${THISARM}/conf/ldscript.elf
+LINKSCRIPT=	-T ${THISARM}/conf/ldscript.elf
 
 .else
 # Need to convert the kernel from ELF to a.out so that the firmware
@@ -13,7 +13,7 @@ LINKFLAGS=	-T ${THISARM}/conf/ldscript.e
 
 CFLAGS+=	-fno-unwind-tables
 
-LINKFLAGS=	-T ldscript
+LINKSCRIPT=	-T ldscript
 
 SYSTEM_LD_HEAD_EXTRA+=; \
 	( cat ${ARM}/conf/kern.ldscript.head ; \



CVS commit: src/sys/arch/netwinder/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 14:03:37 UTC 2014

Modified Files:
src/sys/arch/netwinder/conf: Makefile.netwinder.inc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/netwinder/conf/Makefile.netwinder.inc

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/netwinder/conf/Makefile.netwinder.inc
diff -u src/sys/arch/netwinder/conf/Makefile.netwinder.inc:1.8 src/sys/arch/netwinder/conf/Makefile.netwinder.inc:1.9
--- src/sys/arch/netwinder/conf/Makefile.netwinder.inc:1.8	Thu Nov 24 12:54:29 2005
+++ src/sys/arch/netwinder/conf/Makefile.netwinder.inc	Sat Nov 15 14:03:37 2014
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile.netwinder.inc,v 1.8 2005/11/24 12:54:29 dbj Exp $
+#	$NetBSD: Makefile.netwinder.inc,v 1.9 2014/11/15 14:03:37 uebayasi Exp $
 
 CPPFLAGS+=	-D${MACHINE}
 
 SYSTEM_FIRST_OBJ=	nwmmu.o
 SYSTEM_FIRST_SFILE=	${THISARM}/${MACHINE}/nwmmu.S
 
-LINKFLAGS=		-T ${THISARM}/conf/kern.ldscript
+LINKSCRIPT=		-T ${THISARM}/conf/kern.ldscript



CVS commit: src/sys/arch/aarch64/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 14:25:10 UTC 2014

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/conf/Makefile.aarch64

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/aarch64/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.3 src/sys/arch/aarch64/conf/Makefile.aarch64:1.4
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.3	Sun Aug 17 21:17:43 2014
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Sat Nov 15 14:25:10 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.3 2014/08/17 21:17:43 joerg Exp $
+#	$NetBSD: Makefile.aarch64,v 1.4 2014/11/15 14:25:10 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -62,7 +62,7 @@ LDSCRIPT?=	${A64}/conf/kern.ldscript
 LOADADDRESS?=	0x
 LINKFLAGS_NORMAL=	-X
 .if ${LDSCRIPT} != 
-LINKFLAGS_NORMAL+=	-T ${LDSCRIPT}
+LINKSCRIPT=	-T ${LDSCRIPT}
 .endif
 
 # Strip AArch64 mapping symbols from the kernel image, as they interfere



CVS commit: src/sys/arch/epoc32/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 14:25:22 UTC 2014

Modified Files:
src/sys/arch/epoc32/conf: Makefile.epoc32.inc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/conf/Makefile.epoc32.inc

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/epoc32/conf/Makefile.epoc32.inc
diff -u src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.1 src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.2
--- src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.1	Sun Apr 28 12:11:25 2013
+++ src/sys/arch/epoc32/conf/Makefile.epoc32.inc	Sat Nov 15 14:25:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.epoc32.inc,v 1.1 2013/04/28 12:11:25 kiyohara Exp $
+#	$NetBSD: Makefile.epoc32.inc,v 1.2 2014/11/15 14:25:22 uebayasi Exp $
 
 MACHINE_ARCH=		arm
 CPPFLAGS+=		-D${MACHINE}
@@ -8,7 +8,7 @@ SYSTEM_FIRST_SFILE=	${THISARM}/epoc32/ep
 
 KERNEL_BASE_VIRT=	$(LOADADDRESS)
 
-LINKFLAGS=		-T ldscript
+LINKSCRIPT=		-T ldscript
 
 EXTRA_CLEAN+=		netbsd.map assym.d ldscript tmp
 



CVS commit: src/sys/arch/evbarm/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 14:55:02 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: Makefile.evbarm.inc

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/conf/Makefile.evbarm.inc

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/evbarm/conf/Makefile.evbarm.inc
diff -u src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.30 src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.31
--- src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.30	Fri Apr 11 02:36:43 2014
+++ src/sys/arch/evbarm/conf/Makefile.evbarm.inc	Sat Nov 15 14:55:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.evbarm.inc,v 1.30 2014/04/11 02:36:43 matt Exp $
+#	$NetBSD: Makefile.evbarm.inc,v 1.31 2014/11/15 14:55:02 uebayasi Exp $
 
 #
 # If this is a install kernel and the ramdisk image exists in the object
@@ -33,7 +33,7 @@ EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.m
 .if defined(KERNEL_BASE_PHYS)
 LINKTEXT=
 KERNLDSCRIPT=	ldscript
-EXTRA_LINKFLAGS+=	-T ldscript
+LINKSCRIPT=	-T ldscript
 
 # generate ldscript from common template
 ldscript: ${THISARM}/conf/ldscript.evbarm ${THISARM}/conf/Makefile.evbarm.inc Makefile ${BOARDMKFRAG}



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

2014-11-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Nov 15 14:56:18 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_ir.c awin_reg.h

Log Message:
add A20 IR support


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/allwinner/awin_ir.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arm/allwinner/awin_reg.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/arm/allwinner/awin_ir.c
diff -u src/sys/arch/arm/allwinner/awin_ir.c:1.3 src/sys/arch/arm/allwinner/awin_ir.c:1.4
--- src/sys/arch/arm/allwinner/awin_ir.c:1.3	Sat Nov 15 13:41:11 2014
+++ src/sys/arch/arm/allwinner/awin_ir.c	Sat Nov 15 14:56:18 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_ir.c,v 1.3 2014/11/15 13:41:11 jmcneill Exp $ */
+/* $NetBSD: awin_ir.c,v 1.4 2014/11/15 14:56:18 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_ir.c,v 1.3 2014/11/15 13:41:11 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_ir.c,v 1.4 2014/11/15 14:56:18 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -60,6 +60,7 @@ struct awin_ir_softc {
 	device_t sc_i2cdev;
 	void *sc_ih;
 	size_t sc_avail;
+	int sc_port;
 };
 
 #define IR_READ(sc, reg) \
@@ -118,6 +119,7 @@ awin_ir_attach(device_t parent, device_t
 
 	sc-sc_dev = self;
 	sc-sc_bst = aio-aio_core_bst;
+	sc-sc_port = loc-loc_port;
 	mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_IR);
 	cv_init(sc-sc_cv, awinir);
 	bus_space_subregion(sc-sc_bst, aio-aio_core_bsh,
@@ -185,6 +187,29 @@ awin_ir_init(struct awin_ir_softc *sc, s
 		AWIN_A31_PRCM_CIR_CLK_REG, clk);
 
 		bus_space_unmap(sc-sc_bst, prcm_bsh, prcm_size);
+	} else  {
+		const struct awin_gpio_pinset pinset =
+		{ 'B', AWIN_PIO_PB_IR0_FUNC, AWIN_PIO_PB_IR0_PINS };
+		uint32_t clk;
+
+		awin_gpio_pinset_acquire(pinset);
+
+		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
+		AWIN_APB0_GATING_REG,
+		AWIN_APB_GATING0_IR0  sc-sc_port,
+		0);
+
+		clk = bus_space_read_4(aio-aio_core_bst, aio-aio_ccm_bsh,
+		AWIN_IR0_CLK_REG + (sc-sc_port * 4));
+		clk = ~AWIN_CLK_SRC_SEL;
+		clk |= __SHIFTIN(AWIN_CLK_SRC_SEL_OSC24M, AWIN_CLK_SRC_SEL);
+		clk = ~AWIN_CLK_DIV_RATIO_M;
+		clk |= __SHIFTIN(7, AWIN_CLK_DIV_RATIO_M);
+		clk = ~AWIN_CLK_DIV_RATIO_N;
+		clk |= __SHIFTIN(0, AWIN_CLK_DIV_RATIO_N);
+		clk |= AWIN_CLK_ENABLE;
+		bus_space_write_4(aio-aio_core_bst, aio-aio_ccm_bsh,
+		AWIN_IR0_CLK_REG + (sc-sc_port * 4), clk);
 	}
 }
 
@@ -228,8 +253,10 @@ awin_ir_open(void *priv, int flag, int m
 	cir |= __SHIFTIN(0, AWIN_IR_CIR_SCS2);
 	cir |= __SHIFTIN(8, AWIN_IR_CIR_NTHR);
 	cir |= __SHIFTIN(2, AWIN_IR_CIR_ITHR);
-	cir |= __SHIFTIN(99, AWIN_IR_CIR_ATHR);
-	cir |= __SHIFTIN(0, AWIN_IR_CIR_ATHC);
+	if (awin_chip_id() == AWIN_CHIP_ID_A31) {
+		cir |= __SHIFTIN(99, AWIN_IR_CIR_ATHR);
+		cir |= __SHIFTIN(0, AWIN_IR_CIR_ATHC);
+	}
 	IR_WRITE(sc, AWIN_IR_CIR_REG, cir);
 
 	IR_WRITE(sc, AWIN_IR_RXCTL_REG, AWIN_IR_RXCTL_RPPI);

Index: src/sys/arch/arm/allwinner/awin_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.50 src/sys/arch/arm/allwinner/awin_reg.h:1.51
--- src/sys/arch/arm/allwinner/awin_reg.h:1.50	Sat Nov 15 13:40:39 2014
+++ src/sys/arch/arm/allwinner/awin_reg.h	Sat Nov 15 14:56:18 2014
@@ -907,7 +907,7 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_SPI0_CLK_REG		0x00A0
 #define AWIN_SPI1_CLK_REG		0x00A4
 #define AWIN_SPI2_CLK_REG		0x00A8
-#define AWIN_IR0_CLK_REG		0x00B9
+#define AWIN_IR0_CLK_REG		0x00B0
 #define AWIN_IR1_CLK_REG		0x00B4
 #define AWIN_IIS_CLK_REG		0x00B8
 #define AWIN_AC97_CLK_REG		0x00BC



CVS commit: src/sys/arch/evbarm/conf

2014-11-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Nov 15 14:59:25 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: BPI CUBIEBOARD

Log Message:
enable awinir, cir


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/BPI
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbarm/conf/CUBIEBOARD

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/evbarm/conf/BPI
diff -u src/sys/arch/evbarm/conf/BPI:1.11 src/sys/arch/evbarm/conf/BPI:1.12
--- src/sys/arch/evbarm/conf/BPI:1.11	Wed Nov 12 17:41:16 2014
+++ src/sys/arch/evbarm/conf/BPI	Sat Nov 15 14:59:25 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BPI,v 1.11 2014/11/12 17:41:16 jmcneill Exp $
+#	$NetBSD: BPI,v 1.12 2014/11/15 14:59:25 jmcneill Exp $
 #
 #	BPI -- Banana Pi - an Allwinner A20 Eval Board Kernel
 #
@@ -236,6 +236,10 @@ iic*		at awiniic?
 com0		at awinio? port 0			# UART0 (console)
 options 	CONADDR=0x01c28000, CONSPEED=115200
 
+# Consumer IR
+awinir0		at awinio?
+cir0		at awinir0
+
 # Operating System Timer (A10)
 awintmr0	at awinio?
 

Index: src/sys/arch/evbarm/conf/CUBIEBOARD
diff -u src/sys/arch/evbarm/conf/CUBIEBOARD:1.34 src/sys/arch/evbarm/conf/CUBIEBOARD:1.35
--- src/sys/arch/evbarm/conf/CUBIEBOARD:1.34	Wed Nov 12 17:38:56 2014
+++ src/sys/arch/evbarm/conf/CUBIEBOARD	Sat Nov 15 14:59:25 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: CUBIEBOARD,v 1.34 2014/11/12 17:38:56 jmcneill Exp $
+#	$NetBSD: CUBIEBOARD,v 1.35 2014/11/15 14:59:25 jmcneill Exp $
 #
 #	CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel
 #
@@ -236,6 +236,10 @@ iic*		at awiniic?
 com0		at awinio? port 0			# UART0 (console)
 options 	CONADDR=0x01c28000, CONSPEED=115200
 
+# Consumer IR
+awinir0		at awinio?
+cir0		at awinir0
+
 # Operating System Timer (A10)
 awintmr0	at awinio?
 



CVS commit: src/sys/arch/mips/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 15:01:41 UTC 2014

Modified Files:
src/sys/arch/mips/conf: Makefile.mips

Log Message:
LINKSCRIPT is set only once, so use = not +=.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/mips/conf/Makefile.mips

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/mips/conf/Makefile.mips
diff -u src/sys/arch/mips/conf/Makefile.mips:1.60 src/sys/arch/mips/conf/Makefile.mips:1.61
--- src/sys/arch/mips/conf/Makefile.mips:1.60	Sat Nov 15 12:29:02 2014
+++ src/sys/arch/mips/conf/Makefile.mips	Sat Nov 15 15:01:41 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mips,v 1.60 2014/11/15 12:29:02 uebayasi Exp $
+#	$NetBSD: Makefile.mips,v 1.61 2014/11/15 15:01:41 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -102,7 +102,7 @@ TEXTADDR?=		${DEFTEXTADDR}
 .endif
 KERNLDSCRIPT?=		${MIPS}/conf/kern.ldscript
 # some mips ports specify a magic format
-LINKSCRIPT+=		-T ${KERNLDSCRIPT}
+LINKSCRIPT=		-T ${KERNLDSCRIPT}
 EXTRA_LINKFLAGS=	${GP} ${LDOPTS}
 LINKFLAGS_NORMAL=	-X
 STRIPFLAGS=		-g -X



CVS commit: src/distrib/utils/libhack

2014-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 15 17:49:19 UTC 2014

Modified Files:
src/distrib/utils/libhack: multibyte.c

Log Message:
handle the special wc NULL case.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/libhack/multibyte.c

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

Modified files:

Index: src/distrib/utils/libhack/multibyte.c
diff -u src/distrib/utils/libhack/multibyte.c:1.5 src/distrib/utils/libhack/multibyte.c:1.6
--- src/distrib/utils/libhack/multibyte.c:1.5	Fri Apr 19 14:45:03 2013
+++ src/distrib/utils/libhack/multibyte.c	Sat Nov 15 12:49:19 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: multibyte.c,v 1.5 2013/04/19 18:45:03 joerg Exp $  */
+/*  $NetBSD: multibyte.c,v 1.6 2014/11/15 17:49:19 christos Exp $  */
 
 /*
  * Ignore all multibyte sequences, removes all the citrus code.
@@ -12,7 +12,15 @@
 size_t
 mbrtowc(wchar_t *wc, const char *str, size_t max_sz, mbstate_t *ps)
 {
-	return str == NULL || (*wc = (unsigned char)*str) == 0 ? 0 : 1;
+	wchar_t c;
+
+	if (str == NULL)
+		return 0;
+
+	if (wc != NULL)
+		*wc = (unsigned char)*str;
+
+	return *str == '\0' ? 0 : 1;
 }
 
 size_t



CVS commit: src/sys

2014-11-15 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Nov 15 18:49:05 UTC 2014

Modified Files:
src/sys/netsmb: iconv.c
src/sys/rump/dev/lib/libnetsmb: Makefile
Added Files:
src/sys/rump/dev/lib/libnetsmb: netsmb_iconv.c netsmb_user.c
netsmb_user.h

Log Message:
Make rump_smbfs(8) uses host iconv(3) to convert filenames
character set.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/netsmb/iconv.c
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libnetsmb/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libnetsmb/netsmb_iconv.c \
src/sys/rump/dev/lib/libnetsmb/netsmb_user.c \
src/sys/rump/dev/lib/libnetsmb/netsmb_user.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/netsmb/iconv.c
diff -u src/sys/netsmb/iconv.c:1.13 src/sys/netsmb/iconv.c:1.14
--- src/sys/netsmb/iconv.c:1.13	Thu Feb 20 11:08:57 2014
+++ src/sys/netsmb/iconv.c	Sat Nov 15 18:49:04 2014
@@ -1,41 +1,48 @@
-/*	$NetBSD: iconv.c,v 1.13 2014/02/20 11:08:57 joerg Exp $	*/
+/*	$NetBSD: iconv.c,v 1.14 2014/11/15 18:49:04 nakayama Exp $	*/
 
 /* Public domain */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iconv.c,v 1.13 2014/02/20 11:08:57 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: iconv.c,v 1.14 2014/11/15 18:49:04 nakayama Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
 #include sys/systm.h
 #include sys/errno.h
-#include sys/malloc.h
 
 #include netsmb/iconv.h
 
+/* stubs for iconv functions */
+int iconv_open_stub(const char *, const char *, void **);
+int iconv_close_stub(void *);
+int iconv_conv_stub(void *, const char **, size_t *, char **, size_t *);
+__weak_alias(iconv_open, iconv_open_stub);
+__weak_alias(iconv_close, iconv_close_stub);
+__weak_alias(iconv_conv, iconv_conv_stub);
+
 int
-iconv_open(const char *to, const char *from,
+iconv_open_stub(const char *to, const char *from,
 void **handle)
 {
 	return 0;
 }
 
 int
-iconv_close(void *handle)
+iconv_close_stub(void *handle)
 {
 	return 0;
 }
 
 int
-iconv_conv(void *handle, const char **inbuf,
+iconv_conv_stub(void *handle, const char **inbuf,
 size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
 {
-	if (*inbytesleft  *outbytesleft)
-		return(E2BIG);
-
 	if (inbuf == NULL)
 		return(0); /* initial shift state */
 
+	if (*inbytesleft  *outbytesleft)
+		return(E2BIG);
+
 	(void)memcpy(*outbuf, *inbuf, *inbytesleft);
 
 	*outbytesleft -= *inbytesleft;
@@ -59,7 +66,11 @@ iconv_convstr(void *handle, char *dst, c
 		strlcpy(dst, src, l);
 		return dst;
 	}
-	inlen = outlen = strlen(src);
+	inlen = strlen(src);
+	outlen = l - 1;
+	error = iconv_conv(handle, NULL, NULL, p, outlen);
+	if (error)
+		return NULL;
 	error = iconv_conv(handle, src, inlen, p, outlen);
 	if (error)
 		return NULL;
@@ -82,6 +93,9 @@ iconv_convmem(void *handle, void *dst, c
 		return dst;
 	}
 	inlen = outlen = size;
+	error = iconv_conv(handle, NULL, NULL, d, outlen);
+	if (error)
+		return NULL;
 	error = iconv_conv(handle, s, inlen, d, outlen);
 	if (error)
 		return NULL;

Index: src/sys/rump/dev/lib/libnetsmb/Makefile
diff -u src/sys/rump/dev/lib/libnetsmb/Makefile:1.4 src/sys/rump/dev/lib/libnetsmb/Makefile:1.5
--- src/sys/rump/dev/lib/libnetsmb/Makefile:1.4	Thu Mar 13 01:57:29 2014
+++ src/sys/rump/dev/lib/libnetsmb/Makefile	Sat Nov 15 18:49:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2014/03/13 01:57:29 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2014/11/15 18:49:04 nakayama Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../netsmb
@@ -13,5 +13,8 @@ SRCS+=	netsmb_component.c
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs
 #CPPFLAGS+=	-DSMB_SOCKET_DEBUG -DSMB_IOD_DEBUG
 
+SRCS+=	netsmb_iconv.c
+RUMPCOMP_USER_SRCS=	netsmb_user.c
+
 .include bsd.lib.mk
 .include bsd.klinks.mk

Added files:

Index: src/sys/rump/dev/lib/libnetsmb/netsmb_iconv.c
diff -u /dev/null src/sys/rump/dev/lib/libnetsmb/netsmb_iconv.c:1.1
--- /dev/null	Sat Nov 15 18:49:05 2014
+++ src/sys/rump/dev/lib/libnetsmb/netsmb_iconv.c	Sat Nov 15 18:49:04 2014
@@ -0,0 +1,79 @@
+/*	$NetBSD: netsmb_iconv.c,v 1.1 2014/11/15 18:49:04 nakayama Exp $	*/
+
+/*
+ * Copyright (c) 2014 Takeshi Nakayama.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *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 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 

CVS commit: src/sys

2014-11-15 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Nov 15 18:52:45 UTC 2014

Modified Files:
src/sys/fs/smbfs: smbfs_smb.c smbfs_subr.c smbfs_subr.h
src/sys/netsmb: mchain.h smb_subr.c subr_mchain.c

Log Message:
Adjust smbfs/netsmb for filenames byte length changes that come as
a result of iconv conversion.  Most codes are taken from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/fs/smbfs/smbfs_smb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/smbfs/smbfs_subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/fs/smbfs/smbfs_subr.h
cvs rdiff -u -r1.9 -r1.10 src/sys/netsmb/mchain.h
cvs rdiff -u -r1.36 -r1.37 src/sys/netsmb/smb_subr.c
cvs rdiff -u -r1.22 -r1.23 src/sys/netsmb/subr_mchain.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/smbfs/smbfs_smb.c
diff -u src/sys/fs/smbfs/smbfs_smb.c:1.45 src/sys/fs/smbfs/smbfs_smb.c:1.46
--- src/sys/fs/smbfs/smbfs_smb.c:1.45	Tue Aug 12 06:57:20 2014
+++ src/sys/fs/smbfs/smbfs_smb.c	Sat Nov 15 18:52:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_smb.c,v 1.45 2014/08/12 06:57:20 maxv Exp $	*/
+/*	$NetBSD: smbfs_smb.c,v 1.46 2014/11/15 18:52:44 nakayama Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smbfs_smb.c,v 1.45 2014/08/12 06:57:20 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: smbfs_smb.c,v 1.46 2014/11/15 18:52:44 nakayama Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1129,7 +1129,7 @@ static int
 smbfs_findopenLM2(struct smbfs_fctx *ctx, struct smbnode *dnp,
 const char *wildcard, int wclen, int attr, struct smb_cred *scred)
 {
-	ctx-f_name = malloc(SMB_MAXNAMLEN, M_SMBFSDATA, M_WAITOK);
+	ctx-f_name = malloc(SMB_MAXNAMLEN * 2, M_SMBFSDATA, M_WAITOK);
 	if (ctx-f_name == NULL)
 		return ENOMEM;
 	ctx-f_infolevel = SMB_DIALECT(SSTOVC(ctx-f_ssp))  SMB_DIALECT_NTLM0_12 ?
@@ -1212,7 +1212,7 @@ smbfs_findnextLM2(struct smbfs_fctx *ctx
 		return EINVAL;
 #endif
 	}
-	nmlen = min(size, SMB_MAXNAMLEN);
+	nmlen = min(size, SMB_MAXNAMLEN * 2);
 	cp = ctx-f_name;
 	error = md_get_mem(mbp, cp, nmlen, MB_MSYSTEM);
 	if (error)
@@ -1316,7 +1316,7 @@ smbfs_findnext(struct smbfs_fctx *ctx, i
 			continue;
 		break;
 	}
-	smbfs_fname_tolocal(SSTOVC(ctx-f_ssp), ctx-f_name, ctx-f_nmlen,
+	smbfs_fname_tolocal(SSTOVC(ctx-f_ssp), ctx-f_name, ctx-f_nmlen,
 	ctx-f_dnp-n_mount-sm_caseopt);
 	ctx-f_attr.fa_ino = smbfs_getino(ctx-f_dnp, ctx-f_name, ctx-f_nmlen);
 	return 0;

Index: src/sys/fs/smbfs/smbfs_subr.c
diff -u src/sys/fs/smbfs/smbfs_subr.c:1.16 src/sys/fs/smbfs/smbfs_subr.c:1.17
--- src/sys/fs/smbfs/smbfs_subr.c:1.16	Fri Nov 30 23:24:21 2012
+++ src/sys/fs/smbfs/smbfs_subr.c	Sat Nov 15 18:52:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_subr.c,v 1.16 2012/11/30 23:24:21 nakayama Exp $	*/
+/*	$NetBSD: smbfs_subr.c,v 1.17 2014/11/15 18:52:44 nakayama Exp $	*/
 
 /*
  * Copyright (c) 2000-2001, Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smbfs_subr.c,v 1.16 2012/11/30 23:24:21 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: smbfs_subr.c,v 1.17 2014/11/15 18:52:44 nakayama Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -318,14 +318,36 @@ smbfs_fullpath(struct mbchain *mbp, stru
 }
 
 int
-smbfs_fname_tolocal(struct smb_vc *vcp, char *name, int nmlen,
+smbfs_fname_tolocal(struct smb_vc *vcp, char *name, int *nmlen,
 int caseopt)
 {
-/*	if (caseopt  SMB_CS_UPPER)
+	int error = 0;
+	size_t ilen, olen;
+	const char *ibuf;
+	char *obuf, *outbuf;
+
+#ifdef notyet
+	if (caseopt  SMB_CS_UPPER)
 		iconv_convmem(vcp-vc_toupper, name, name, nmlen);
 	else if (caseopt  SMB_CS_LOWER)
-		iconv_convmem(vcp-vc_tolower, name, name, nmlen);*/
-	if (vcp-vc_tolocal)
-		iconv_convmem(vcp-vc_tolocal, name, name, nmlen);
-	return 0;
+		iconv_convmem(vcp-vc_tolower, name, name, nmlen);
+#endif
+	if (vcp-vc_tolocal) {
+		const size_t buflen = SMB_MAXNAMLEN * 2;
+
+		outbuf = malloc(buflen, M_SMBTEMP, M_WAITOK);
+		if (outbuf == NULL)
+			return ENOMEM;
+		ilen = *nmlen;
+		olen = buflen;
+		ibuf = name;
+		obuf = outbuf;
+		error = iconv_conv(vcp-vc_tolocal, ibuf, ilen, obuf, olen);
+		if (!error) {
+			*nmlen = buflen - olen;
+			memcpy(name, outbuf, *nmlen);
+		}
+		free(outbuf, M_SMBTEMP);
+	}
+	return error;
 }

Index: src/sys/fs/smbfs/smbfs_subr.h
diff -u src/sys/fs/smbfs/smbfs_subr.h:1.21 src/sys/fs/smbfs/smbfs_subr.h:1.22
--- src/sys/fs/smbfs/smbfs_subr.h:1.21	Fri Nov 30 23:24:21 2012
+++ src/sys/fs/smbfs/smbfs_subr.h	Sat Nov 15 18:52:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_subr.h,v 1.21 2012/11/30 23:24:21 nakayama Exp $	*/
+/*	$NetBSD: smbfs_subr.h,v 1.22 2014/11/15 18:52:44 nakayama Exp $	*/
 
 /*
  * Copyright (c) 2000-2001, Boris Popov
@@ -176,7 +176,7 @@ int  smbfs_fullpath(struct mbchain *mbp,
 int  smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen,
 	struct smbfattr *fap, 

CVS commit: src/external/bsd/smbfs/dist/lib/smb

2014-11-15 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Nov 15 18:55:26 UTC 2014

Modified Files:
src/external/bsd/smbfs/dist/lib/smb: ctx.c

Log Message:
Disable unused codes that causes SIGBUS or SIGSEGV if character
sets option (-E) is specified to mount_smbfs/rump_smbfs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/smbfs/dist/lib/smb/ctx.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/smbfs/dist/lib/smb/ctx.c
diff -u src/external/bsd/smbfs/dist/lib/smb/ctx.c:1.2 src/external/bsd/smbfs/dist/lib/smb/ctx.c:1.3
--- src/external/bsd/smbfs/dist/lib/smb/ctx.c:1.2	Wed Dec 25 22:03:15 2013
+++ src/external/bsd/smbfs/dist/lib/smb/ctx.c	Sat Nov 15 18:55:26 2014
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: ctx.c,v 1.2 2013/12/25 22:03:15 christos Exp $);
+__RCSID($NetBSD: ctx.c,v 1.3 2014/11/15 18:55:26 nakayama Exp $);
 
 #include sys/param.h
 #include sys/sysctl.h
@@ -501,8 +501,10 @@ smb_ctx_resolve(struct smb_ctx *ctx)
 	struct sockaddr *sap;
 	struct sockaddr_nb *salocal, *saserver;
 	char *cp;
+#ifdef notyet
 	u_char cstbl[256];
 	u_int i;
+#endif
 	int error = 0;
 	
 	ctx-ct_flags = ~SMBCF_RESOLVED;
@@ -531,6 +533,7 @@ smb_ctx_resolve(struct smb_ctx *ctx)
 	error = smb_addiconvtbl(toupper, ssn-ioc_localcs, nls_upper);
 	if (error)
 		return error;
+#ifdef notyet
 	if (ssn-ioc_servercs[0] != 0) {
 		for(i = 0; i  sizeof(cstbl); i++)
 			cstbl[i] = i;
@@ -545,6 +548,7 @@ smb_ctx_resolve(struct smb_ctx *ctx)
 		if (error)
 			return error;
 	}
+#endif
 	if (ctx-ct_srvaddr) {
 		error = nb_resolvehost_in(ctx-ct_srvaddr, sap);
 	} else {



CVS commit: src/external/bsd/smbfs/dist

2014-11-15 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Nov 15 18:57:25 UTC 2014

Modified Files:
src/external/bsd/smbfs/dist/mount_smbfs: mount_smbfs.8
src/external/bsd/smbfs/dist/smbutil: smbutil.1

Log Message:
- add smbutil(1) and mount_smbfs(8) to SEE ALSO section each other.
- fix sample file path in smbutil(1).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/smbfs/dist/smbutil/smbutil.1

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/smbfs/dist/mount_smbfs/mount_smbfs.8
diff -u src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8:1.2 src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8:1.3
--- src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8:1.2	Wed Dec 25 22:03:15 2013
+++ src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8	Sat Nov 15 18:57:25 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: mount_smbfs.8,v 1.2 2013/12/25 22:03:15 christos Exp $
+.\ $NetBSD: mount_smbfs.8,v 1.3 2014/11/15 18:57:25 nakayama Exp $
 .\ Id: mount_smbfs.8,v 1.8 2000/06/09 13:52:56 bp Exp 
 .\
 .\ Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -189,6 +189,7 @@ for smbfs mounts:
 .Pp
 .Dl //guest@samba/public/smb/public smbfs  rw,noauto 0   0
 .Sh SEE ALSO
+.Xr smbutil 1 ,
 .Xr mount 8
 .Sh HISTORY
 Support for SMBFS first appeared in

Index: src/external/bsd/smbfs/dist/smbutil/smbutil.1
diff -u src/external/bsd/smbfs/dist/smbutil/smbutil.1:1.2 src/external/bsd/smbfs/dist/smbutil/smbutil.1:1.3
--- src/external/bsd/smbfs/dist/smbutil/smbutil.1:1.2	Wed Dec 25 22:03:15 2013
+++ src/external/bsd/smbfs/dist/smbutil/smbutil.1	Sat Nov 15 18:57:25 2014
@@ -124,9 +124,11 @@ for the user
 .It Pa ~/.nsmbrc
 Keeps description for each connection.
 See
-.Pa ./examples/dot.nsmbrc
+.Pa /usr/share/examples/smbfs/dot.nsmbrc
 for details.
 .El
+.Sh SEE ALSO
+.Xr mount_smbfs 8
 .Sh AUTHORS
 .An Boris Popov Aq Mt b...@butya.kz ,
 .Aq b...@freebsd.org



CVS commit: src/distrib/utils/libhack

2014-11-15 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Sat Nov 15 19:15:51 UTC 2014

Modified Files:
src/distrib/utils/libhack: multibyte.c

Log Message:
Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/utils/libhack/multibyte.c

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

Modified files:

Index: src/distrib/utils/libhack/multibyte.c
diff -u src/distrib/utils/libhack/multibyte.c:1.6 src/distrib/utils/libhack/multibyte.c:1.7
--- src/distrib/utils/libhack/multibyte.c:1.6	Sat Nov 15 17:49:19 2014
+++ src/distrib/utils/libhack/multibyte.c	Sat Nov 15 19:15:51 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: multibyte.c,v 1.6 2014/11/15 17:49:19 christos Exp $  */
+/*  $NetBSD: multibyte.c,v 1.7 2014/11/15 19:15:51 htodd Exp $  */
 
 /*
  * Ignore all multibyte sequences, removes all the citrus code.
@@ -12,8 +12,6 @@
 size_t
 mbrtowc(wchar_t *wc, const char *str, size_t max_sz, mbstate_t *ps)
 {
-	wchar_t c;
-
 	if (str == NULL)
 		return 0;
 



CVS commit: src/sys/sys

2014-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 15 19:17:05 UTC 2014

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

Log Message:
centralize the tty dialout and callunit macros


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/sys/tty.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/tty.h
diff -u src/sys/sys/tty.h:1.92 src/sys/sys/tty.h:1.93
--- src/sys/sys/tty.h:1.92	Thu May 22 12:31:19 2014
+++ src/sys/sys/tty.h	Sat Nov 15 14:17:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.h,v 1.92 2014/05/22 16:31:19 dholland Exp $	*/
+/*	$NetBSD: tty.h,v 1.93 2014/11/15 19:17:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -174,6 +174,12 @@ struct tty {
 #define	TTMAXLOWAT	(tp-t_qsize  2)
 #define	TTMINLOWAT	(tp-t_qsize  5)
 #define	TTROUND		64
+#define	TTDIALOUT_MASK	0x8		/* dialout=524288 in MAKEDEV.tmpl */
+#define	TTCALLUNIT_MASK	0x4		/* XXX: compat */
+#define	TTUNIT_MASK	0x3
+#define	TTDIALOUT(d)	(minor(d)  TTDIALOUT_MASK)
+#define	TTCALLUNIT(d)	(minor(d)  TTCALLUNIT_MASK)
+#define	TTUNIT(d)	(minor(d)  TTUNIT_MASK)
 #endif /* _KERNEL */
 
 /* These flags are kept in t_state. */



CVS commit: src/sys/dev

2014-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 15 19:18:19 UTC 2014

Modified Files:
src/sys/dev/ic: cd18xxvar.h clmpcc.c com.c cy.c z8530tty.c
src/sys/dev/marvell: gtmpsc.c
src/sys/dev/mii: files.mii
src/sys/dev/pci: cz.c
src/sys/dev/sbus: magmareg.h spifreg.h
src/sys/dev/usb: ucom.c ucycom.c uhso.c

Log Message:
centralize the dialout/call unit macros.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/cd18xxvar.h
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/clmpcc.c
cvs rdiff -u -r1.327 -r1.328 src/sys/dev/ic/com.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/ic/cy.c
cvs rdiff -u -r1.130 -r1.131 src/sys/dev/ic/z8530tty.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/marvell/gtmpsc.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/mii/files.mii
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/cz.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/sbus/magmareg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sbus/spifreg.h
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/usb/ucom.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/usb/ucycom.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/uhso.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/cd18xxvar.h
diff -u src/sys/dev/ic/cd18xxvar.h:1.4 src/sys/dev/ic/cd18xxvar.h:1.5
--- src/sys/dev/ic/cd18xxvar.h:1.4	Sat Oct 27 13:18:19 2012
+++ src/sys/dev/ic/cd18xxvar.h	Sat Nov 15 14:18:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd18xxvar.h,v 1.4 2012/10/27 17:18:19 chs Exp $	*/
+/*	$NetBSD: cd18xxvar.h,v 1.5 2014/11/15 19:18:18 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -150,10 +150,10 @@ void cd18xx_attach(struct cd18xx_softc *
  * the first 3 bits of the unit are the channel number inside a single
  * cd18xx instance, and the remaining bits indicate the instance number.
  */
-#define CD18XX_TTY(x)		(minor(x)  0x7)
-#define CD18XX_CHANNEL(x)	(minor(x)  7)
-#define CD18XX_INSTANCE(x)	((minor(x)  3)  0x)
-#define CD18XX_DIALOUT(x)	((minor(x)  0x8) != 0)
+#define CD18XX_TTY(x)		TTUNIT(x)
+#define CD18XX_CHANNEL(x)	(TTUNIT(x)  7)
+#define CD18XX_INSTANCE(x)	(TTUNIT(x)  3)
+#define CD18XX_DIALOUT(x)	TTDIALOUT(x)
 
 /* short helpers for read/write */
 #define cd18xx_read(sc, o)		\

Index: src/sys/dev/ic/clmpcc.c
diff -u src/sys/dev/ic/clmpcc.c:1.50 src/sys/dev/ic/clmpcc.c:1.51
--- src/sys/dev/ic/clmpcc.c:1.50	Sat Oct 18 04:33:27 2014
+++ src/sys/dev/ic/clmpcc.c	Sat Nov 15 14:18:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clmpcc.c,v 1.50 2014/10/18 08:33:27 snj Exp $ */
+/*	$NetBSD: clmpcc.c,v 1.51 2014/11/15 19:18:18 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clmpcc.c,v 1.50 2014/10/18 08:33:27 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: clmpcc.c,v 1.51 2014/11/15 19:18:18 christos Exp $);
 
 #include opt_ddb.h
 
@@ -75,9 +75,9 @@ static void	clmpcc_set_params(struct clm
 static void	clmpcc_start(struct tty *);
 static int 	clmpcc_modem_control(struct clmpcc_chan *, int, int);
 
-#define	CLMPCCUNIT(x)		(minor(x)  0x7fffc)
-#define CLMPCCCHAN(x)		(minor(x)  0x3)
-#define	CLMPCCDIALOUT(x)	(minor(x)  0x8)
+#define	CLMPCCUNIT(x)		(TTUNIT(x)  ~0x3)	// XXX  2? 
+#define	CLMPCCCHAN(x)		(TTUNIT(x)  0x3)
+#define	CLMPCCDIALOUT(x)	TTDIALOUT(x)
 
 /*
  * These should be in a header file somewhere...

Index: src/sys/dev/ic/com.c
diff -u src/sys/dev/ic/com.c:1.327 src/sys/dev/ic/com.c:1.328
--- src/sys/dev/ic/com.c:1.327	Sun Aug 10 12:44:35 2014
+++ src/sys/dev/ic/com.c	Sat Nov 15 14:18:18 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.327 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: com.c,v 1.328 2014/11/15 19:18:18 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: com.c,v 1.327 2014/08/10 16:44:35 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: com.c,v 1.328 2014/11/15 19:18:18 christos Exp $);
 
 #include opt_com.h
 #include opt_ddb.h
@@ -270,11 +270,10 @@ const bus_size_t com_std_map[16] = COM_R
 #endif /* COM_16750 */
 #endif /* COM_REGMAP */
 
-#define	COMUNIT_MASK	0x7
-#define	COMDIALOUT_MASK	0x8
+#define	COMDIALOUT_MASK	TTDIALOUT_MASK
 
-#define	COMUNIT(x)	(minor(x)  COMUNIT_MASK)
-#define	COMDIALOUT(x)	(minor(x)  COMDIALOUT_MASK)
+#define	COMUNIT(x)	TTUNIT(x)
+#define	COMDIALOUT(x)	TTDIALOUT(x)
 
 #define	COM_ISALIVE(sc)	((sc)-enabled != 0  \
 			 device_is_active((sc)-sc_dev))

Index: src/sys/dev/ic/cy.c
diff -u src/sys/dev/ic/cy.c:1.59 src/sys/dev/ic/cy.c:1.60
--- src/sys/dev/ic/cy.c:1.59	Fri Jul 25 04:10:37 2014
+++ src/sys/dev/ic/cy.c	Sat Nov 15 14:18:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cy.c,v 1.59 2014/07/25 08:10:37 dholland Exp $	*/
+/*	$NetBSD: cy.c,v 1.60 2014/11/15 19:18:18 christos Exp $	*/
 
 /*
  * cy.c
@@ -16,7 +16,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: 

CVS commit: src/sys/arch

2014-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 15 19:20:02 UTC 2014

Modified Files:
src/sys/arch/arm/at91: at91dbgu.c at91usart.c
src/sys/arch/arm/clps711x: clpscom.c
src/sys/arch/arm/ep93xx: epcom.c
src/sys/arch/arm/imx: imxuart.c
src/sys/arch/arm/ixp12x0: ixp12x0_com.c
src/sys/arch/arm/sa11x0: sa11x0_com.c
src/sys/arch/atari/dev: ser.c zsvar.h
src/sys/arch/epoc32/windermere: wmcom.c
src/sys/arch/evbarm/dev: plcom.c
src/sys/arch/hp300/dev: dcm.c
src/sys/arch/hpcmips/tx: txcom.c
src/sys/arch/mips/sibyte/dev: sbjcnvar.h sbscnvar.h
src/sys/arch/sh3/dev: sci.c scif.c
src/sys/arch/sparc64/dev: sab.c

Log Message:
centralize the call unit / dialout macros


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/at91/at91dbgu.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/at91/at91usart.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/clps711x/clpscom.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/ep93xx/epcom.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/imx/imxuart.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/ixp12x0/ixp12x0_com.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/sa11x0/sa11x0_com.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/atari/dev/ser.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/dev/zsvar.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/epoc32/windermere/wmcom.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbarm/dev/plcom.c
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/hp300/dev/dcm.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/hpcmips/tx/txcom.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/sibyte/dev/sbjcnvar.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/sibyte/dev/sbscnvar.h
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sh3/dev/sci.c
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sh3/dev/scif.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/sparc64/dev/sab.c

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

Modified files:

Index: src/sys/arch/arm/at91/at91dbgu.c
diff -u src/sys/arch/arm/at91/at91dbgu.c:1.12 src/sys/arch/arm/at91/at91dbgu.c:1.13
--- src/sys/arch/arm/at91/at91dbgu.c:1.12	Sun Aug 10 12:44:33 2014
+++ src/sys/arch/arm/at91/at91dbgu.c	Sat Nov 15 14:20:01 2014
@@ -1,5 +1,5 @@
-/*	$Id: at91dbgu.c,v 1.12 2014/08/10 16:44:33 tls Exp $	*/
-/*	$NetBSD: at91dbgu.c,v 1.12 2014/08/10 16:44:33 tls Exp $ */
+/*	$Id: at91dbgu.c,v 1.13 2014/11/15 19:20:01 christos Exp $	*/
+/*	$NetBSD: at91dbgu.c,v 1.13 2014/11/15 19:20:01 christos Exp $ */
 
 /*
  *
@@ -83,7 +83,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: at91dbgu.c,v 1.12 2014/08/10 16:44:33 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: at91dbgu.c,v 1.13 2014/11/15 19:20:01 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -205,11 +205,8 @@ struct consdev at91dbgu_cons = {
 #define DEFAULT_COMSPEED 115200
 #endif
 
-#define COMUNIT_MASK0x7
-#define COMDIALOUT_MASK 0x8
-
-#define COMUNIT(x)	(minor(x)  COMUNIT_MASK)
-#define COMDIALOUT(x)	(minor(x)  COMDIALOUT_MASK)
+#define COMUNIT(x)	TTUNIT(x)
+#define COMDIALOUT(x)	TTDIALOUT(x)
 
 #define COM_ISALIVE(sc)	((sc)-enabled != 0  device_is_active((sc)-sc_dev))
 

Index: src/sys/arch/arm/at91/at91usart.c
diff -u src/sys/arch/arm/at91/at91usart.c:1.11 src/sys/arch/arm/at91/at91usart.c:1.12
--- src/sys/arch/arm/at91/at91usart.c:1.11	Sun Aug 10 12:44:33 2014
+++ src/sys/arch/arm/at91/at91usart.c	Sat Nov 15 14:20:01 2014
@@ -1,5 +1,5 @@
-/*	$Id: at91usart.c,v 1.11 2014/08/10 16:44:33 tls Exp $	*/
-/*	$NetBSD: at91usart.c,v 1.11 2014/08/10 16:44:33 tls Exp $ */
+/*	$Id: at91usart.c,v 1.12 2014/11/15 19:20:01 christos Exp $	*/
+/*	$NetBSD: at91usart.c,v 1.12 2014/11/15 19:20:01 christos Exp $ */
 
 /*
  * Copyright (c) 2007 Embedtronics Oy. All rights reserved.
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: at91usart.c,v 1.11 2014/08/10 16:44:33 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: at91usart.c,v 1.12 2014/11/15 19:20:01 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -210,11 +210,8 @@ struct consdev at91usart_cons = {
 #define DEFAULT_COMSPEED 115200
 #endif
 
-#define COMUNIT_MASK0x7
-#define COMDIALOUT_MASK 0x8
-
-#define COMUNIT(x)	(minor(x)  COMUNIT_MASK)
-#define COMDIALOUT(x)	(minor(x)  COMDIALOUT_MASK)
+#define COMUNIT(x)	TTUNIT(x)
+#define COMDIALOUT(x)	TTDIALOUT(x)
 
 #define COM_ISALIVE(sc)	((sc)-enabled != 0  device_is_active((sc)-sc_dev))
 

Index: src/sys/arch/arm/clps711x/clpscom.c
diff -u src/sys/arch/arm/clps711x/clpscom.c:1.4 src/sys/arch/arm/clps711x/clpscom.c:1.5
--- src/sys/arch/arm/clps711x/clpscom.c:1.4	Sun Aug 10 12:44:33 2014
+++ src/sys/arch/arm/clps711x/clpscom.c	Sat Nov 15 14:20:01 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: clpscom.c,v 1.4 2014/08/10 16:44:33 tls Exp $  */
+/*  $NetBSD: clpscom.c,v 1.5 2014/11/15 19:20:01 christos Exp $  */
 /*
  * Copyright (c) 2013 KIYOHARA Takashi
  * All rights reserved.

CVS commit: src/sys/dev/usb

2014-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 15 19:26:38 UTC 2014

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

Log Message:
fix macro names


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/usb/ucycom.c

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

Modified files:

Index: src/sys/dev/usb/ucycom.c
diff -u src/sys/dev/usb/ucycom.c:1.40 src/sys/dev/usb/ucycom.c:1.41
--- src/sys/dev/usb/ucycom.c:1.40	Sat Nov 15 14:18:19 2014
+++ src/sys/dev/usb/ucycom.c	Sat Nov 15 14:26:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucycom.c,v 1.40 2014/11/15 19:18:19 christos Exp $	*/
+/*	$NetBSD: ucycom.c,v 1.41 2014/11/15 19:26:37 christos Exp $	*/
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ucycom.c,v 1.40 2014/11/15 19:18:19 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ucycom.c,v 1.41 2014/11/15 19:26:37 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -74,13 +74,13 @@ int	ucycomdebug = 20;
 #endif
 
 
-#define	UCYCCALLUNIT_MASK	TTCALLUNIT_MASK
-#define	UCYCUNIT_MASK		TTUNIT_MASK
-#define	UCYCDIALOUT_MASK	TTDIALOUT_MASK
-
-#define	UCYCCALLUNIT(x)		TTCALLUNIT(x)
-#define	UCYCUNIT(x)		TTUNIT(x)
-#define	UCYCDIALOUT(x)		TTDIALOUT(x)
+#define	UCYCOMCALLUNIT_MASK	TTCALLUNIT_MASK
+#define	UCYCOMUNIT_MASK		TTUNIT_MASK
+#define	UCYCOMDIALOUT_MASK	TTDIALOUT_MASK
+
+#define	UCYCOMCALLUNIT(x)	TTCALLUNIT(x)
+#define	UCYCOMUNIT(x)		TTUNIT(x)
+#define	UCYCOMDIALOUT(x)	TTDIALOUT(x)
 
 /* Configuration Byte */
 #define UCYCOM_RESET		0x80



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

2014-11-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov 15 20:04:08 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_reg.h

Log Message:
Split nand pins into two sets, functions differ.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/allwinner/awin_reg.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/arm/allwinner/awin_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.51 src/sys/arch/arm/allwinner/awin_reg.h:1.52
--- src/sys/arch/arm/allwinner/awin_reg.h:1.51	Sat Nov 15 14:56:18 2014
+++ src/sys/arch/arm/allwinner/awin_reg.h	Sat Nov 15 20:04:07 2014
@@ -1320,8 +1320,10 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_PIO_PB_STANBYWFI_FUNC	6
 
 #define AWIN_PIO_PC_PINS		25
-#define AWIN_PIO_PC_NAND_PINS		0x017f /* PC pins 24,22-0 */
+#define AWIN_PIO_PC_NAND_PINS		0x0107 /* PC pins 24,18-0 */
 #define AWIN_PIO_PC_NAND_FUNC		2
+#define AWIN_PIO_PC_NAND_PINS2		0x0080 /* PC pin 23 */
+#define AWIN_PIO_PC_NAND_FUNC2		3
 #define AWIN_PIO_PC_SPI0_PINS		0x0087 /* PC pins 23-23,3-0 */
 #define AWIN_PIO_PC_SPI0_FUNC		3
 #define AWIN_PIO_PC_SPI2_PINS		0x00f8 /* PC pins 23-19 */



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

2014-11-15 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Sat Nov 15 20:28:50 UTC 2014

Modified Files:
src/distrib/sets/lists/debug: md.amd64 shl.mi

Log Message:
libdm moved to /lib


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/debug/md.amd64
diff -u src/distrib/sets/lists/debug/md.amd64:1.71 src/distrib/sets/lists/debug/md.amd64:1.72
--- src/distrib/sets/lists/debug/md.amd64:1.71	Sat Oct 25 15:02:12 2014
+++ src/distrib/sets/lists/debug/md.amd64	Sat Nov 15 20:28:50 2014
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.71 2014/10/25 15:02:12 joerg Exp $
+# $NetBSD: md.amd64,v 1.72 2014/11/15 20:28:50 htodd Exp $
 ./usr/lib/i386/i18n/libBIG5_g.a			comp-c-debuglib		compat,debuglib
 ./usr/lib/i386/i18n/libDECHanyu_g.a		comp-c-debuglib		compat,debuglib
 ./usr/lib/i386/i18n/libEUCTW_g.a		comp-c-debuglib		compat,debuglib
@@ -211,7 +211,7 @@
 ./usr/libdata/debug/usr/lib/i386/libcurses.so.7.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdes.so.8.2.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdevmapper.so.1.0.debug	comp-compat-shlib	compat,pic,lvm,debug
-./usr/libdata/debug/usr/lib/i386/libdm.so.0.0.debug	comp-compat-shlib	compat,pic,debug
+./usr/libdata/debug/usr/lib/i386/libdm.so.0.0.debug	comp-compat-shlib	compat,pic,debug,obsolete
 ./usr/libdata/debug/usr/lib/i386/libdns.so.8.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdns_sd.so.0.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdwarf.so.1.0.debug	comp-compat-shlib	compat,pic,debug

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.82 src/distrib/sets/lists/debug/shl.mi:1.83
--- src/distrib/sets/lists/debug/shl.mi:1.82	Thu Nov 13 07:03:23 2014
+++ src/distrib/sets/lists/debug/shl.mi	Sat Nov 15 20:28:50 2014
@@ -1,9 +1,9 @@
-# $NetBSD: shl.mi,v 1.82 2014/11/13 07:03:23 mlelstv Exp $
+# $NetBSD: shl.mi,v 1.83 2014/11/15 20:28:50 htodd Exp $
 ./usr/libdata/debug/lib/libc.so.12.196.debug		comp-sys-debug	debug
 ./usr/libdata/debug/lib/libcrypt.so.1.0.debug		comp-sys-debug	debug
 ./usr/libdata/debug/lib/libcrypto.so.8.3.debug		comp-sys-debug	debug
 ./usr/libdata/debug/lib/libdevmapper.so.1.0.debug	comp-sys-debug	debug
-./usr/libdata/debug/lib/libdm.so.0.0.debug 		comp-sys-debug	debug
+./usr/libdata/debug/lib/libdm.so.0.0.debug 		comp-sys-debug	debug,obsolete
 ./usr/libdata/debug/lib/libedit.so.3.1.debug		comp-sys-debug	debug
 ./usr/libdata/debug/lib/libevent.so.4.0.debug		comp-sys-debug	debug
 ./usr/libdata/debug/lib/libgcc_s.so.1.0.debug		comp-sys-debug	gcc,debug



CVS commit: src/lib/libm/arch

2014-11-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 20:59:02 UTC 2014

Modified Files:
src/lib/libm/arch/alpha: s_copysign.S
src/lib/libm/arch/m68k: s_copysign.S
src/lib/libm/arch/riscv: s_copysign.S

Log Message:
Add copysignl aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/alpha/s_copysign.S
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/arch/m68k/s_copysign.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/arch/riscv/s_copysign.S

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

Modified files:

Index: src/lib/libm/arch/alpha/s_copysign.S
diff -u src/lib/libm/arch/alpha/s_copysign.S:1.5 src/lib/libm/arch/alpha/s_copysign.S:1.6
--- src/lib/libm/arch/alpha/s_copysign.S:1.5	Mon Apr 28 20:23:01 2008
+++ src/lib/libm/arch/alpha/s_copysign.S	Sat Nov 15 20:59:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_copysign.S,v 1.5 2008/04/28 20:23:01 martin Exp $	*/
+/*	$NetBSD: s_copysign.S,v 1.6 2014/11/15 20:59:02 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,6 +31,9 @@
 
 #include machine/asm.h
 
+STRONG_ALIAS(_copysignl, _copysign)
+WEAK_ALIAS(copysignl, _copysignl)
+
 LEAF(copysign, 2)
 	cpys	fa1, fa0, fv0
 	RET

Index: src/lib/libm/arch/m68k/s_copysign.S
diff -u src/lib/libm/arch/m68k/s_copysign.S:1.7 src/lib/libm/arch/m68k/s_copysign.S:1.8
--- src/lib/libm/arch/m68k/s_copysign.S:1.7	Thu Aug  7 16:44:41 2003
+++ src/lib/libm/arch/m68k/s_copysign.S	Sat Nov 15 20:59:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_copysign.S,v 1.7 2003/08/07 16:44:41 agc Exp $	*/
+/*	$NetBSD: s_copysign.S,v 1.8 2014/11/15 20:59:02 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,10 @@
 ;_sccsid:
 ;.asciz	from: @(#)support.s	5.2 (Berkeley) 5/17/90
 
-RCSID($NetBSD: s_copysign.S,v 1.7 2003/08/07 16:44:41 agc Exp $)
+RCSID($NetBSD: s_copysign.S,v 1.8 2014/11/15 20:59:02 joerg Exp $)
+
+STRONG_ALIAS(_copysignl, _copysign)
+WEAK_ALIAS(copysignl, _copysignl)
 
 | copysign(x,y)
 | returns x with the sign of y.

Index: src/lib/libm/arch/riscv/s_copysign.S
diff -u src/lib/libm/arch/riscv/s_copysign.S:1.1 src/lib/libm/arch/riscv/s_copysign.S:1.2
--- src/lib/libm/arch/riscv/s_copysign.S:1.1	Fri Sep 19 17:36:25 2014
+++ src/lib/libm/arch/riscv/s_copysign.S	Sat Nov 15 20:59:02 2014
@@ -1,9 +1,12 @@
-/* $NetBSD: s_copysign.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
+/* $NetBSD: s_copysign.S,v 1.2 2014/11/15 20:59:02 joerg Exp $ */
 
 /* The contents of this file are in the public domain. */
 
 #include machine/asm.h
 
+STRONG_ALIAS(_copysignl, _copysign)
+WEAK_ALIAS(copysignl, _copysignl)
+
 ENTRY(copysign)
 	fsgnj.d	fv0, fa0, fa1
 	ret



CVS commit: src/lib/libm/arch

2014-11-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 21:07:01 UTC 2014

Modified Files:
src/lib/libm/arch/alpha: s_copysign.S
src/lib/libm/arch/m68k: s_copysign.S
src/lib/libm/arch/riscv: s_copysign.S

Log Message:
It's copysign, not _copysign.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/alpha/s_copysign.S
cvs rdiff -u -r1.8 -r1.9 src/lib/libm/arch/m68k/s_copysign.S
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/arch/riscv/s_copysign.S

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

Modified files:

Index: src/lib/libm/arch/alpha/s_copysign.S
diff -u src/lib/libm/arch/alpha/s_copysign.S:1.6 src/lib/libm/arch/alpha/s_copysign.S:1.7
--- src/lib/libm/arch/alpha/s_copysign.S:1.6	Sat Nov 15 20:59:02 2014
+++ src/lib/libm/arch/alpha/s_copysign.S	Sat Nov 15 21:07:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_copysign.S,v 1.6 2014/11/15 20:59:02 joerg Exp $	*/
+/*	$NetBSD: s_copysign.S,v 1.7 2014/11/15 21:07:01 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include machine/asm.h
 
-STRONG_ALIAS(_copysignl, _copysign)
+STRONG_ALIAS(_copysignl, copysign)
 WEAK_ALIAS(copysignl, _copysignl)
 
 LEAF(copysign, 2)

Index: src/lib/libm/arch/m68k/s_copysign.S
diff -u src/lib/libm/arch/m68k/s_copysign.S:1.8 src/lib/libm/arch/m68k/s_copysign.S:1.9
--- src/lib/libm/arch/m68k/s_copysign.S:1.8	Sat Nov 15 20:59:02 2014
+++ src/lib/libm/arch/m68k/s_copysign.S	Sat Nov 15 21:07:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_copysign.S,v 1.8 2014/11/15 20:59:02 joerg Exp $	*/
+/*	$NetBSD: s_copysign.S,v 1.9 2014/11/15 21:07:01 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -38,9 +38,9 @@
 ;_sccsid:
 ;.asciz	from: @(#)support.s	5.2 (Berkeley) 5/17/90
 
-RCSID($NetBSD: s_copysign.S,v 1.8 2014/11/15 20:59:02 joerg Exp $)
+RCSID($NetBSD: s_copysign.S,v 1.9 2014/11/15 21:07:01 joerg Exp $)
 
-STRONG_ALIAS(_copysignl, _copysign)
+STRONG_ALIAS(_copysignl, copysign)
 WEAK_ALIAS(copysignl, _copysignl)
 
 | copysign(x,y)

Index: src/lib/libm/arch/riscv/s_copysign.S
diff -u src/lib/libm/arch/riscv/s_copysign.S:1.2 src/lib/libm/arch/riscv/s_copysign.S:1.3
--- src/lib/libm/arch/riscv/s_copysign.S:1.2	Sat Nov 15 20:59:02 2014
+++ src/lib/libm/arch/riscv/s_copysign.S	Sat Nov 15 21:07:01 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: s_copysign.S,v 1.2 2014/11/15 20:59:02 joerg Exp $ */
+/* $NetBSD: s_copysign.S,v 1.3 2014/11/15 21:07:01 joerg Exp $ */
 
 /* The contents of this file are in the public domain. */
 
 #include machine/asm.h
 
-STRONG_ALIAS(_copysignl, _copysign)
+STRONG_ALIAS(_copysignl, copysign)
 WEAK_ALIAS(copysignl, _copysignl)
 
 ENTRY(copysign)



CVS commit: src/sys/netinet6

2014-11-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Nov 16 00:04:06 UTC 2014

Modified Files:
src/sys/netinet6: scope6.c

Log Message:
Drop impossible check.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/netinet6/scope6.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/netinet6/scope6.c
diff -u src/sys/netinet6/scope6.c:1.9 src/sys/netinet6/scope6.c:1.10
--- src/sys/netinet6/scope6.c:1.9	Sat May 17 21:26:20 2014
+++ src/sys/netinet6/scope6.c	Sun Nov 16 00:04:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: scope6.c,v 1.9 2014/05/17 21:26:20 rmind Exp $	*/
+/*	$NetBSD: scope6.c,v 1.10 2014/11/16 00:04:06 joerg Exp $	*/
 /*	$KAME$	*/
 
 /*-
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scope6.c,v 1.9 2014/05/17 21:26:20 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: scope6.c,v 1.10 2014/11/16 00:04:06 joerg Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -411,9 +411,6 @@ in6_setscope(struct in6_addr *in6, const
 
 	scope = in6_addrscope(in6);
 
-	if (!sid-s6id_list)
-		return 0;
-
 	switch (scope) {
 	case IPV6_ADDR_SCOPE_INTFACELOCAL: /* should be interface index */
 		zoneid = sid-s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL];



CVS commit: src/tests/usr.bin/ld

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 03:49:09 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_script.sh

Log Message:
Test SORT() command.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_script.sh
diff -u src/tests/usr.bin/ld/t_script.sh:1.5 src/tests/usr.bin/ld/t_script.sh:1.6
--- src/tests/usr.bin/ld/t_script.sh:1.5	Sat Nov 15 04:47:11 2014
+++ src/tests/usr.bin/ld/t_script.sh	Sun Nov 16 03:49:09 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_script.sh,v 1.5 2014/11/15 04:47:11 uebayasi Exp $
+#	$NetBSD: t_script.sh,v 1.6 2014/11/16 03:49:09 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -63,13 +63,13 @@ EOF
 
 
 
-atf_test_case reorder
-reorder_head() {
+atf_test_case order_reorder
+order_reorder_head() {
 	atf_set descr check if object reordering works
 	atf_set require.progs cc ld readelf nm sed grep
 }
 
-reorder_body() {
+order_reorder_body() {
 	cat  test.x  EOF
 SECTIONS {
 	.data : {
@@ -85,6 +85,27 @@ EOF
 
 
 
+atf_test_case order_sort
+order_sort_head() {
+	atf_set descr check if object sort works
+	atf_set require.progs cc ld readelf nm sed grep
+}
+
+order_sort_body() {
+	cat  test.x  EOF
+SECTIONS {
+	.data : {
+		*(.data)
+		/* SORT_BY_NAME */
+		SORT(*)(.data.*)
+	}
+}
+EOF
+	order_assert_ascending
+}
+
+
+
 atf_test_case multisec
 multisec_head() {
 	atf_set descr check if multiple SECTIONS commands work
@@ -200,6 +221,7 @@ atf_init_test_cases()
 {
 	atf_add_test_case order_default
 	atf_add_test_case order_merge
-	atf_add_test_case reorder
+	atf_add_test_case order_reorder
+	atf_add_test_case order_sort
 	atf_add_test_case multisec
 }



CVS commit: src/sys/rump/dev/lib/libnetsmb

2014-11-15 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Nov 16 04:26:46 UTC 2014

Modified Files:
src/sys/rump/dev/lib/libnetsmb: netsmb_user.c

Log Message:
Using host iconv(3) is limited to NetBSD host.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libnetsmb/netsmb_user.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/rump/dev/lib/libnetsmb/netsmb_user.c
diff -u src/sys/rump/dev/lib/libnetsmb/netsmb_user.c:1.1 src/sys/rump/dev/lib/libnetsmb/netsmb_user.c:1.2
--- src/sys/rump/dev/lib/libnetsmb/netsmb_user.c:1.1	Sat Nov 15 18:49:04 2014
+++ src/sys/rump/dev/lib/libnetsmb/netsmb_user.c	Sun Nov 16 04:26:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netsmb_user.c,v 1.1 2014/11/15 18:49:04 nakayama Exp $	*/
+/*	$NetBSD: netsmb_user.c,v 1.2 2014/11/16 04:26:46 nakayama Exp $	*/
 
 /*
  * Copyright (c) 2014 Takeshi Nakayama.
@@ -36,6 +36,7 @@
 int
 rumpcomp_netsmb_iconv_open(const char *to, const char *from, void **handle)
 {
+#ifdef __NetBSD__
 	iconv_t cd;
 	int rv;
 
@@ -49,11 +50,16 @@ rumpcomp_netsmb_iconv_open(const char *t
 	}
 
 	return rumpuser_component_errtrans(rv);
+#else
+	/* fallback to use dumb copy function */
+	return 0;
+#endif
 }
 
 int
 rumpcomp_netsmb_iconv_close(void *handle)
 {
+#ifdef __NetBSD__
 	int rv;
 
 	if (iconv_close((iconv_t)handle) == -1)
@@ -62,12 +68,17 @@ rumpcomp_netsmb_iconv_close(void *handle
 		rv = 0;
 
 	return rumpuser_component_errtrans(rv);
+#else
+	/* do nothing */
+	return 0;
+#endif
 }
 
 int
 rumpcomp_netsmb_iconv_conv(void *handle, const char **inbuf,
 size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
 {
+#ifdef __NetBSD__
 	int rv;
 
 	if (iconv((iconv_t)handle, inbuf, inbytesleft, outbuf, outbytesleft)
@@ -77,5 +88,9 @@ rumpcomp_netsmb_iconv_conv(void *handle,
 		rv = 0;
 
 	return rumpuser_component_errtrans(rv);
+#else
+	/* do nothing */
+	return 0;
+#endif
 }
 #endif



CVS commit: src/usr.bin/config

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 04:28:09 UTC 2014

Modified Files:
src/usr.bin/config: TODO

Log Message:
config(1): TODO item about swapnetbsd.c


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/config/TODO

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

Modified files:

Index: src/usr.bin/config/TODO
diff -u src/usr.bin/config/TODO:1.12 src/usr.bin/config/TODO:1.13
--- src/usr.bin/config/TODO:1.12	Thu Nov 13 15:25:48 2014
+++ src/usr.bin/config/TODO	Sun Nov 16 04:28:09 2014
@@ -241,3 +241,9 @@ o Control ELF sections using linker scri
   Kernel and modular MI linkages may change behavior depending on existence
   of debug information.  In the future .symtab will be copied using linker
   during this stage.
+
+o Redesign swapnetbsd.c (root/swap device specification)
+
+  Don't build a whole kernel only to specify root/swap devices.
+
+  Make these parameter re-configurable afterwards.



CVS commit: src/tests/usr.bin/ld

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 04:47:18 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_script.sh

Log Message:
Minor tweaks.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_script.sh
diff -u src/tests/usr.bin/ld/t_script.sh:1.6 src/tests/usr.bin/ld/t_script.sh:1.7
--- src/tests/usr.bin/ld/t_script.sh:1.6	Sun Nov 16 03:49:09 2014
+++ src/tests/usr.bin/ld/t_script.sh	Sun Nov 16 04:47:18 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_script.sh,v 1.6 2014/11/16 03:49:09 uebayasi Exp $
+#	$NetBSD: t_script.sh,v 1.7 2014/11/16 04:47:18 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,7 +36,8 @@ order_default_head() {
 order_default_body() {
 	cat  test.x  EOF
 SECTIONS {
-	/* do nothing */
+	/* do nothing; but ld has implicit scripts internally */
+	/* which usually do: *(.data) *(.data.*) */
 }
 EOF
 	order_assert_descending
@@ -47,7 +48,7 @@ EOF
 atf_test_case order_merge
 order_merge_head() {
 	atf_set descr check if glob merge keeps object ordering
-	atf_set require.progs cc ld readelf nm sed grep
+	atf_set require.progs ${order_require_progs}
 }
 
 order_merge_body() {
@@ -66,7 +67,7 @@ EOF
 atf_test_case order_reorder
 order_reorder_head() {
 	atf_set descr check if object reordering works
-	atf_set require.progs cc ld readelf nm sed grep
+	atf_set require.progs ${order_require_progs}
 }
 
 order_reorder_body() {
@@ -88,7 +89,7 @@ EOF
 atf_test_case order_sort
 order_sort_head() {
 	atf_set descr check if object sort works
-	atf_set require.progs cc ld readelf nm sed grep
+	atf_set require.progs ${order_require_progs}
 }
 
 order_sort_body() {
@@ -109,7 +110,7 @@ EOF
 atf_test_case multisec
 multisec_head() {
 	atf_set descr check if multiple SECTIONS commands work
-	atf_set require.progs cc ld readelf nm sed grep
+	atf_set require.progs ${order_require_progs}
 }
 
 multisec_body() {
@@ -146,6 +147,8 @@ EOF
 
 
 
+order_require_progs=cc ld readelf nm sed grep
+
 order_assert_ascending() {
 	order_assert_order a b c
 }



CVS commit: src

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 05:38:10 UTC 2014

Modified Files:
src: build.sh

Log Message:
build.sh mkernel=*: New command to build kernel in modular


To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.301 src/build.sh:1.302
--- src/build.sh:1.301	Mon Nov 10 09:59:33 2014
+++ src/build.sh	Sun Nov 16 05:38:10 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.301 2014/11/10 09:59:33 apb Exp $
+#	$NetBSD: build.sh,v 1.302 2014/11/16 05:38:10 uebayasi Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1029,6 +1029,7 @@ Usage: ${progname} [-EhnorUuxy] [-a arch
 			file \`conf'
 releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
 kernels		Build all kernels
+mkernel=confBuild kernel with config file \`conf' in modular build
 installmodules=idir Run make installmodules to \`idir' to install all
 kernel modules.
 modules Build kernel modules.
@@ -1319,7 +1320,7 @@ parseoptions()
 			exit $?
 			;;
 
-		kernel=*|releasekernel=*|kernel.gdb=*)
+		kernel=*|releasekernel=*|kernel.gdb=*|mkernel=*)
 			arg=${op#*=}
 			op=${op%%=*}
 			[ -n ${arg} ] ||
@@ -1869,7 +1870,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.301 2014/11/10 09:59:33 apb Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.302 2014/11/16 05:38:10 uebayasi Exp $
 # with these arguments: ${_args}
 #
 
@@ -1985,7 +1986,7 @@ buildkernel()
 	[ -x ${TOOLDIR}/bin/${toolprefix}config ] \
 	|| bomb ${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \$0 tools\ first.
 	${runcmd} ${TOOLDIR}/bin/${toolprefix}config -b ${kernelbuildpath} \
-		${ksymopts} -s ${TOP}/sys ${kernelconfpath} ||
+		${configopts} -s ${TOP}/sys ${kernelconfpath} ||
 	bomb ${toolprefix}config failed for ${kernelconf}
 	make_in_dir ${kernelbuildpath} depend
 	make_in_dir ${kernelbuildpath} all
@@ -2244,7 +2245,12 @@ main()
 			;;
 		kernel.gdb=*)
 			arg=${op#*=}
-			ksymopts=-D DEBUG=-g
+			configopts=-D DEBUG=-g
+			buildkernel ${arg}
+			;;
+		mkernel=*)
+			arg=${op#*=}
+			configopts=-M
 			buildkernel ${arg}
 			;;
 		releasekernel=*)



CVS commit: src

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 05:39:10 UTC 2014

Modified Files:
src: build.sh

Log Message:
Expand TABs in usage.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.302 src/build.sh:1.303
--- src/build.sh:1.302	Sun Nov 16 05:38:10 2014
+++ src/build.sh	Sun Nov 16 05:39:09 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.302 2014/11/16 05:38:10 uebayasi Exp $
+#	$NetBSD: build.sh,v 1.303 2014/11/16 05:39:09 uebayasi Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1026,9 +1026,9 @@ Usage: ${progname} [-EhnorUuxy] [-a arch
 except \`etc'.  Useful after distribution or release
 kernel=conf Build kernel with config file \`conf'
 kernel.gdb=conf Build kernel (including netbsd.gdb) with config
-			file \`conf'
+file \`conf'
 releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
-kernels		Build all kernels
+kernels Build all kernels
 mkernel=confBuild kernel with config file \`conf' in modular build
 installmodules=idir Run make installmodules to \`idir' to install all
 kernel modules.
@@ -1046,8 +1046,8 @@ Usage: ${progname} [-EhnorUuxy] [-a arch
 RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage.
 install-image   Create bootable installation image in
 RELEASEDIR/RELEASEMACHINEDIR/installation/installimage.
-disk-image=target	Creae bootable disk image in
-			RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/target.img.gz.
+disk-image=target   Creae bootable disk image in
+RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/target.img.gz.
 params  Display various make(1) parameters.
 list-arch   Display a list of valid MACHINE/MACHINE_ARCH values,
 and exit.  The list may be narrowed by passing glob
@@ -1870,7 +1870,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.302 2014/11/16 05:38:10 uebayasi Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.303 2014/11/16 05:39:09 uebayasi Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src/doc

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 05:44:57 UTC 2014

Modified Files:
src/doc: BUILDING.mdoc

Log Message:
Document mkernel=*.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/doc/BUILDING.mdoc

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

Modified files:

Index: src/doc/BUILDING.mdoc
diff -u src/doc/BUILDING.mdoc:1.107 src/doc/BUILDING.mdoc:1.108
--- src/doc/BUILDING.mdoc:1.107	Thu Nov 13 08:25:31 2014
+++ src/doc/BUILDING.mdoc	Sun Nov 16 05:44:57 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: BUILDING.mdoc,v 1.107 2014/11/13 08:25:31 apb Exp $
+.\	$NetBSD: BUILDING.mdoc,v 1.108 2014/11/16 05:44:57 uebayasi Exp $
 .\
 .\ Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1526,6 +1526,12 @@ file alongside of the kernel
 which contains a full symbol table and can be used for debugging
 (for example with a cross-gdb built by
 .Sy MKCROSSGDB ) .
+.It Sy mkernel Ns = Ns Ar kconf
+Build a new kernel in modular build.
+Similar to the above
+.Sy kernel Ns = Ns Ar kconf
+operation, but creates intermediate per-module relocatable objects and link
+them to the final kernel.
 .It Sy kernels
 This command will build all kernels defined in port specific release build
 procedure.



CVS commit: src

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 05:45:43 UTC 2014

Modified Files:
src: BUILDING

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/BUILDING

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

Modified files:

Index: src/BUILDING
diff -u src/BUILDING:1.115 src/BUILDING:1.116
--- src/BUILDING:1.115	Thu Nov 13 08:42:35 2014
+++ src/BUILDING	Sun Nov 16 05:45:43 2014
@@ -835,6 +835,11 @@ BUILDING
symbol table and can be used for debugging (for example
with a cross-gdb built by MKCROSSGDB).
 
+ mkernel=kconf
+   Build a new kernel in modular build.  Similar to the above
+   kernel=kconf operation, but creates intermediate per-module
+   relocatable objects and link them to the final kernel.
+
  kernels   This command will build all kernels defined in port
specific release build procedure.
 



CVS commit: src/sys/ddb

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 05:46:27 UTC 2014

Modified Files:
src/sys/ddb: files.ddb

Log Message:
Define ddb module.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/ddb/files.ddb

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

Modified files:

Index: src/sys/ddb/files.ddb
diff -u src/sys/ddb/files.ddb:1.9 src/sys/ddb/files.ddb:1.10
--- src/sys/ddb/files.ddb:1.9	Sun Feb 10 11:05:31 2013
+++ src/sys/ddb/files.ddb	Sun Nov 16 05:46:27 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ddb,v 1.9 2013/02/10 11:05:31 apb Exp $
+#	$NetBSD: files.ddb,v 1.10 2014/11/16 05:46:27 uebayasi Exp $
 
 #
 # DDB options
@@ -8,6 +8,7 @@ defparam opt_ddbparam.h		DDB_FROMCONSOLE
 DDB_BREAK_CHAR DDB_KEYCODE
 DDB_COMMANDONENTER DB_MAX_LINE
 
+define	ddb
 file	ddb/db_access.c			ddb | kgdb
 file	ddb/db_break.c			ddb
 file	ddb/db_command.c		ddb



CVS commit: src

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 06:08:13 UTC 2014

Modified Files:
src: build.sh

Log Message:
build.sh mkernels: Build all kernels in modular build


To generate a diff of this commit:
cvs rdiff -u -r1.303 -r1.304 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.303 src/build.sh:1.304
--- src/build.sh:1.303	Sun Nov 16 05:39:09 2014
+++ src/build.sh	Sun Nov 16 06:08:13 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.303 2014/11/16 05:39:09 uebayasi Exp $
+#	$NetBSD: build.sh,v 1.304 2014/11/16 06:08:13 uebayasi Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1029,6 +1029,7 @@ Usage: ${progname} [-EhnorUuxy] [-a arch
 file \`conf'
 releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
 kernels Build all kernels
+mkernelsBuild all kernels in modular build
 mkernel=confBuild kernel with config file \`conf' in modular build
 installmodules=idir Run make installmodules to \`idir' to install all
 kernel modules.
@@ -1349,6 +1350,7 @@ parseoptions()
 		iso-image-source|\
 		iso-image|\
 		kernels|\
+		mkernels|\
 		live-image|\
 		makewrapper|\
 		modules|\
@@ -1870,7 +1872,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.303 2014/11/16 05:39:09 uebayasi Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.304 2014/11/16 06:08:13 uebayasi Exp $
 # with these arguments: ${_args}
 #
 
@@ -2262,6 +2264,11 @@ main()
 			buildkernels
 			;;
 
+		mkernels)
+			configopts=-M
+			buildkernels
+			;;
+
 		disk-image=*)
 			arg=${op#*=}
 			diskimage ${arg}



CVS commit: src/doc

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 06:10:31 UTC 2014

Modified Files:
src/doc: BUILDING.mdoc

Log Message:
Document build.sh mkernels.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/doc/BUILDING.mdoc

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

Modified files:

Index: src/doc/BUILDING.mdoc
diff -u src/doc/BUILDING.mdoc:1.108 src/doc/BUILDING.mdoc:1.109
--- src/doc/BUILDING.mdoc:1.108	Sun Nov 16 05:44:57 2014
+++ src/doc/BUILDING.mdoc	Sun Nov 16 06:10:31 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: BUILDING.mdoc,v 1.108 2014/11/16 05:44:57 uebayasi Exp $
+.\	$NetBSD: BUILDING.mdoc,v 1.109 2014/11/16 06:10:31 uebayasi Exp $
 .\
 .\ Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1539,6 +1539,10 @@ procedure.
 This command internally calls the
 .Sy kernel Ns = Ns Ar kconf
 operation for each found kernel configuration file.
+.It Sy mkernels
+Similar to the above
+.Sy kernels
+operation, but builds kernels in modular build.
 .It Sy modules
 This command will build kernel modules and install them into
 .Sy DESTDIR .



CVS commit: src

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 06:10:55 UTC 2014

Modified Files:
src: BUILDING

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/BUILDING

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

Modified files:

Index: src/BUILDING
diff -u src/BUILDING:1.116 src/BUILDING:1.117
--- src/BUILDING:1.116	Sun Nov 16 05:45:43 2014
+++ src/BUILDING	Sun Nov 16 06:10:55 2014
@@ -846,6 +846,9 @@ BUILDING
This command internally calls the kernel=kconf operation
for each found kernel configuration file.
 
+ mkernels  Similar to the above kernels operation, but builds kernels
+   in modular build.
+
  modules   This command will build kernel modules and install them
into DESTDIR.
 



CVS import: src/external/public-domain/tz/dist

2014-11-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Nov 16 07:08:12 UTC 2014

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv20806

Log Message:
Import tzdata2014j from ftp://ftp.iana.org/tz/releases/tzdata2014j.tar.gz

Summary of changes in tzdata2014j (2014-11-10 17:37:11 -0800):
  * Turks  Caicos' switch from US eastern time to UTC-4 year-round
did not occur on 2014-11-02 at 02:00.
  * Many pre-1989 time stamps have been corrected for Asia/Seoul and
Asia/Pyongyang, based on sources for the Korean-language Wikipedia
entry for time in Korea.
  * Some more zones have been turned into links, when they differed
from existing zones only for older (pre-1970) time stamps.
  * Changes affecting commentary.

Summary of changes in tzdata2014i (2014-10-21 22:04:57 -0700):
  * Pacific/Fiji will observe DST from 2014-11-02 02:00 to 2015-01-18 03:00.
  * A new Zone Pacific/Bougainville, for the part of Papua New Guinea
that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
  * Since Belarus is not changing its clocks even though Moscow is,
the time zone abbreviation in Europe/Minsk is changing from FET
to its more-traditional value MSK on 2014-10-26 at 01:00.
  * The new abbreviation IDT stands for the pre-1976 use of UT+8 in
Indochina, to distinguish it better from ICT (UT+7).
  * Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976.
Asia/Ho_Chi_Minh has been added to zone1970.tab, to give tzselect
users in Vietnam two choices, since north and south Vietnam
disagreed after our 1970 cutoff.
  * Asia/Phnom_Penh and Asia/Vientiane have been turned into links, as
they differed from existing zones only for older (pre-1970) time stamps.
  * Changes affecting commentary.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2014J

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/Theory
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/pacificnew
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/systemv
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/yearistype.sh
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl

No conflicts created by this import



CVS commit: src/usr.bin/config

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 16 07:12:34 UTC 2014

Modified Files:
src/usr.bin/config: TODO

Log Message:
config(1): TODO about namespace (esp. options vs. module)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/config/TODO

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

Modified files:

Index: src/usr.bin/config/TODO
diff -u src/usr.bin/config/TODO:1.13 src/usr.bin/config/TODO:1.14
--- src/usr.bin/config/TODO:1.13	Sun Nov 16 04:28:09 2014
+++ src/usr.bin/config/TODO	Sun Nov 16 07:12:34 2014
@@ -247,3 +247,18 @@ o Redesign swapnetbsd.c (root/swap devic
   Don't build a whole kernel only to specify root/swap devices.
 
   Make these parameter re-configurable afterwards.
+
+o Namespace.
+
+  Investigate namespace of attributes/modules/options.  Figure out the hidden
+  design about these, document it, then re-design it.
+
+  At this moment, all of them share the single selecttab, which means their
+  namespaces are common, but they also have respective tables (attrtab,
+  opttab, etc.).
+
+  Selecting an option (addoption()), that is also a module name, works only if
+  the module doesn't depend on anything, because addoption() doesn't select
+  module and its dependencies (selectattr()).  In other words, an option is
+  only safely converted to a module (define), only if it doesn't depend on
+  anything.  (One example is DDB.)



CVS commit: src/doc

2014-11-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Nov 16 07:17:10 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
Updated tzdata to 2014j.  tzcode2014j is also available.


To generate a diff of this commit:
cvs rdiff -u -r1.1172 -r1.1173 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1172 src/doc/3RDPARTY:1.1173
--- src/doc/3RDPARTY:1.1172	Fri Nov 14 12:02:20 2014
+++ src/doc/3RDPARTY	Sun Nov 16 07:17:10 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1172 2014/11/14 12:02:20 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1173 2014/11/16 07:17:10 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1311,8 +1311,8 @@ Notes:
 Added changes from a5 - a12 manually.
 
 Package:	tz
-Version:	tzcode2014i / tzdata2014i
-Current Vers:	tzcode2014i / tzdata2014i
+Version:	tzcode2014j / tzdata2014j
+Current Vers:	tzcode2014i / tzdata2014j
 Maintainer:	Paul Eggert egg...@cs.ucla.edu
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/



CVS commit: src/doc

2014-11-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Nov 16 07:17:50 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
zoneinfo: Import tzdata2014j. [apb 20141116]


To generate a diff of this commit:
cvs rdiff -u -r1.2017 -r1.2018 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.2017 src/doc/CHANGES:1.2018
--- src/doc/CHANGES:1.2017	Fri Nov 14 12:02:20 2014
+++ src/doc/CHANGES	Sun Nov 16 07:17:50 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2017 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2018 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -102,3 +102,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	awinhdmiaudio(4): Add support for Allwinner A20/A31 HDMI audio
 		controller. [jmcneill 2014]
 	dhcpcd(8): Import dhcpcd-6.6.2. [roy 20141114]
+	zoneinfo: Import tzdata2014j. [apb 20141116]