CVS commit: src/sys/net

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 08:57:14 UTC 2014

Modified Files:
src/sys/net: if.c

Log Message:
Avoid a race when the ifp-if_slowtimo pointer is changed while we are
running in if_slowtimo already. Suggested by Masao Uebayashi
in PR kern/49462.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.305 src/sys/net/if.c:1.306
--- src/sys/net/if.c:1.305	Thu Dec 11 14:33:22 2014
+++ src/sys/net/if.c	Sun Dec 14 08:57:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.305 2014/12/11 14:33:22 martin Exp $	*/
+/*	$NetBSD: if.c,v 1.306 2014/12/14 08:57:14 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.305 2014/12/11 14:33:22 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.306 2014/12/14 08:57:14 martin Exp $);
 
 #include opt_inet.h
 
@@ -1515,15 +1515,17 @@ if_up(struct ifnet *ifp)
 static void
 if_slowtimo(void *arg)
 {
+	void (*slowtimo)(struct ifnet *);
 	struct ifnet *ifp = arg;
 	int s;
 
-	if (__predict_false(ifp-if_slowtimo == NULL))
+	slowtimo = ifp-if_slowtimo;
+	if (__predict_false(slowtimo == NULL))
 		return;
 
 	s = splnet();
 	if (ifp-if_timer != 0  --ifp-if_timer == 0)
-		(*ifp-if_slowtimo)(ifp);
+		(*slowtimo)(ifp);
 
 	splx(s);
 



CVS commit: [nick-nhusb] src/sys/dev/usb

2014-12-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Dec 14 11:16:29 UTC 2014

Modified Files:
src/sys/dev/usb [nick-nhusb]: usbdivar.h

Log Message:
Match comment to code


To generate a diff of this commit:
cvs rdiff -u -r1.109.2.8 -r1.109.2.9 src/sys/dev/usb/usbdivar.h

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

Modified files:

Index: src/sys/dev/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.109.2.8 src/sys/dev/usb/usbdivar.h:1.109.2.9
--- src/sys/dev/usb/usbdivar.h:1.109.2.8	Sat Dec  6 08:27:23 2014
+++ src/sys/dev/usb/usbdivar.h	Sun Dec 14 11:16:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdivar.h,v 1.109.2.8 2014/12/06 08:27:23 skrll Exp $	*/
+/*	$NetBSD: usbdivar.h,v 1.109.2.9 2014/12/14 11:16:29 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -40,13 +40,14 @@
  *
  *	BUS METHOD		LOCK  NOTES
  *	--- ---	-
- *	open_pipe		-	might want to take lock?
- *	soft_intr		x
- *	do_poll			-	might want to take lock?
- *	allocx			-
- *	freex			-
- *	get_lock 		-	Called at attach time
- *	new_device
+ *	ubm_open		-	might want to take lock?
+ *	ubm_softint		x
+ *	ubm_dopoll		-	might want to take lock?
+ *	ubm_allocx		-
+ *	ubm_freex		-
+ *	ubm_getlock 		-	Called at attach time
+ *	ubm_newdev		-	Will take lock
+	ubm_rhctrl		
  *
  *	PIPE METHOD		LOCK  NOTES
  *	--- ---	-



CVS commit: src/sbin/cgdconfig

2014-12-14 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Dec 14 11:31:39 UTC 2014

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

Log Message:
support wedge names.

The default param file for a wedge is still named after the device (dkN)
which might be unpredictable. Use an explicit param file instead.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sbin/cgdconfig/cgdconfig.c

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

Modified files:

Index: src/sbin/cgdconfig/cgdconfig.c
diff -u src/sbin/cgdconfig/cgdconfig.c:1.35 src/sbin/cgdconfig/cgdconfig.c:1.36
--- src/sbin/cgdconfig/cgdconfig.c:1.35	Sun Jun  9 18:37:40 2013
+++ src/sbin/cgdconfig/cgdconfig.c	Sun Dec 14 11:31:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdconfig.c,v 1.35 2013/06/09 18:37:40 christos Exp $ */
+/* $NetBSD: cgdconfig.c,v 1.36 2014/12/14 11:31:39 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 2002, 2003\
  The NetBSD Foundation, Inc.  All rights reserved.);
-__RCSID($NetBSD: cgdconfig.c,v 1.35 2013/06/09 18:37:40 christos Exp $);
+__RCSID($NetBSD: cgdconfig.c,v 1.36 2014/12/14 11:31:39 mlelstv Exp $);
 #endif
 
 #include err.h
@@ -508,16 +508,34 @@ configure(int argc, char **argv, struct 
 	int		 loop = 0;
 	int		 ret;
 	char		 cgdname[PATH_MAX];
+	char		 devname[PATH_MAX];
+	const char	*dev;
+
+	if (argc == 2 || argc == 3) {
+		dev = getfsspecname(devname, sizeof(devname), argv[1]);
+		if (dev == NULL) {
+			warnx(getfsspecname failed: %s, devname);
+			return -1;
+		}
+	}
 
 	if (argc == 2) {
-		char *pfile;
+		char *pfile, *base;
+
+		/* make string writable for basename */
+		base = strdup(dev);
+		if (base == NULL)
+			return -1;
 
 		if (asprintf(pfile, %s/%s,
-		CGDCONFIG_DIR, basename(argv[1])) == -1)
+		CGDCONFIG_DIR, basename(base)) == -1) {
+			free(base);
 			return -1;
+		}
 
 		p = params_cget(pfile);
 		free(pfile);
+		free(base);
 	} else if (argc == 3) {
 		p = params_cget(argv[2]);
 	} else {
@@ -578,7 +596,7 @@ configure(int argc, char **argv, struct 
 		if (!p-key)
 			goto bail_err;
 
-		ret = configure_params(fd, cgdname, argv[1], p);
+		ret = configure_params(fd, cgdname, dev, p);
 		if (ret)
 			goto bail_err;
 
@@ -611,13 +629,21 @@ bail_err:
 static int
 configure_stdin(struct params *p, int argc, char **argv)
 {
-	int	fd;
-	int	ret;
-	char	cgdname[PATH_MAX];
+	int		 fd;
+	int		 ret;
+	char		 cgdname[PATH_MAX];
+	char		 devname[PATH_MAX];
+	const char	*dev;
 
 	if (argc  3 || argc  4)
 		usage();
 
+	dev = getfsspecname(devname, sizeof(devname), argv[1]);
+	if (dev == NULL) {
+		warnx(getfsspecname failed: %s, devname);
+		return -1;
+	}
+
 	p-algorithm = string_fromcharstar(argv[2]);
 	if (argc  3) {
 		size_t keylen;
@@ -643,7 +669,7 @@ configure_stdin(struct params *p, int ar
 		return -1;
 	}
 
-	return configure_params(fd, cgdname, argv[1], p);
+	return configure_params(fd, cgdname, dev, p);
 }
 
 static int



CVS commit: src/sbin/cgdconfig

2014-12-14 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Dec 14 12:31:39 UTC 2014

Modified Files:
src/sbin/cgdconfig: cgdconfig.8 cgdconfig.c params.c params.h

Log Message:
Add validation methods mbr and gpt for disks without a valid disklabel.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sbin/cgdconfig/cgdconfig.8
cvs rdiff -u -r1.36 -r1.37 src/sbin/cgdconfig/cgdconfig.c
cvs rdiff -u -r1.24 -r1.25 src/sbin/cgdconfig/params.c
cvs rdiff -u -r1.10 -r1.11 src/sbin/cgdconfig/params.h

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

Modified files:

Index: src/sbin/cgdconfig/cgdconfig.8
diff -u src/sbin/cgdconfig/cgdconfig.8:1.33 src/sbin/cgdconfig/cgdconfig.8:1.34
--- src/sbin/cgdconfig/cgdconfig.8:1.33	Wed Dec  5 08:56:54 2012
+++ src/sbin/cgdconfig/cgdconfig.8	Sun Dec 14 12:31:39 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: cgdconfig.8,v 1.33 2012/12/05 08:56:54 wiz Exp $
+.\ $NetBSD: cgdconfig.8,v 1.34 2014/12/14 12:31:39 mlelstv Exp $
 .\
 .\ Copyright (c) 2002, The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -208,6 +208,10 @@ The following verification methods are s
 perform no verification.
 .It disklabel
 scan for a valid disklabel.
+.It mbr
+scan for a valid Master Boot Record.
+.It gpt
+scan for a valid GUUID partition table.
 .It ffs
 scan for a valid FFS file system.
 .It re-enter

Index: src/sbin/cgdconfig/cgdconfig.c
diff -u src/sbin/cgdconfig/cgdconfig.c:1.36 src/sbin/cgdconfig/cgdconfig.c:1.37
--- src/sbin/cgdconfig/cgdconfig.c:1.36	Sun Dec 14 11:31:39 2014
+++ src/sbin/cgdconfig/cgdconfig.c	Sun Dec 14 12:31:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdconfig.c,v 1.36 2014/12/14 11:31:39 mlelstv Exp $ */
+/* $NetBSD: cgdconfig.c,v 1.37 2014/12/14 12:31:39 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 2002, 2003\
  The NetBSD Foundation, Inc.  All rights reserved.);
-__RCSID($NetBSD: cgdconfig.c,v 1.36 2014/12/14 11:31:39 mlelstv Exp $);
+__RCSID($NetBSD: cgdconfig.c,v 1.37 2014/12/14 12:31:39 mlelstv Exp $);
 #endif
 
 #include err.h
@@ -49,7 +49,9 @@ __RCSID($NetBSD: cgdconfig.c,v 1.36 201
 #include dirent.h
 
 #include sys/ioctl.h
+#include sys/bootblock.h
 #include sys/disklabel.h
+#include sys/disklabel_gpt.h
 #include sys/mman.h
 #include sys/param.h
 #include sys/resource.h
@@ -119,6 +121,8 @@ static int	 verify(struct params *, int)
 static int	 verify_disklabel(int);
 static int	 verify_ffs(int);
 static int	 verify_reenter(struct params *);
+static int	 verify_mbr(int);
+static int	 verify_gpt(int);
 
 __dead static void	 usage(void);
 
@@ -751,6 +755,10 @@ verify(struct params *p, int fd)
 		return verify_ffs(fd);
 	case VERIFY_REENTER:
 		return verify_reenter(p);
+	case VERIFY_MBR:
+		return verify_mbr(fd);
+	case VERIFY_GPT:
+		return verify_gpt(fd);
 	default:
 		warnx(unimplemented verification method);
 		return -1;
@@ -771,7 +779,7 @@ verify_disklabel(int fd)
 	 * partition information.
 	 */
 
-	ret = prog_pread(fd, buf, 8192, 0);
+	ret = prog_pread(fd, buf, SCANSIZE, 0);
 	if (ret  0) {
 		warn(can't read disklabel area);
 		return -1;
@@ -782,6 +790,133 @@ verify_disklabel(int fd)
 	return disklabel_scan(l, buf, (size_t)ret);
 }
 
+static int
+verify_mbr(int fd)
+{
+	struct mbr_sector mbr;
+	ssize_t	ret;
+	char	buf[SCANSIZE];
+
+	/*
+	 * we read the first blocks to avoid sector size issues and
+	 * verify the MBR in the beginning
+	 */
+
+	ret = prog_pread(fd, buf, SCANSIZE, 0);
+	if (ret  0) {
+		warn(can't read mbr area);
+		return -1;
+	}
+
+	memcpy(mbr, buf, sizeof(mbr));
+	if (le16toh(mbr.mbr_magic) != MBR_MAGIC)
+		return -1;
+
+	return 0;
+}
+
+static uint32_t crc32_tab[] = {
+	0x, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
+	0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+	0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
+	0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+	0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+	0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+	0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
+	0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+	0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
+	0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+	0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
+	0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+	0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
+	0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+	0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+	0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+	0x4db26158, 0x3ab551ce, 0xa3bc0074, 

CVS commit: src/sys/dev/pci

2014-12-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Dec 14 13:58:41 UTC 2014

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

Log Message:
fix bit flip in PM2_DAC_COLOR_MODE register
from Naruaki Etomi


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/pm2reg.h

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

Modified files:

Index: src/sys/dev/pci/pm2reg.h
diff -u src/sys/dev/pci/pm2reg.h:1.8 src/sys/dev/pci/pm2reg.h:1.9
--- src/sys/dev/pci/pm2reg.h:1.8	Wed Sep 12 12:07:04 2012
+++ src/sys/dev/pci/pm2reg.h	Sun Dec 14 13:58:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm2reg.h,v 1.8 2012/09/12 12:07:04 macallan Exp $	*/
+/*	$NetBSD: pm2reg.h,v 1.9 2014/12/14 13:58:41 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -146,7 +146,7 @@
 #define		CM_RGB565	0x06
 #define		CM_RGBA	0x08
 #define		CM_RGB888	0x09
-#define		CM_GUI_DISABLE	0x10
+#define		CM_GUI_ENABLE	0x10
 #define		CM_RGB		0x20	/* BGR otherwise */
 #define		CM_TRUECOLOR	0x80	/* use palette for gamma correction */
 



CVS commit: [netbsd-6] src/sys/compat/netbsd32

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 13:59:09 UTC 2014

Modified Files:
src/sys/compat/netbsd32 [netbsd-6]: netbsd32_compat_30.c

Log Message:
Pull up revision 1.31, requested by maxv in #1209:

Prevent a user-triggerable kmem_alloc(0).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.14.1 src/sys/compat/netbsd32/netbsd32_compat_30.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/compat/netbsd32/netbsd32_compat_30.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30.14.1
--- src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30	Fri Apr 23 15:19:20 2010
+++ src/sys/compat/netbsd32/netbsd32_compat_30.c	Sun Dec 14 13:59:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $	*/
+/*	$NetBSD: netbsd32_compat_30.c,v 1.30.14.1 2014/12/14 13:59:08 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30.14.1 2014/12/14 13:59:08 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -78,6 +78,9 @@ compat_30_netbsd32_getdents(struct lwp *
 		error = EBADF;
 		goto out;
 	}
+	if (count == 0)
+		goto out;
+
 	buf = kmem_alloc(count, KM_SLEEP);
 	error = vn_readdir(fp, buf, UIO_SYSSPACE, count, done, l, 0, 0);
 	if (error == 0) {



CVS commit: [netbsd-6-1] src/sys/compat/netbsd32

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:02:50 UTC 2014

Modified Files:
src/sys/compat/netbsd32 [netbsd-6-1]: netbsd32_compat_30.c

Log Message:
Pull up revision 1.31, requested by maxv in #1209:

Prevent a user-triggerable kmem_alloc(0).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.28.1 src/sys/compat/netbsd32/netbsd32_compat_30.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/compat/netbsd32/netbsd32_compat_30.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30.28.1
--- src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30	Fri Apr 23 15:19:20 2010
+++ src/sys/compat/netbsd32/netbsd32_compat_30.c	Sun Dec 14 14:02:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $	*/
+/*	$NetBSD: netbsd32_compat_30.c,v 1.30.28.1 2014/12/14 14:02:50 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30.28.1 2014/12/14 14:02:50 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -78,6 +78,9 @@ compat_30_netbsd32_getdents(struct lwp *
 		error = EBADF;
 		goto out;
 	}
+	if (count == 0)
+		goto out;
+
 	buf = kmem_alloc(count, KM_SLEEP);
 	error = vn_readdir(fp, buf, UIO_SYSSPACE, count, done, l, 0, 0);
 	if (error == 0) {



CVS commit: [netbsd-6-0] src/sys/compat/netbsd32

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:03:28 UTC 2014

Modified Files:
src/sys/compat/netbsd32 [netbsd-6-0]: netbsd32_compat_30.c

Log Message:
Pull up revision 1.31, requested by maxv in #1209:

Prevent a user-triggerable kmem_alloc(0).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.20.1 src/sys/compat/netbsd32/netbsd32_compat_30.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/compat/netbsd32/netbsd32_compat_30.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30.20.1
--- src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30	Fri Apr 23 15:19:20 2010
+++ src/sys/compat/netbsd32/netbsd32_compat_30.c	Sun Dec 14 14:03:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $	*/
+/*	$NetBSD: netbsd32_compat_30.c,v 1.30.20.1 2014/12/14 14:03:28 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30.20.1 2014/12/14 14:03:28 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -78,6 +78,9 @@ compat_30_netbsd32_getdents(struct lwp *
 		error = EBADF;
 		goto out;
 	}
+	if (count == 0)
+		goto out;
+
 	buf = kmem_alloc(count, KM_SLEEP);
 	error = vn_readdir(fp, buf, UIO_SYSSPACE, count, done, l, 0, 0);
 	if (error == 0) {



CVS commit: [netbsd-6] src/doc

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:04:50 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #1209


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.164 -r1.1.2.165 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.164 src/doc/CHANGES-6.2:1.1.2.165
--- src/doc/CHANGES-6.2:1.1.2.164	Fri Dec 12 07:15:43 2014
+++ src/doc/CHANGES-6.2	Sun Dec 14 14:04:50 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.164 2014/12/12 07:15:43 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.165 2014/12/14 14:04:50 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -4775,3 +4775,8 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2014-8103
 	[mrg, ticket #1208]
 
+sys/compat/netbsd32/netbsd32_compat_30.c	1.31
+
+	Prevent a user-triggerable kmem_alloc(0).
+	[maxv, ticket #1209]
+



CVS commit: [netbsd-6-1] src/doc

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:05:42 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Ticket #1209


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.1.6

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-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.15 src/doc/CHANGES-6.1.6:1.1.2.16
--- src/doc/CHANGES-6.1.6:1.1.2.15	Fri Dec 12 07:21:20 2014
+++ src/doc/CHANGES-6.1.6	Sun Dec 14 14:05:42 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.15 2014/12/12 07:21:20 snj Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.16 2014/12/14 14:05:42 martin Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -336,3 +336,8 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2014-8103
 	[mrg, ticket #1208]
 
+sys/compat/netbsd32/netbsd32_compat_30.c	1.31
+
+	Prevent a user-triggerable kmem_alloc(0).
+	[maxv, ticket #1209]
+



CVS commit: [netbsd-6-0] src/doc

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:06:27 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
Ticket #1209


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.0.7

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-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.15 src/doc/CHANGES-6.0.7:1.1.2.16
--- src/doc/CHANGES-6.0.7:1.1.2.15	Fri Dec 12 07:28:02 2014
+++ src/doc/CHANGES-6.0.7	Sun Dec 14 14:06:26 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.15 2014/12/12 07:28:02 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.16 2014/12/14 14:06:26 martin Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -336,3 +336,8 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2014-8103
 	[mrg, ticket #1208]
 
+sys/compat/netbsd32/netbsd32_compat_30.c	1.31
+
+	Prevent a user-triggerable kmem_alloc(0).
+	[maxv, ticket #1209]
+



CVS commit: [netbsd-6] src/distrib/utils/sysinst/arch/atari

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:14:48 UTC 2014

Modified Files:
src/distrib/utils/sysinst/arch/atari [netbsd-6]: msg.md.de msg.md.en
msg.md.es

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1210):
usr.sbin/sysinst/arch/atari/msg.md.de: revision 1.2
usr.sbin/sysinst/arch/atari/msg.md.en: revision 1.2
usr.sbin/sysinst/arch/atari/msg.md.es: revision 1.2
Terminate messages with a newline so that dialog box won't overwrite messages.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.6.1 src/distrib/utils/sysinst/arch/atari/msg.md.de
cvs rdiff -u -r1.10 -r1.10.6.1 src/distrib/utils/sysinst/arch/atari/msg.md.en
cvs rdiff -u -r1.5 -r1.5.6.1 src/distrib/utils/sysinst/arch/atari/msg.md.es

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/sysinst/arch/atari/msg.md.de
diff -u src/distrib/utils/sysinst/arch/atari/msg.md.de:1.7 src/distrib/utils/sysinst/arch/atari/msg.md.de:1.7.6.1
--- src/distrib/utils/sysinst/arch/atari/msg.md.de:1.7	Mon Apr  4 08:30:19 2011
+++ src/distrib/utils/sysinst/arch/atari/msg.md.de	Sun Dec 14 14:14:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.de,v 1.7 2011/04/04 08:30:19 mbalmer Exp $	*/
+/*	$NetBSD: msg.md.de,v 1.7.6.1 2014/12/14 14:14:48 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -62,7 +62,8 @@ zu nutzen. Stellen Sie die 'Id' all jene
 wollen, auf 'NBD'. Setzen Sie zusätzlich die 'Id' der als Swap zu nutzenden
 Partition auf 'SWP'.
 
-Wünschen Sie eine AHDI-kompatible Partitionierung? }
+Wünschen Sie eine AHDI-kompatible Partitionierung?
+}
 
 message set_kernel_1
 {Kernel (ATARITT)}

Index: src/distrib/utils/sysinst/arch/atari/msg.md.en
diff -u src/distrib/utils/sysinst/arch/atari/msg.md.en:1.10 src/distrib/utils/sysinst/arch/atari/msg.md.en:1.10.6.1
--- src/distrib/utils/sysinst/arch/atari/msg.md.en:1.10	Mon Apr  4 08:30:19 2011
+++ src/distrib/utils/sysinst/arch/atari/msg.md.en	Sun Dec 14 14:14:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.10 2011/04/04 08:30:19 mbalmer Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.10.6.1 2014/12/14 14:14:48 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,7 +58,8 @@ partitions to NetBSD before NetBSD is ab
 of all partitions you want to use for NetBSD file systems to 'NBD'. Change
 the 'id' of the partition you wish to use for swap to 'SWP'.
 
-Do you want AHDI compatible partitioning? }
+Do you want AHDI compatible partitioning?
+}
 
 message set_kernel_1
 {Kernel (ATARITT)}

Index: src/distrib/utils/sysinst/arch/atari/msg.md.es
diff -u src/distrib/utils/sysinst/arch/atari/msg.md.es:1.5 src/distrib/utils/sysinst/arch/atari/msg.md.es:1.5.6.1
--- src/distrib/utils/sysinst/arch/atari/msg.md.es:1.5	Mon Apr  4 08:30:19 2011
+++ src/distrib/utils/sysinst/arch/atari/msg.md.es	Sun Dec 14 14:14:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.es,v 1.5 2011/04/04 08:30:19 mbalmer Exp $	*/
+/*	$NetBSD: msg.md.es,v 1.5.6.1 2014/12/14 14:14:48 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,7 +58,8 @@ particiones a NetBSD antes de que NetBSD
 de todas las particiones en las que quiera usar sistemas de archivos NetBSD
 a 'NBD'. Cambie la 'id' de la partición en la que quiera usar swap a 'SWP'.
 
-Quiere un particionaje compatible con AHDI? }
+Quiere un particionaje compatible con AHDI?
+}
 
 message set_kernel_1
 {Núcleo (ATARITT)}



CVS commit: [netbsd-6] src/sys/arch/atari/stand/bootxx

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:21:21 UTC 2014

Modified Files:
src/sys/arch/atari/stand/bootxx [netbsd-6]: bootxx.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1211):
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.16
Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.
Tested on TT030 with 32GB SSD via SATA-IDE-SCSI converters.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.18.1 src/sys/arch/atari/stand/bootxx/bootxx.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/atari/stand/bootxx/bootxx.c
diff -u src/sys/arch/atari/stand/bootxx/bootxx.c:1.15 src/sys/arch/atari/stand/bootxx/bootxx.c:1.15.18.1
--- src/sys/arch/atari/stand/bootxx/bootxx.c:1.15	Mon Aug 24 13:04:37 2009
+++ src/sys/arch/atari/stand/bootxx/bootxx.c	Sun Dec 14 14:21:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxx.c,v 1.15 2009/08/24 13:04:37 tsutsui Exp $	*/
+/*	$NetBSD: bootxx.c,v 1.15.18.1 2014/12/14 14:21:21 martin Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens.
@@ -49,6 +49,11 @@ int	bootxxx(void *, void *, struct osdsc
 int	load_booter(struct osdsc *);
 int	usr_info(struct osdsc *);
 
+#define	BOOTXXX_MAXSIZE	(64 * 1024)
+#define	HEAPSIZE	(64 * 1024)	/* should be 32KB for ffs blocksize */
+#define	HEAPSTART	(LOADADDR3 + BOOTXXX_MAXSIZE)
+#define	HEAPEND		(HEAPSTART + HEAPSIZE)
+
 int
 bootxx(void *readsector, void *disklabel, int autoboot)
 {
@@ -58,10 +63,10 @@ bootxx(void *readsector, void *disklabel
 	bxxx_t		bootxxx = (bxxx_t)(LOADADDR3);
 
 	memset(edata, 0, end - edata);
-	setheap(end, (void*)(LOADADDR3 - 4));
+	setheap((void *)HEAPSTART, (void *)HEAPEND);
 
 	printf(\033v\nNetBSD/atari secondary bootloader
-		 ($Revision: 1.15 $)\n\n);
+		 ($Revision: 1.15.18.1 $)\n\n);
 
 	if (init_dskio(readsector, disklabel, -1))
 		return -1;



CVS commit: [netbsd-6] src/sys/dev/ic

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 14:24:56 UTC 2014

Modified Files:
src/sys/dev/ic [netbsd-6]: rtl8169.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1212):
sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.134.4.3 -r1.134.4.4 src/sys/dev/ic/rtl8169.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/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.134.4.3 src/sys/dev/ic/rtl8169.c:1.134.4.4
--- src/sys/dev/ic/rtl8169.c:1.134.4.3	Wed Sep 18 20:00:53 2013
+++ src/sys/dev/ic/rtl8169.c	Sun Dec 14 14:24:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.134.4.3 2013/09/18 20:00:53 bouyer Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.134.4.4 2014/12/14 14:24:56 martin Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.134.4.3 2013/09/18 20:00:53 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.134.4.4 2014/12/14 14:24:56 martin Exp $);
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -1298,9 +1298,19 @@ re_rxeof(struct rtk_softc *sc)
 		M_CSUM_TCP_UDP_BAD;
 } else if (RE_UDPPKT(rxstat)) {
 	m-m_pkthdr.csum_flags |= M_CSUM_UDPv4;
-	if (rxstat  RE_RDESC_STAT_UDPSUMBAD)
-		m-m_pkthdr.csum_flags |=
-		M_CSUM_TCP_UDP_BAD;
+	if (rxstat  RE_RDESC_STAT_UDPSUMBAD) {
+		/*
+		 * XXX: 8139C+ thinks UDP csum
+		 * 0x is bad, force software
+		 * calculation.
+		 */
+		if (sc-sc_quirk  RTKQ_8139CPLUS)
+			m-m_pkthdr.csum_flags
+			= ~M_CSUM_UDPv4;
+		else
+			m-m_pkthdr.csum_flags
+			|= M_CSUM_TCP_UDP_BAD;
+	}
 }
 			}
 		} else {



CVS commit: [netbsd-7] src/usr.sbin/sysinst/arch/atari

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 15:14:47 UTC 2014

Modified Files:
src/usr.sbin/sysinst/arch/atari [netbsd-7]: msg.md.de msg.md.en
msg.md.es

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #320):
usr.sbin/sysinst/arch/atari/msg.md.de: revision 1.2
usr.sbin/sysinst/arch/atari/msg.md.en: revision 1.2
usr.sbin/sysinst/arch/atari/msg.md.es: revision 1.2
Terminate messages with a newline so that dialog box won't overwrite messages.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.4.1 src/usr.sbin/sysinst/arch/atari/msg.md.de \
src/usr.sbin/sysinst/arch/atari/msg.md.en \
src/usr.sbin/sysinst/arch/atari/msg.md.es

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

Modified files:

Index: src/usr.sbin/sysinst/arch/atari/msg.md.de
diff -u src/usr.sbin/sysinst/arch/atari/msg.md.de:1.1 src/usr.sbin/sysinst/arch/atari/msg.md.de:1.1.4.1
--- src/usr.sbin/sysinst/arch/atari/msg.md.de:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/arch/atari/msg.md.de	Sun Dec 14 15:14:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:44 dholland Exp $	*/
+/*	$NetBSD: msg.md.de,v 1.1.4.1 2014/12/14 15:14:47 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -62,7 +62,8 @@ zu nutzen. Stellen Sie die 'Id' all jene
 wollen, auf 'NBD'. Setzen Sie zusätzlich die 'Id' der als Swap zu nutzenden
 Partition auf 'SWP'.
 
-Wünschen Sie eine AHDI-kompatible Partitionierung? }
+Wünschen Sie eine AHDI-kompatible Partitionierung?
+}
 
 message set_kernel_1
 {Kernel (ATARITT)}
Index: src/usr.sbin/sysinst/arch/atari/msg.md.en
diff -u src/usr.sbin/sysinst/arch/atari/msg.md.en:1.1 src/usr.sbin/sysinst/arch/atari/msg.md.en:1.1.4.1
--- src/usr.sbin/sysinst/arch/atari/msg.md.en:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/arch/atari/msg.md.en	Sun Dec 14 15:14:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.1.4.1 2014/12/14 15:14:47 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,7 +58,8 @@ partitions to NetBSD before NetBSD is ab
 of all partitions you want to use for NetBSD file systems to 'NBD'. Change
 the 'id' of the partition you wish to use for swap to 'SWP'.
 
-Do you want AHDI compatible partitioning? }
+Do you want AHDI compatible partitioning?
+}
 
 message set_kernel_1
 {Kernel (ATARITT)}
Index: src/usr.sbin/sysinst/arch/atari/msg.md.es
diff -u src/usr.sbin/sysinst/arch/atari/msg.md.es:1.1 src/usr.sbin/sysinst/arch/atari/msg.md.es:1.1.4.1
--- src/usr.sbin/sysinst/arch/atari/msg.md.es:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/arch/atari/msg.md.es	Sun Dec 14 15:14:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $	*/
+/*	$NetBSD: msg.md.es,v 1.1.4.1 2014/12/14 15:14:47 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,7 +58,8 @@ particiones a NetBSD antes de que NetBSD
 de todas las particiones en las que quiera usar sistemas de archivos NetBSD
 a 'NBD'. Cambie la 'id' de la partición en la que quiera usar swap a 'SWP'.
 
-Quiere un particionaje compatible con AHDI? }
+Quiere un particionaje compatible con AHDI?
+}
 
 message set_kernel_1
 {Núcleo (ATARITT)}



CVS commit: [netbsd-6] src/doc

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 15:16:30 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Tickets #1210-#1212


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.165 -r1.1.2.166 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.165 src/doc/CHANGES-6.2:1.1.2.166
--- src/doc/CHANGES-6.2:1.1.2.165	Sun Dec 14 14:04:50 2014
+++ src/doc/CHANGES-6.2	Sun Dec 14 15:16:30 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.165 2014/12/14 14:04:50 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.166 2014/12/14 15:16:30 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -4780,3 +4780,25 @@ sys/compat/netbsd32/netbsd32_compat_30.c
 	Prevent a user-triggerable kmem_alloc(0).
 	[maxv, ticket #1209]
 
+usr.sbin/sysinst/arch/atari/msg.md.de		1.2
+usr.sbin/sysinst/arch/atari/msg.md.en		1.2
+usr.sbin/sysinst/arch/atari/msg.md.es		1.2
+(target files in distrib/utils/sysinst/arch/atari due to source move)
+
+	Terminate messages with a newline so that dialog box won't
+	overwrite messages.
+	[tsutsui, ticket #1210]
+
+sys/arch/atari/stand/bootxx/bootxx.c		1.16
+
+	Expand heap to 64KB so that bootxx can load bootxxx from 32KB
+	blocksize ffs.
+	[tsutsui, ticket #1211]
+
+sys/dev/ic/rtl8169.c1.142
+
+	RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
+	Force software recalculation of UDP checksum if bad checksum is
+	reported by the hardware.
+	[uwe, ticket #1212]
+



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

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 15:22:28 UTC 2014

Modified Files:
src/sys/arch/atari/conf [netbsd-7]: GENERIC.in

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #321):
sys/arch/atari/conf/ATARITT: revision 1.116
sys/arch/atari/conf/FALCON: revision 1.113
sys/arch/atari/conf/HADES: revision 1.107
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.88
sys/arch/atari/conf/SMALL030: revision 1.20
sys/arch/atari/conf/GENERIC.in: revision 1.109
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.84
Shrink GENERIC and enable options MODULAR instead, as other poor m68k ports.

This allows all (at least ATARITT and FALCON, which have certain users)
gzipped kernel binaries put into 1440KB 2HD floppy so that users can
load these kernels on the native TOS using LOADBSD.TTP utility for
installation.  Note SMALL030 kernel doesn't include any Ethernet
configuration and requires CD-ROM or other removable disks.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.106.2.1 src/sys/arch/atari/conf/GENERIC.in

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/atari/conf/GENERIC.in
diff -u src/sys/arch/atari/conf/GENERIC.in:1.106 src/sys/arch/atari/conf/GENERIC.in:1.106.2.1
--- src/sys/arch/atari/conf/GENERIC.in:1.106	Sat Jul  5 09:28:48 2014
+++ src/sys/arch/atari/conf/GENERIC.in	Sun Dec 14 15:22:28 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.in,v 1.106 2014/07/05 09:28:48 tsutsui Exp $
+#	$NetBSD: GENERIC.in,v 1.106.2.1 2014/12/14 15:22:28 martin Exp $
 #
 # Generic atari
 #
@@ -84,9 +84,9 @@ options 	PPP_BSDCOMP	# BSD-Compress comp
 options 	PPP_DEFLATE	# Deflate compression support for PPP
 options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
 
-options 	IPFILTER_LOG	# ipmon(8) log support
-options 	IPFILTER_LOOKUP	# ippool(8) support
-options 	IPFILTER_COMPAT # Compat for IP-Filter
+#options 	IPFILTER_LOG	# ipmon(8) log support
+#options 	IPFILTER_LOOKUP	# ippool(8) support
+#options 	IPFILTER_COMPAT # Compat for IP-Filter
 #options  	IPFILTER_DEFAULT_BLOCK	# block packages by default
 
 #options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
@@ -116,13 +116,13 @@ file-system 	CD9660		# ISO 9660 filesyst
 file-system 	KERNFS		# Kernel parameter filesystem
 file-system 	NFS		# Network File System client side code
 file-system 	PROCFS		# Process filesystem
-file-system 	FDESC		# /dev/fd
+#file-system 	FDESC		# /dev/fd
 file-system 	NULLFS		# Loopback filesystem
-file-system 	OVERLAY		# overlay filesystem
-file-system 	UNION		# union file system
-file-system 	UMAPFS		# null file system (with uid  gid remapping)
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-file-system 	EXT2FS		# second extended file system (linux)
+#file-system 	OVERLAY		# overlay filesystem
+#file-system 	UNION		# union file system
+#file-system 	UMAPFS		# null file system (with uid  gid remapping)
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system 	EXT2FS		# second extended file system (linux)
 #file-system 	LFS		# log-structured file system
 file-system	PTYFS		# /dev/pts/N support
 file-system	TMPFS		# Efficient memory file-system
@@ -130,6 +130,7 @@ file-system	TMPFS		# Efficient memory fi
 
 # File system options
 options 	WAPBL		# File system journaling support
+options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 #if !defined(SMALL030_KERNEL)
 #options 	QUOTA		# legacy UFS quotas
 #options 	QUOTA2		# new, in-filesystem UFS quotas
@@ -197,6 +198,7 @@ options 	KTRACE			# Add kernel tracing s
 options 	USERCONF		# userconf(4) support
 #options	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
+options 	MODULAR			# new style module(7) framework
 #else /* SMALL030_KERNEL */
 options		PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 #endif /* !SMALL030_KERNEL */
@@ -204,10 +206,10 @@ options		PIPE_SOCKETPAIR	# smaller, but 
 # These options enable verbose messages for several subsystems.
 # Warning, these may compile large string tables into the kernel!
 #if !defined(SMALL030_KERNEL)
-options 	SCSIVERBOSE		# human readable SCSI error messages
+#options 	SCSIVERBOSE		# human readable SCSI error messages
 #endif /* !SMALL030_KERNEL */
 #if defined(HADES_KERNEL) || defined(MILAN_KERNEL)
-options 	MIIVERBOSE		# verbose PHY autoconfig messages
+#options 	MIIVERBOSE		# verbose PHY autoconfig messages
 #options 	PCIVERBOSE		# verbose PCI device autoconfig messages
 #options 	PCI_CONFIG_DUMP		# verbosely dump PCI config space
 #endif
@@ -253,20 +255,20 @@ pseudo-device	sl			# Slip
 pseudo-device	ppp			# ppp
 #endif /* !SMALL030_KERNEL */
 #if !defined(NO_PHYS_NETWORK)
-pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
+#pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
 #endif /* NO_PHYS_NETWORK */

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

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 15:23:36 UTC 2014

Modified Files:
src/sys/arch/atari/conf [netbsd-7]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
Regen for #321


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.113.2.1 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.110 -r1.110.2.1 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.104 -r1.104.2.1 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.85 -r1.85.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.113 src/sys/arch/atari/conf/ATARITT:1.113.2.1
--- src/sys/arch/atari/conf/ATARITT:1.113	Sat Jul  5 09:31:21 2014
+++ src/sys/arch/atari/conf/ATARITT	Sun Dec 14 15:23:36 2014
@@ -1,11 +1,11 @@
 #
-# $NetBSD: ATARITT,v 1.113 2014/07/05 09:31:21 tsutsui Exp $
+# $NetBSD: ATARITT,v 1.113.2.1 2014/12/14 15:23:36 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.106 2014/07/05 09:28:48 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.106.2.1 2014/12/14 15:22:28 martin Exp $
 include arch/atari/conf/std.atari
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS=-O2 -fno-reorder-blocks # see share/mk/sys.mk
@@ -18,9 +18,6 @@ options INET6 # IPV6
 options PPP_BSDCOMP # BSD-Compress compression support for PPP
 options PPP_DEFLATE # Deflate compression support for PPP
 options PPP_FILTER # Active filter support for PPP (requires bpf)
-options IPFILTER_LOG # ipmon(8) log support
-options IPFILTER_LOOKUP # ippool(8) support
-options IPFILTER_COMPAT # Compat for IP-Filter
 file-system FFS # Berkeley fast file system
 file-system MFS # Memory based filesystem
 file-system MSDOSFS # MSDOS filesystem
@@ -28,16 +25,11 @@ file-system CD9660 # ISO 9660 filesystem
 file-system KERNFS # Kernel parameter filesystem
 file-system NFS # Network File System client side code
 file-system PROCFS # Process filesystem
-file-system FDESC # /dev/fd
 file-system NULLFS # Loopback filesystem
-file-system OVERLAY # overlay filesystem
-file-system UNION # union file system
-file-system UMAPFS # null file system (with uid  gid remapping)
-file-system PUFFS # Userspace file systems (e.g. ntfs-3g  sshfs)
-file-system EXT2FS # second extended file system (linux)
 file-system PTYFS # /dev/pts/N support
 file-system TMPFS # Efficient memory file-system
 options WAPBL # File system journaling support
+options FFS_NO_SNAPSHOT # No FFS snapshot support
 options NFSSERVER # Network File System server side code
 options PANICWAIT # Require keystroke to dump/reboot
 options DDB # Kernel debugger
@@ -64,7 +56,7 @@ options SYSVSEM # System V semaphores
 options KTRACE # Add kernel tracing system call
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
-options SCSIVERBOSE # human readable SCSI error messages
+options MODULAR # new style module(7) framework
 options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
 options TT_SCSI # SCSI-support for TT
 options TT_VIDEO # Graphics support for TT
@@ -77,20 +69,13 @@ options TRY_SCSI_LINKED_COMMANDS=0x7f
 config netbsd root on ? type ?
 pseudo-device sl # Slip
 pseudo-device ppp # ppp
-pseudo-device pppoe # PPP over Ethernet (RFC 2516)
 pseudo-device pty # pseudo-terminals
 pseudo-device loop # Loopback network
 pseudo-device md # Boot memory disk
-pseudo-device putter # for puffs and pud
 pseudo-device vnd # 3 pseudo disks (see vnconfig)
 pseudo-device bpfilter # berkeley packet filters
-pseudo-device tun # network tunnel
-pseudo-device tap # virtual Ethernet
 pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC1933)
 pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation
-pseudo-device ccd # concatenating disk driver
-pseudo-device fss # file system snapshot device
-pseudo-device ipfilter # IP filtering device
 pseudo-device clockctl # user control of clock subsystem
 pseudo-device ksyms # /dev/ksyms
 pseudo-device view 4 # View (graphics mapping)
@@ -117,8 +102,4 @@ et4k0 at vme0 # Crazy Dots II
 scsibus* at scsi? # SCSI bus
 sd* at scsibus? target ? lun ? # SCSI disk drives
 cd* at scsibus? target ? lun ? # SCSI CD-ROM drives
-st* at scsibus? target ? lun ? # SCSI tape drives
-ch* at scsibus? target ? lun ? # SCSI autochangers
-ss* at scsibus? target ? lun ? # SCSI scanners
 se* at scsibus? target ? lun ? # SCSI ethernet
-uk* at scsibus? target ? lun ? # SCSI unknown

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.110 src/sys/arch/atari/conf/FALCON:1.110.2.1
--- src/sys/arch/atari/conf/FALCON:1.110	Sat Jul  5 

CVS commit: src/doc

2014-12-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 14 16:05:29 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
mdocml-1.13.2 out.


To generate a diff of this commit:
cvs rdiff -u -r1.1181 -r1.1182 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.1181 src/doc/3RDPARTY:1.1182
--- src/doc/3RDPARTY:1.1181	Wed Dec 10 04:39:56 2014
+++ src/doc/3RDPARTY	Sun Dec 14 16:05:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1181 2014/12/10 04:39:56 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1182 2014/12/14 16:05:29 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -802,7 +802,7 @@ Notes:
 
 Package:	mdocml
 Version:	1.12.1
-Current Vers:	1.13.1
+Current Vers:	1.13.2
 Maintainer:	Kristaps Džonsons
 Archive Site:	http://mdocml.bsd.lv/snapshots/
 Home Page:	http://mdocml.bsd.lv/



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

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 16:36:32 UTC 2014

Modified Files:
src/sys/arch/atari/stand/bootxx [netbsd-7]: bootxx.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #322):
sys/arch/atari/stand/bootxx/bootxx.c: revision 1.16
Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.
Tested on TT030 with 32GB SSD via SATA-IDE-SCSI converters.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.38.1 src/sys/arch/atari/stand/bootxx/bootxx.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/atari/stand/bootxx/bootxx.c
diff -u src/sys/arch/atari/stand/bootxx/bootxx.c:1.15 src/sys/arch/atari/stand/bootxx/bootxx.c:1.15.38.1
--- src/sys/arch/atari/stand/bootxx/bootxx.c:1.15	Mon Aug 24 13:04:37 2009
+++ src/sys/arch/atari/stand/bootxx/bootxx.c	Sun Dec 14 16:36:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxx.c,v 1.15 2009/08/24 13:04:37 tsutsui Exp $	*/
+/*	$NetBSD: bootxx.c,v 1.15.38.1 2014/12/14 16:36:32 martin Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens.
@@ -49,6 +49,11 @@ int	bootxxx(void *, void *, struct osdsc
 int	load_booter(struct osdsc *);
 int	usr_info(struct osdsc *);
 
+#define	BOOTXXX_MAXSIZE	(64 * 1024)
+#define	HEAPSIZE	(64 * 1024)	/* should be 32KB for ffs blocksize */
+#define	HEAPSTART	(LOADADDR3 + BOOTXXX_MAXSIZE)
+#define	HEAPEND		(HEAPSTART + HEAPSIZE)
+
 int
 bootxx(void *readsector, void *disklabel, int autoboot)
 {
@@ -58,10 +63,10 @@ bootxx(void *readsector, void *disklabel
 	bxxx_t		bootxxx = (bxxx_t)(LOADADDR3);
 
 	memset(edata, 0, end - edata);
-	setheap(end, (void*)(LOADADDR3 - 4));
+	setheap((void *)HEAPSTART, (void *)HEAPEND);
 
 	printf(\033v\nNetBSD/atari secondary bootloader
-		 ($Revision: 1.15 $)\n\n);
+		 ($Revision: 1.15.38.1 $)\n\n);
 
 	if (init_dskio(readsector, disklabel, -1))
 		return -1;



CVS commit: [netbsd-7] src/usr.sbin/installboot/arch

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 16:41:30 UTC 2014

Modified Files:
src/usr.sbin/installboot/arch [netbsd-7]: vax.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #323):
usr.sbin/installboot/arch/vax.c: revision 1.18
Use VAX_LABELOFFSET here; It needs to be the machine-specific one. Thanks
to gcc-4.8 for discovering the bug and to Atari for having a LABELOFFSET of
516  512 :-)
XXX: Perhaps we should put all those constants in sys/bootblock.h instead
of spreading them around.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.6.1 src/usr.sbin/installboot/arch/vax.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.sbin/installboot/arch/vax.c
diff -u src/usr.sbin/installboot/arch/vax.c:1.17 src/usr.sbin/installboot/arch/vax.c:1.17.6.1
--- src/usr.sbin/installboot/arch/vax.c:1.17	Sun Jun 16 19:05:00 2013
+++ src/usr.sbin/installboot/arch/vax.c	Sun Dec 14 16:41:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vax.c,v 1.17 2013/06/16 19:05:00 martin Exp $	*/
+/*	$NetBSD: vax.c,v 1.17.6.1 2014/12/14 16:41:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
 
 #include sys/cdefs.h
 #if !defined(__lint)
-__RCSID($NetBSD: vax.c,v 1.17 2013/06/16 19:05:00 martin Exp $);
+__RCSID($NetBSD: vax.c,v 1.17.6.1 2014/12/14 16:41:30 martin Exp $);
 #endif	/* !__lint */
 
 #include sys/param.h
@@ -88,6 +88,8 @@ __RCSID($NetBSD: vax.c,v 1.17 2013/06/1
 
 #include installboot.h
 
+#define	VAX_LABELOFFSET		64
+
 #ifndef __CTASSERT
 #define	__CTASSERT(X)
 #endif
@@ -210,12 +212,12 @@ vax_setboot(ib_params *params)
 
 	/*
 	 * Copy disklabel from old boot block to new.
-	 * Assume everything between LABELOFFSET and the start of
+	 * Assume everything between VAX_LABELOFFSET and the start of
 	 * the param block is scratch area and can be copied over.
 	 */
-	memcpy(bootstrapbuf+LABELOFFSET,
-	oldbb+LABELOFFSET,
-	offsetof(struct vax_boot_block,bb_magic1)-LABELOFFSET);
+	memcpy(bootstrapbuf + VAX_LABELOFFSET,
+	oldbb + VAX_LABELOFFSET,
+	offsetof(struct vax_boot_block,bb_magic1) - VAX_LABELOFFSET);
 
 	/* point to bootblock at begining of bootstrap */
 	bb = (struct vax_boot_block*)bootstrapbuf;



CVS commit: [netbsd-7] src/sys/dev/ic

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 16:44:04 UTC 2014

Modified Files:
src/sys/dev/ic [netbsd-7]: rtl8169.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #324):
sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.140.2.1 src/sys/dev/ic/rtl8169.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/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.140 src/sys/dev/ic/rtl8169.c:1.140.2.1
--- src/sys/dev/ic/rtl8169.c:1.140	Sun Aug 10 16:44:35 2014
+++ src/sys/dev/ic/rtl8169.c	Sun Dec 14 16:44:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.140 2014/08/10 16:44:35 tls Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.140.2.1 2014/12/14 16:44:04 martin Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.140 2014/08/10 16:44:35 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.140.2.1 2014/12/14 16:44:04 martin Exp $);
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -1303,9 +1303,19 @@ re_rxeof(struct rtk_softc *sc)
 		M_CSUM_TCP_UDP_BAD;
 } else if (RE_UDPPKT(rxstat)) {
 	m-m_pkthdr.csum_flags |= M_CSUM_UDPv4;
-	if (rxstat  RE_RDESC_STAT_UDPSUMBAD)
-		m-m_pkthdr.csum_flags |=
-		M_CSUM_TCP_UDP_BAD;
+	if (rxstat  RE_RDESC_STAT_UDPSUMBAD) {
+		/*
+		 * XXX: 8139C+ thinks UDP csum
+		 * 0x is bad, force software
+		 * calculation.
+		 */
+		if (sc-sc_quirk  RTKQ_8139CPLUS)
+			m-m_pkthdr.csum_flags
+			= ~M_CSUM_UDPv4;
+		else
+			m-m_pkthdr.csum_flags
+			|= M_CSUM_TCP_UDP_BAD;
+	}
 }
 			}
 		} else {



CVS commit: [netbsd-7] src/sys/dev/pci

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 16:49:35 UTC 2014

Modified Files:
src/sys/dev/pci [netbsd-7]: pci_subr.c pcireg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #325):
sys/dev/pci/pcireg.h: revision 1.100
sys/dev/pci/pci_subr.c: revision 1.133
Add PCIe CRS Software Visibility bit.


To generate a diff of this commit:
cvs rdiff -u -r1.124.2.1 -r1.124.2.2 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.95.2.2 -r1.95.2.3 src/sys/dev/pci/pcireg.h

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.124.2.1 src/sys/dev/pci/pci_subr.c:1.124.2.2
--- src/sys/dev/pci/pci_subr.c:1.124.2.1	Fri Dec 12 19:03:17 2014
+++ src/sys/dev/pci/pci_subr.c	Sun Dec 14 16:49:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.124.2.1 2014/12/12 19:03:17 martin Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.124.2.2 2014/12/14 16:49:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.124.2.1 2014/12/12 19:03:17 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.124.2.2 2014/12/14 16:49:35 martin Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -1697,6 +1697,7 @@ pci_conf_print_pcie_cap(const pcireg_t *
 		/* Root Capability Register */
 		printf(Root Capability Register: %04x\n,
 		reg  16);
+		onoff(CRS Software Visibility, reg, PCIE_RCR_CRS_SV);
 
 		/* Root Status Register */
 		reg = regs[o2i(capoff + PCIE_RSR)];

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.95.2.2 src/sys/dev/pci/pcireg.h:1.95.2.3
--- src/sys/dev/pci/pcireg.h:1.95.2.2	Fri Dec 12 19:03:17 2014
+++ src/sys/dev/pci/pcireg.h	Sun Dec 14 16:49:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.95.2.2 2014/12/12 19:03:17 martin Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.95.2.3 2014/12/14 16:49:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -976,6 +976,7 @@ typedef u_int8_t pci_revision_t;
 #define PCIE_RCR_SERR_FER	__BIT(2)   /* SERR on Fatal Error Enable */
 #define PCIE_RCR_PME_IE		__BIT(3)   /* PME Interrupt Enable */
 #define PCIE_RCR_CRS_SVE	__BIT(4)   /* CRS Software Visibility En */
+#define PCIE_RCR_CRS_SV		__BIT(16)  /* CRS Software Visibility */
 #define PCIE_RSR	0x20	/* Root Status Register */
 #define PCIE_RSR_PME_REQESTER	__BITS(15, 0)  /* PME Requester ID */
 #define PCIE_RSR_PME_STAT	__BIT(16)  /* PME Status */



CVS commit: [netbsd-7] src/usr.sbin/cpuctl/arch

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 17:02:38 UTC 2014

Modified Files:
src/usr.sbin/cpuctl/arch [netbsd-7]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #326):
usr.sbin/cpuctl/arch/i386.c: revision 1.60
usr.sbin/cpuctl/arch/i386.c: revision 1.61
usr.sbin/cpuctl/arch/i386.c: revision 1.62
usr.sbin/cpuctl/arch/i386.c: revision 1.63
usr.sbin/cpuctl/arch/i386.c: revision 1.64
Add code to detect hypervisor. The code was based from FreeBSD and ported
by Kengo Nakahara.
kern/49379: Hypervisor's name typo
 Move some printf()s from cpu_probe_base_features() to identifycpu().
Those printf()s are used for identify command but cpu_probe_base_features()
is shared by ucodeupdate_check(), too. This change fixes a problem that
the ucode command print extra output.
Add newline if ci_tsc_freq is 0 to not to break the output.
 Don't print the microcode version if the ioctl failed to not to
print garbage.


To generate a diff of this commit:
cvs rdiff -u -r1.58.2.1 -r1.58.2.2 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.58.2.1 src/usr.sbin/cpuctl/arch/i386.c:1.58.2.2
--- src/usr.sbin/cpuctl/arch/i386.c:1.58.2.1	Fri Dec 12 16:44:35 2014
+++ src/usr.sbin/cpuctl/arch/i386.c	Sun Dec 14 17:02:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.58.2.1 2014/12/12 16:44:35 martin Exp $	*/
+/*	$NetBSD: i386.c,v 1.58.2.2 2014/12/14 17:02:38 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.58.2.1 2014/12/12 16:44:35 martin Exp $);
+__RCSID($NetBSD: i386.c,v 1.58.2.2 2014/12/14 17:02:38 martin Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -220,6 +220,7 @@ static void	tmx86_get_longrun_status(u_i
 static void	transmeta_cpu_info(struct cpu_info *);
 /* Common functions */
 static void	cpu_probe_base_features(struct cpu_info *, const char *);
+static void	cpu_probe_hv_features(struct cpu_info *, const char *);
 static void	cpu_probe_features(struct cpu_info *);
 static void	print_bits(const char *, const char *, const char *, uint32_t);
 static void	identifycpu_cpuids(struct cpu_info *);
@@ -1443,40 +1444,17 @@ cpu_probe_base_features(struct cpu_info 
 	ci-ci_vendor[1] = descs[3];
 	ci-ci_vendor[3] = 0;
 
-	aprint_verbose(%s: highest basic info %08x\n, cpuname,
-	ci-ci_cpuid_level);
-	if (verbose) {
-		int bf;
-		
-		for (bf = 0; bf = ci-ci_cpuid_level; bf++) {
-			x86_cpuid(bf, descs);
-			printf(%s: %08x: %08x %08x %08x %08x\n, cpuname,
-			bf, descs[0], descs[1], descs[2], descs[3]);
-		}
-	}
-
 	/*
 	 * Fn8000_:
 	 * - Get cpuid extended function's max level.
 	 */
 	x86_cpuid(0x8000, descs);
-	if (descs[0] =  0x8000) {
+	if (descs[0] = 0x8000)
 		ci-ci_cpuid_extlevel = descs[0];
-		aprint_verbose(%s: highest extended info %08x\n, cpuname,
-		ci-ci_cpuid_extlevel);
-	} else {
+	else {
 		/* Set lower value than 0x8000 */
 		ci-ci_cpuid_extlevel = 0;
 	}
-	if (verbose) {
-		unsigned int ef;
-
-		for (ef = 0x8000; ef = ci-ci_cpuid_extlevel; ef++) {
-			x86_cpuid(ef, descs);
-			printf(%s: %08x: %08x %08x %08x %08x\n, cpuname,
-			ef, descs[0], descs[1], descs[2], descs[3]);
-		}
-	}
 
 	/*
 	 * Fn8000_000[2-4]:
@@ -1546,6 +1524,51 @@ cpu_probe_base_features(struct cpu_info 
 }
 
 static void
+cpu_probe_hv_features(struct cpu_info *ci, const char *cpuname)
+{
+	uint32_t descs[4];
+	char hv_sig[13];
+	char *p;
+	const char *hv_name;
+	int i;
+
+	/*
+	 * [RFC] CPUID usage for interaction between Hypervisors and Linux.
+	 * http://lkml.org/lkml/2008/10/1/246
+	 *
+	 * KB1009458: Mechanisms to determine if software is running in
+	 * a VMware virtual machine
+	 * http://kb.vmware.com/kb/1009458
+	 */
+	if ((ci-ci_feat_val[1]  CPUID2_RAZ) != 0) {
+		x86_cpuid(0x4000, descs);
+		for (i = 1, p = hv_sig; i  4; i++, p += sizeof(descs) / 4)
+			memcpy(p, descs[i], sizeof(descs[i]));
+		*p = '\0';
+		/*
+		 * HV vendor	ID string
+		 * +--
+		 * KVM		KVMKVMKVM
+		 * Microsoft	Microsoft Hv
+		 * VMware	VMwareVMware
+		 * Xen		XenVMMXenVMM
+		 */
+		if (strncmp(hv_sig, KVMKVMKVM, 9) == 0)
+			hv_name = KVM;
+		else if (strncmp(hv_sig, Microsoft Hv, 12) == 0)
+			hv_name = Hyper-V;
+		else if (strncmp(hv_sig, VMwareVMware, 12) == 0)
+			hv_name = VMware;
+		else if (strncmp(hv_sig, XenVMMXenVMM, 12) == 0)
+			hv_name = Xen;
+		else
+			hv_name = unknown;
+
+		printf(%s: Running on hypervisor: %s\n, cpuname, hv_name);
+	}
+}
+
+static void
 cpu_probe_features(struct cpu_info *ci)
 {
 	const struct cpu_cpuid_nameclass *cpup = NULL;
@@ -1660,6 +1683,7 @@ identifycpu(int fd, const char *cpuname)
 	const struct cpu_cpuid_nameclass 

CVS commit: [netbsd-7] src/doc

2014-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 14 17:04:18 UTC 2014

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

Log Message:
Tickets #320 - #326


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.130 -r1.1.2.131 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.130 src/doc/CHANGES-7.0:1.1.2.131
--- src/doc/CHANGES-7.0:1.1.2.130	Sat Dec 13 19:35:02 2014
+++ src/doc/CHANGES-7.0	Sun Dec 14 17:04:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.130 2014/12/13 19:35:02 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.131 2014/12/14 17:04:18 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -3510,3 +3510,67 @@ sys/arch/arm/arm32/arm32_boot.c			1.11
 	Serialize printing of secondary cpu infos.
 	[jmcneill, ticket #319]
 
+usr.sbin/sysinst/arch/atari/msg.md.de		1.2
+usr.sbin/sysinst/arch/atari/msg.md.en		1.2
+usr.sbin/sysinst/arch/atari/msg.md.es		1.2
+
+	Terminate messages with a newline so that dialog box won't overwrite
+	messages.
+	[tsutsui, ticket #320]
+
+sys/arch/atari/conf/GENERIC.in			1.109
+sys/arch/atari/conf/ATARITT			(regen)
+sys/arch/atari/conf/FALCON			(regen)
+sys/arch/atari/conf/HADES			(regen)
+sys/arch/atari/conf/MILAN-ISAIDE		(regen)
+sys/arch/atari/conf/MILAN-PCIIDE		(regen)
+sys/arch/atari/conf/SMALL030			(regen)
+
+	Shrink GENERIC and enable options MODULAR instead, as other poor m68k
+	ports.
+
+	This allows all (at least ATARITT and FALCON, which have certain users)
+	gzipped kernel binaries put into 1440KB 2HD floppy so that users can
+	load these kernels on the native TOS using LOADBSD.TTP utility for
+	installation.  Note SMALL030 kernel doesn't include any Ethernet
+	configuration and requires CD-ROM or other removable disks.
+	[tsutsui, ticket #321]
+
+sys/arch/atari/stand/bootxx/bootxx.c		1.16
+
+	Expand heap to 64KB so that bootxx can load bootxxx from 32KB 
+	blocksize ffs.
+	[tsutsui, ticket #322]
+
+usr.sbin/installboot/arch/vax.c			1.18
+
+	Use VAX_LABELOFFSET instead of LABELOFFSET:
+	it needs to be the machine-specific one.
+	[tsutsui, ticket #323]
+
+sys/dev/ic/rtl8169.c1.142
+
+	RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
+	Force software recalculation of UDP checksum if bad checksum is
+	reported by the hardware.
+	[uwe, ticket #324]
+
+sys/dev/pci/pci_subr.c1.133
+sys/dev/pci/pcireg.h1.100
+
+	Add PCIe CRS Software Visibility bit.
+	[msaitoh, ticket #325]
+
+usr.sbin/cpuctl/arch/i386.c			1.60-1.64
+
+	Add code to detect hypervisor (from FreeBSD, ported by Kengo Nakahara).
+
+	Move some printf()s from cpu_probe_base_features() to identifycpu(),
+	to avoid extra (unintended) output from the ucode command.
+
+	Fix output if ci_tsc_freq is 0.
+
+	Don't print garbage if the ioctl to get the microcode version
+	failed.
+	[msaitoh, ticket #326]
+



CVS commit: src/sbin/cgdconfig

2014-12-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 14 17:15:15 UTC 2014

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

Log Message:
Bump date for previous. Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/cgdconfig/cgdconfig.8

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

Modified files:

Index: src/sbin/cgdconfig/cgdconfig.8
diff -u src/sbin/cgdconfig/cgdconfig.8:1.34 src/sbin/cgdconfig/cgdconfig.8:1.35
--- src/sbin/cgdconfig/cgdconfig.8:1.34	Sun Dec 14 12:31:39 2014
+++ src/sbin/cgdconfig/cgdconfig.8	Sun Dec 14 17:15:14 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: cgdconfig.8,v 1.34 2014/12/14 12:31:39 mlelstv Exp $
+.\ $NetBSD: cgdconfig.8,v 1.35 2014/12/14 17:15:14 wiz Exp $
 .\
 .\ Copyright (c) 2002, The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 3, 2012
+.Dd December 14, 2014
 .Dt CGDCONFIG 8
 .Os
 .Sh NAME
@@ -211,7 +211,7 @@ scan for a valid disklabel.
 .It mbr
 scan for a valid Master Boot Record.
 .It gpt
-scan for a valid GUUID partition table.
+scan for a valid GUID partition table.
 .It ffs
 scan for a valid FFS file system.
 .It re-enter



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

2014-12-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 14 18:12:38 UTC 2014

Added Files:
src/sys/arch/evbarm/conf: ALLWINNER_A80_INSTALL

Log Message:
add INSTALL kernel for Allwinner A80


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/ALLWINNER_A80_INSTALL

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

Added files:

Index: src/sys/arch/evbarm/conf/ALLWINNER_A80_INSTALL
diff -u /dev/null src/sys/arch/evbarm/conf/ALLWINNER_A80_INSTALL:1.1
--- /dev/null	Sun Dec 14 18:12:39 2014
+++ src/sys/arch/evbarm/conf/ALLWINNER_A80_INSTALL	Sun Dec 14 18:12:38 2014
@@ -0,0 +1,10 @@
+#	$NetBSD: ALLWINNER_A80_INSTALL,v 1.1 2014/12/14 18:12:38 jmcneill Exp $
+#
+#   ALLWINNER_A80_INSTALL -- ALLWINNER_A80 kernel with
+#	installation-sized ramdisk
+#
+
+include arch/evbarm/conf/ALLWINNER_A80
+include arch/evbarm/conf/INSTALL
+
+options 	BOOTHOWTO=RB_SINGLE



CVS commit: src/etc/etc.evbarm

2014-12-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 14 18:12:56 UTC 2014

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
build ALLWINNER_A80 kernel


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.66 src/etc/etc.evbarm/Makefile.inc:1.67
--- src/etc/etc.evbarm/Makefile.inc:1.66	Mon Oct 13 14:01:49 2014
+++ src/etc/etc.evbarm/Makefile.inc	Sun Dec 14 18:12:55 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.66 2014/10/13 14:01:49 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.67 2014/12/14 18:12:55 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -29,6 +29,8 @@ EVBARM_BOARDS.armv7+=		CUBIETRUCK
 EVBARM_BOARDS.armv7hf+=		CUBIETRUCK
 EVBARM_BOARDS.armv7+=		HUMMINGBIRD_A31
 EVBARM_BOARDS.armv7hf+=		HUMMINGBIRD_A31
+EVBARM_BOARDS.armv7+=		ALLWINNER_A80
+EVBARM_BOARDS.armv7hf+=		ALLWINNER_A80
 .else
 # little endian boards
 #EVBARM_BOARDS.armv4+=		ARMADILLO210
@@ -92,6 +94,8 @@ EVBARM_BOARDS.armv7+=		CUBIETRUCK
 EVBARM_BOARDS.armv7hf+= 	CUBIETRUCK
 EVBARM_BOARDS.armv7+=		HUMMINGBIRD_A31
 EVBARM_BOARDS.armv7hf+=		HUMMINGBIRD_A31
+EVBARM_BOARDS.armv7+=		ALLWINNER_A80
+EVBARM_BOARDS.armv7hf+=		ALLWINNER_A80
 #EVBARM_BOARDS.armv7+=		IGEPV2
 EVBARM_BOARDS.armv7+=		MIRABOX
 EVBARM_BOARDS.armv7hf+=		MIRABOX



CVS commit: src/sys/sys

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 18:14:15 UTC 2014

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

Log Message:
Leave section 0 empty. Now gdb should recognize our dumped ksyms files.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/sys/ksyms.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/ksyms.h
diff -u src/sys/sys/ksyms.h:1.29 src/sys/sys/ksyms.h:1.30
--- src/sys/sys/ksyms.h:1.29	Mon Dec  8 21:30:09 2014
+++ src/sys/sys/ksyms.h	Sun Dec 14 13:14:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ksyms.h,v 1.29 2014/12/09 02:30:09 christos Exp $	*/
+/*	$NetBSD: ksyms.h,v 1.30 2014/12/14 18:14:15 christos Exp $	*/
 
 /*
  * Copyright (c) 2001, 2003 Anders Magnusson (ra...@ludd.luth.se).
@@ -58,13 +58,13 @@ struct ksyms_symtab {
  * Static allocated ELF header.
  * Basic info is filled in at attach, sizes at open.
  */
-#define	SHNOTE		0
-#define	SYMTAB		1
-#define	STRTAB		2
-#define	SHSTRTAB	3
-#define	SHBSS		4
-#define	SHCTF		5
-#define NSECHDR		6
+#define	SHNOTE		1
+#define	SYMTAB		2
+#define	STRTAB		3
+#define	SHSTRTAB	4
+#define	SHBSS		5
+#define	SHCTF		6
+#define	NSECHDR		7
 
 #define	NPRGHDR		1
 #define	SHSTRSIZ	64



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 19:58:06 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: solib.c

Log Message:
When debugging 32 bit binaries on a 64 bit arch in NetBSD the dynamic
linker magically converts the dynamic linker name to ld.elf_so-32bitarch
like ld.elf_so-i386. We do the same magic here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/gpl3/gdb/dist/gdb/solib.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/gpl3/gdb/dist/gdb/solib.c
diff -u src/external/gpl3/gdb/dist/gdb/solib.c:1.1.1.3 src/external/gpl3/gdb/dist/gdb/solib.c:1.2
--- src/external/gpl3/gdb/dist/gdb/solib.c:1.1.1.3	Sun Jun 22 19:41:01 2014
+++ src/external/gpl3/gdb/dist/gdb/solib.c	Sun Dec 14 14:58:06 2014
@@ -413,13 +413,12 @@ solib_bfd_fopen (char *pathname, int fd)
 
 /* Find shared library PATHNAME and open a BFD for it.  */
 
-bfd *
-solib_bfd_open (char *pathname)
+static bfd *
+solib_bfd_open1 (char *pathname)
 {
   char *found_pathname;
   int found_file;
   bfd *abfd;
-  const struct bfd_arch_info *b;
 
   /* Search for shared library file.  */
   found_pathname = solib_find (pathname, found_file);
@@ -443,13 +442,41 @@ solib_bfd_open (char *pathname)
   error (_(`%s': not in executable format: %s),
 	 bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
 }
+  return abfd;
+}
+
+bfd *
+solib_bfd_open (char *pathname)
+{
+  bfd *abfd, *bbfd;
+  const struct bfd_arch_info *b;
+  char pname[PATH_MAX];
+
+  abfd = solib_bfd_open1 (pathname);
+  if (abfd == NULL)
+return NULL;
 
   /* Check bfd arch.  */
   b = gdbarch_bfd_arch_info (target_gdbarch ());
-  if (!b-compatible (b, bfd_get_arch_info (abfd)))
-warning (_(`%s': Shared library architecture %s is not compatible 
-   with target architecture %s.), bfd_get_filename (abfd),
- bfd_get_arch_info (abfd)-printable_name, b-printable_name);
+  if (b-compatible (b, bfd_get_arch_info (abfd)))
+ return abfd;
+
+  snprintf (pname, sizeof(pname), %s-%s, pathname, b-printable_name);
+  bbfd = solib_bfd_open1 (pname);
+  if (bbfd == NULL)
+goto out;
+
+  gdb_bfd_unref (abfd);
+  abfd = bbfd;
+
+  /* Check bfd arch.  */
+  if (b-compatible (b, bfd_get_arch_info (abfd)))
+return abfd;
+
+out:
+  warning (_(`%s': Shared library architecture %s is not compatible 
+ with target architecture %s.), bfd_get_filename (abfd),
+   bfd_get_arch_info (abfd)-printable_name, b-printable_name);
 
   return abfd;
 }



CVS commit: src/external/gpl3/gdb/lib/libgdb/arch/x86_64

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 19:59:52 UTC 2014

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/x86_64: defs.mk init.c

Log Message:
Allow i386 binary debugging on amd64 hosts.
XXX: This should be done in mknative but how? Matt?


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.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/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk
diff -u src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk:1.6 src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk:1.7
--- src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk:1.6	Sun Jun 22 19:53:03 2014
+++ src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk	Sun Dec 14 14:59:52 2014
@@ -3,5 +3,5 @@
 # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
 G_INTERNAL_CFLAGS=-I. -I${GNUHOSTDIST}/gdb -I${GNUHOSTDIST}/gdb/common -I${GNUHOSTDIST}/gdb/config  -DLOCALEDIR=\/usr/share/locale\ -DHAVE_CONFIG_H -I${GNUHOSTDIST}/gdb/../include/opcode -I${GNUHOSTDIST}/gdb/../opcodes/.. -I${GNUHOSTDIST}/gdb/../readline/..  -I../bfd -I${GNUHOSTDIST}/gdb/../bfd -I${GNUHOSTDIST}/gdb/../include -I../libdecnumber -I${GNUHOSTDIST}/gdb/../libdecnumber  -I./../intl -I${GNUHOSTDIST}/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral 
-G_LIBGDB_OBS=amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o nbsd-tdep.o solib-svr4.o ser-base.o ser-unix.o ser-pipe.o ser-tcp.o fork-child.o inf-ptrace.o  amd64-nat.o amd64bsd-nat.o nbsd-nat.o amd64nbsd-nat.o bsd-kvm.o  nbsd-thread.o  remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o  remote-notif.o ctf.o  cli-dump.o  cli-decode.o cli-script.o cli-cmds.o cli-setshow.o  cli-logging.o  cli-interp.o cli-utils.o mi-out.o mi-console.o  mi-cmds.o mi-cmd-catch.o mi-cmd-env.o  mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o  mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o  mi-cmd-info.o mi-interp.o  mi-main.o mi-parse.o mi-getopt.o tui-command.o  tui-data.o  tui-disasm.o  tui-file.o  tui-hooks.o  tui-interp.o  tui-io.o  tui-layout.o  tui-out.o  tui-regs.o  tui-source.o  tui-stack.o  tui-win.o  tui-windata.o  tui-wingeneral.o  tui-winsource.o  tui.o python.o py-value.o py-prettyprint.o py-auto-load.o elfread.o stap-probe.o posix-hdep.o c-exp.o  cp-n
 ame-parser.o  ada-exp.o  jv-exp.o  f-exp.o go-exp.o m2-exp.o p-exp.o  version.o  annotate.o  addrmap.o  auto-load.o auxv.o  agent.o  bfd-target.o  blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o  findvar.o regcache.o cleanups.o  charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o  source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o  block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o  linespec.o dictionary.o  infcall.o  infcmd.o infrun.o  expprint.o environ.o stack.o thread.o  exceptions.o  filesystem.o  filestuff.o  inf-child.o  interps.o  minidebug.o  main.o  macrotab.o macrocmd.o macroexp.o macroscope.o  mi-common.o  event-loop.o event-top.o inf-loop.o completer.o  gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o  osabi.o copying.o  memattr.o mem-break.o target.o target-dcache.o parse.o language.o  build-id.o buildsym.o  findcmd.o  std-regs.o  signals.o  exec.o reverse.o  bcache.o objfiles.o observer.o minsyms
 .o maint.o demangle.o  dbxread.o coffread.o coff-pe-read.o  dwarf2read.o mipsread.o stabsread.o corefile.o  dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o  ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o  ada-tasks.o ada-varobj.o c-varobj.o  ui-out.o cli-out.o  varobj.o vec.o  go-lang.o go-valprint.o go-typeprint.o  jv-lang.o jv-valprint.o jv-typeprint.o jv-varobj.o  m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o  sentinel-frame.o  complaints.o typeprint.o  ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o  ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o  m2-valprint.o  serial.o mdebugread.o top.o utils.o  ui-file.o  user-regs.o  frame.o frame-unwind.o doublest.o  frame-base.o  inline-frame.o  gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o  cp-namespace.o  reggroups.o regset.o  trad-frame.o  tramp-frame.o  solib.o solib-target.o  prologue-value.o memory-map.o memrange.o  xml-support.o xml-syscall.o xml-utils.o  ta
 rget-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o  inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o  gdb_vecs.o jit.o progspace.o skip.o probe.o  common-utils.o buffer.o ptid.o 

CVS commit: src/sys/modules/compat

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 21:14:06 UTC 2014

Modified Files:
src/sys/modules/compat: Makefile

Log Message:
Don't exclude amd64 from COMPAT  15. We need it for COMPAT_NETBSD32 a.out


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/modules/compat/Makefile

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

Modified files:

Index: src/sys/modules/compat/Makefile
diff -u src/sys/modules/compat/Makefile:1.10 src/sys/modules/compat/Makefile:1.11
--- src/sys/modules/compat/Makefile:1.10	Fri Apr  4 14:17:36 2014
+++ src/sys/modules/compat/Makefile	Sun Dec 14 16:14:06 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2014/04/04 18:17:36 njoly Exp $
+#	$NetBSD: Makefile,v 1.11 2014/12/14 21:14:06 christos Exp $
 
 .include ../Makefile.inc
 
@@ -11,7 +11,6 @@ KMOD=	compat
 # the symbols available for other emulations.  So include the source
 # files but don't hook them in via compat_modcmd().
 #
-.if (${MACHINE_ARCH} != x86_64)
 CPPFLAGS+=	-DCOMPAT_09
 CPPFLAGS+=	-DCOMPAT_10
 CPPFLAGS+=	-DCOMPAT_11
@@ -20,7 +19,6 @@ CPPFLAGS+=	-DCOMPAT_13
 CPPFLAGS+=	-DCOMPAT_14
 CPPFLAGS+=	-DCOMPAT_15
 CPPFLAGS+=	-DCOMPAT_16
-.endif
 
 CPPFLAGS+=	-DCOMPAT_20
 CPPFLAGS+=	-DCOMPAT_30 -DCOMPAT_40 -DCOMPAT_50



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

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 21:27:49 UTC 2014

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep.c
Added Files:
src/sys/arch/amd64/amd64: compat_13_machdep.c compat_16_machdep.c

Log Message:
Move the empty sigreturn functions to their own files to allow the compat
module to load by itself.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/amd64/compat_13_machdep.c
cvs rdiff -u -r0 -r1.5 src/sys/arch/amd64/amd64/compat_16_machdep.c
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/amd64/amd64/netbsd32_machdep.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.93
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92	Sat Feb 15 17:20:41 2014
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Sun Dec 14 16:27:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.92 2014/02/15 22:20:41 dsl Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.93 2014/12/14 21:27:49 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.92 2014/02/15 22:20:41 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.93 2014/12/14 21:27:49 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -106,19 +106,6 @@ cpu_exec_aout_makecmds(struct lwp *p, st
 }
 #endif
 
-#ifdef COMPAT_16
-/*
- * There is no NetBSD-1.6 compatibility for native code.
- * COMPAT_16 is useful for i386 emulation (COMPAT_NETBSD32) only.
- */
-int
-compat_16_sys___sigreturn14(struct lwp *l, const struct compat_16_sys___sigreturn14_args *uap, register_t *retval)
-{
-
-	return ENOSYS;
-}
-#endif
-
 void
 netbsd32_setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
 {
@@ -954,12 +941,6 @@ netbsd32_vm_default_addr(struct proc *p,
 
 #ifdef COMPAT_13
 int
-compat_13_sys_sigreturn(struct lwp *l, const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
-{
-	return ENOSYS;
-}
-
-int
 compat_13_netbsd32_sigreturn(struct lwp *l, const struct compat_13_netbsd32_sigreturn_args *uap, register_t *retval)
 {
 	/* {

Added files:

Index: src/sys/arch/amd64/amd64/compat_13_machdep.c
diff -u /dev/null src/sys/arch/amd64/amd64/compat_13_machdep.c:1.1
--- /dev/null	Sun Dec 14 16:27:49 2014
+++ src/sys/arch/amd64/amd64/compat_13_machdep.c	Sun Dec 14 16:27:49 2014
@@ -0,0 +1,63 @@
+/*	$NetBSD: compat_13_machdep.c,v 1.1 2014/12/14 21:27:49 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: compat_13_machdep.c,v 1.1 2014/12/14 21:27:49 christos Exp $);
+
+#ifdef _KERNEL_OPT
+#include opt_compat_netbsd.h
+#endif
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/signalvar.h
+#include sys/kernel.h
+#include sys/proc.h
+#include sys/mount.h
+#include sys/syscallargs.h
+
+#include compat/sys/signal.h
+#include compat/sys/signalvar.h
+
+#ifdef COMPAT_13
+
+int compat_13_sys_sigreturn(struct lwp *, const struct compat_13_sys_sigreturn_args *, register_t *);
+
+/*
+ * There is no NetBSD-1.6 compatibility for native code.
+ * COMPAT_13 is useful for i386 emulation (COMPAT_NETBSD32) only.
+ */
+int
+compat_13_sys_sigreturn(struct lwp *l, const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
+{
+

CVS commit: src/sys

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 21:35:24 UTC 2014

Modified Files:
src/sys/kern: kern_exec.c
src/sys/sys: exec.h

Log Message:
PR/49287: Masao Uebayashi: Handle exec_script argument vector from the 32 -
64 bit case. When execing a 64 bit shell from a 32 bit binary the argument
vector was still incorrect.

XXX: Pullup 7


To generate a diff of this commit:
cvs rdiff -u -r1.410 -r1.411 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.146 -r1.147 src/sys/sys/exec.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/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.410 src/sys/kern/kern_exec.c:1.411
--- src/sys/kern/kern_exec.c:1.410	Sun Nov  9 12:50:01 2014
+++ src/sys/kern/kern_exec.c	Sun Dec 14 16:35:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.410 2014/11/09 17:50:01 maxv Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.411 2014/12/14 21:35:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.410 2014/11/09 17:50:01 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.411 2014/12/14 21:35:24 christos Exp $);
 
 #include opt_exec.h
 #include opt_execfmt.h
@@ -673,7 +673,7 @@ execve_loadvm(struct lwp *l, const char 
 	epp-ep_emul_arg_free = NULL;
 	memset(epp-ep_vmcmds, 0, sizeof(epp-ep_vmcmds));
 	epp-ep_vap = data-ed_attr;
-	epp-ep_flags = 0;
+	epp-ep_flags = (p-p_flag  PK_32) ? EXEC_FROM32 : 0;
 	MD_TOPDOWN_INIT(epp);
 	epp-ep_emul_root = NULL;
 	epp-ep_interp = NULL;
@@ -1335,9 +1335,15 @@ execve1(struct lwp *l, const char *path,
 }
 
 static size_t
+fromptrsz(const struct exec_package *epp)
+{
+	return (epp-ep_flags  EXEC_FROM32) ? sizeof(int) : sizeof(char *);
+}
+
+static size_t
 ptrsz(const struct exec_package *epp)
 {
-	return (epp-ep_flags  EXEC_32) ?  sizeof(int) : sizeof(char *);
+	return (epp-ep_flags  EXEC_32) ? sizeof(int) : sizeof(char *);
 }
 
 static size_t
@@ -1508,7 +1514,7 @@ copyinargs(struct execve_data * restrict
 		return EINVAL;
 	}
 	if (epp-ep_flags  EXEC_SKIPARG)
-		args = (const void *)((const char *)args + ptrsz(epp));
+		args = (const void *)((const char *)args + fromptrsz(epp));
 	i = 0;
 	error = copyinargstrs(data, args, fetch_element, dp, i, ktr_execarg);
 	if (error != 0) {

Index: src/sys/sys/exec.h
diff -u src/sys/sys/exec.h:1.146 src/sys/sys/exec.h:1.147
--- src/sys/sys/exec.h:1.146	Fri Sep  5 01:42:50 2014
+++ src/sys/sys/exec.h	Sun Dec 14 16:35:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.h,v 1.146 2014/09/05 05:42:50 matt Exp $	*/
+/*	$NetBSD: exec.h,v 1.147 2014/12/14 21:35:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -230,6 +230,7 @@ struct exec_package {
 #define	EXEC_32		0x0020		/* 32-bit binary emulation */
 #define	EXEC_FORCEAUX	0x0040		/* always use ELF AUX vector */
 #define	EXEC_TOPDOWN_VM	0x0080		/* may use top-down VM layout */
+#define	EXEC_FROM32	0x0100		/* exec'ed from 32-bit binary */
 
 struct exec_vmcmd {
 	int	(*ev_proc)(struct lwp *, struct exec_vmcmd *);



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

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 22:32:46 UTC 2014

Modified Files:
src/sys/arch/amd64/conf: files.amd64

Log Message:
add the two new compat files.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/amd64/conf/files.amd64

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/files.amd64
diff -u src/sys/arch/amd64/conf/files.amd64:1.84 src/sys/arch/amd64/conf/files.amd64:1.85
--- src/sys/arch/amd64/conf/files.amd64:1.84	Fri Oct 10 05:13:21 2014
+++ src/sys/arch/amd64/conf/files.amd64	Sun Dec 14 17:32:46 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amd64,v 1.84 2014/10/10 09:13:21 uebayasi Exp $
+#	$NetBSD: files.amd64,v 1.85 2014/12/14 22:32:46 christos Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -130,6 +130,9 @@ attach	fd at fdc
 #
 # Compatibility modules
 #
+# Binary compatibility with previous NetBSD releases (COMPAT_XX)
+file	arch/i386/i386/compat_13_machdep.c	compat_13
+file	arch/i386/i386/compat_16_machdep.c	compat_16
 
 # NetBSD/i386 32-bit binary compatibility (COMPAT_NETBSD32)
 include compat/netbsd32/files.netbsd32



CVS commit: src/sbin/cgdconfig

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 23:25:07 UTC 2014

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

Log Message:
avoid local variable shadowing devname.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sbin/cgdconfig/cgdconfig.c

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

Modified files:

Index: src/sbin/cgdconfig/cgdconfig.c
diff -u src/sbin/cgdconfig/cgdconfig.c:1.37 src/sbin/cgdconfig/cgdconfig.c:1.38
--- src/sbin/cgdconfig/cgdconfig.c:1.37	Sun Dec 14 07:31:39 2014
+++ src/sbin/cgdconfig/cgdconfig.c	Sun Dec 14 18:25:07 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdconfig.c,v 1.37 2014/12/14 12:31:39 mlelstv Exp $ */
+/* $NetBSD: cgdconfig.c,v 1.38 2014/12/14 23:25:07 christos Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 2002, 2003\
  The NetBSD Foundation, Inc.  All rights reserved.);
-__RCSID($NetBSD: cgdconfig.c,v 1.37 2014/12/14 12:31:39 mlelstv Exp $);
+__RCSID($NetBSD: cgdconfig.c,v 1.38 2014/12/14 23:25:07 christos Exp $);
 #endif
 
 #include err.h
@@ -512,13 +512,13 @@ configure(int argc, char **argv, struct 
 	int		 loop = 0;
 	int		 ret;
 	char		 cgdname[PATH_MAX];
-	char		 devname[PATH_MAX];
+	char		 devicename[PATH_MAX];
 	const char	*dev;
 
 	if (argc == 2 || argc == 3) {
-		dev = getfsspecname(devname, sizeof(devname), argv[1]);
+		dev = getfsspecname(devicename, sizeof(devicename), argv[1]);
 		if (dev == NULL) {
-			warnx(getfsspecname failed: %s, devname);
+			warnx(getfsspecname failed: %s, devicename);
 			return -1;
 		}
 	}
@@ -636,15 +636,15 @@ configure_stdin(struct params *p, int ar
 	int		 fd;
 	int		 ret;
 	char		 cgdname[PATH_MAX];
-	char		 devname[PATH_MAX];
+	char		 devicename[PATH_MAX];
 	const char	*dev;
 
 	if (argc  3 || argc  4)
 		usage();
 
-	dev = getfsspecname(devname, sizeof(devname), argv[1]);
+	dev = getfsspecname(devicename, sizeof(devicename), argv[1]);
 	if (dev == NULL) {
-		warnx(getfsspecname failed: %s, devname);
+		warnx(getfsspecname failed: %s, devicename);
 		return -1;
 	}
 



CVS commit: src/sbin/cgdconfig

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 23:27:14 UTC 2014

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

Log Message:
fix possibly uninitialized variable.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sbin/cgdconfig/cgdconfig.c

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

Modified files:

Index: src/sbin/cgdconfig/cgdconfig.c
diff -u src/sbin/cgdconfig/cgdconfig.c:1.38 src/sbin/cgdconfig/cgdconfig.c:1.39
--- src/sbin/cgdconfig/cgdconfig.c:1.38	Sun Dec 14 18:25:07 2014
+++ src/sbin/cgdconfig/cgdconfig.c	Sun Dec 14 18:27:14 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdconfig.c,v 1.38 2014/12/14 23:25:07 christos Exp $ */
+/* $NetBSD: cgdconfig.c,v 1.39 2014/12/14 23:27:14 christos Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 2002, 2003\
  The NetBSD Foundation, Inc.  All rights reserved.);
-__RCSID($NetBSD: cgdconfig.c,v 1.38 2014/12/14 23:25:07 christos Exp $);
+__RCSID($NetBSD: cgdconfig.c,v 1.39 2014/12/14 23:27:14 christos Exp $);
 #endif
 
 #include err.h
@@ -513,7 +513,7 @@ configure(int argc, char **argv, struct 
 	int		 ret;
 	char		 cgdname[PATH_MAX];
 	char		 devicename[PATH_MAX];
-	const char	*dev;
+	const char	*dev = NULL;	/* XXX: gcc */
 
 	if (argc == 2 || argc == 3) {
 		dev = getfsspecname(devicename, sizeof(devicename), argv[1]);



CVS commit: src/sys

2014-12-14 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec 14 23:49:28 UTC 2014

Modified Files:
src/sys/kern: kern_exec.c
src/sys/sys: exec.h

Log Message:
remove ep_name, change the last reference to use ep_kname instead.


To generate a diff of this commit:
cvs rdiff -u -r1.411 -r1.412 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.147 -r1.148 src/sys/sys/exec.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/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.411 src/sys/kern/kern_exec.c:1.412
--- src/sys/kern/kern_exec.c:1.411	Sun Dec 14 21:35:24 2014
+++ src/sys/kern/kern_exec.c	Sun Dec 14 23:49:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.411 2014/12/14 21:35:24 christos Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.412 2014/12/14 23:49:28 chs Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.411 2014/12/14 21:35:24 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.412 2014/12/14 23:49:28 chs Exp $);
 
 #include opt_exec.h
 #include opt_execfmt.h
@@ -663,7 +663,6 @@ execve_loadvm(struct lwp *l, const char 
 	/*
 	 * initialize the fields of the exec package.
 	 */
-	epp-ep_name = path;
 	epp-ep_kname = data-ed_pathstring;
 	epp-ep_resolvedname = data-ed_resolvedpathbuf;
 	epp-ep_hdr = kmem_alloc(exec_maxhdrsz, KM_SLEEP);
@@ -1235,7 +1234,7 @@ execve_runproc(struct lwp *l, struct exe
 
 	kmem_free(epp-ep_hdr, epp-ep_hdrlen);
 
-	SDT_PROBE(proc,,,exec_success, epp-ep_name, 0, 0, 0, 0);
+	SDT_PROBE(proc,,,exec_success, epp-ep_kname, 0, 0, 0, 0);
 
 	emulexec(l, epp);
 

Index: src/sys/sys/exec.h
diff -u src/sys/sys/exec.h:1.147 src/sys/sys/exec.h:1.148
--- src/sys/sys/exec.h:1.147	Sun Dec 14 21:35:24 2014
+++ src/sys/sys/exec.h	Sun Dec 14 23:49:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.h,v 1.147 2014/12/14 21:35:24 christos Exp $	*/
+/*	$NetBSD: exec.h,v 1.148 2014/12/14 23:49:28 chs Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -187,7 +187,6 @@ struct exec_fakearg {
 };
 
 struct exec_package {
-	const char *ep_name;		/* file's name */
 	const char *ep_kname;		/* kernel-side copy of file's name */
 	char *ep_resolvedname;		/* fully resolved path from namei */
 	void	*ep_hdr;		/* file's exec header */



CVS commit: src

2014-12-14 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec 14 23:48:59 UTC 2014

Modified Files:
src/common/lib/libprop: prop_kern.c
src/sys/arch/mac68k/dev: grf_compat.c
src/sys/arch/x68k/dev: grf.c
src/sys/external/bsd/drm/dist/bsd-core: drm_bufs.c
src/sys/external/bsd/drm2/drm: drm_drv.c drm_vm.c
src/sys/external/bsd/drm2/include/linux: mm.h
src/sys/kern: vfs_vnops.c
src/sys/rump/librump/rumpkern: vm.c
src/sys/sys: file.h
src/sys/uvm: uvm_device.c uvm_device.h uvm_extern.h uvm_mmap.c

Log Message:
add a new fo_mmap fileops method to allow use of arbitrary uvm_objects for
mappings of file objects.  move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap().  add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/common/lib/libprop/prop_kern.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mac68k/dev/grf_compat.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x68k/dev/grf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/drm/drm_drv.c
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/drm/drm_vm.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/include/linux/mm.h
cvs rdiff -u -r1.191 -r1.192 src/sys/kern/vfs_vnops.c
cvs rdiff -u -r1.159 -r1.160 src/sys/rump/librump/rumpkern/vm.c
cvs rdiff -u -r1.77 -r1.78 src/sys/sys/file.h
cvs rdiff -u -r1.63 -r1.64 src/sys/uvm/uvm_device.c
cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/uvm_device.h
cvs rdiff -u -r1.191 -r1.192 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.149 -r1.150 src/sys/uvm/uvm_mmap.c

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

Modified files:

Index: src/common/lib/libprop/prop_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.17 src/common/lib/libprop/prop_kern.c:1.18
--- src/common/lib/libprop/prop_kern.c:1.17	Fri Sep 30 22:08:18 2011
+++ src/common/lib/libprop/prop_kern.c	Sun Dec 14 23:48:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_kern.c,v 1.17 2011/09/30 22:08:18 jym Exp $	*/
+/*	$NetBSD: prop_kern.c,v 1.18 2014/12/14 23:48:58 chs Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -380,7 +380,7 @@ prop_dictionary_sendrecv_ioctl(prop_dict
 #include sys/resource.h
 #include sys/pool.h
 
-#include uvm/uvm.h
+#include uvm/uvm_extern.h
 
 #include prop_object_impl.h
 
@@ -507,9 +507,9 @@ _prop_object_copyout(struct plistref *pr
 	struct lwp *l = curlwp;		/* XXX */
 	struct proc *p = l-l_proc;
 	char *buf;
+	void *uaddr;
 	size_t len, rlen;
 	int error = 0;
-	vaddr_t uaddr;
 
 	switch (prop_object_type(obj)) {
 	case PROP_TYPE_ARRAY:
@@ -526,26 +526,12 @@ _prop_object_copyout(struct plistref *pr
 
 	len = strlen(buf) + 1;
 	rlen = round_page(len);
-
-	/*
-	 * See sys_mmap() in sys/uvm/uvm_mmap.c.
-	 * Let's act as if we were calling mmap(0, ...)
-	 */
-	uaddr = p-p_emul-e_vm_default_addr(p,
-	(vaddr_t)p-p_vmspace-vm_daddr, rlen);
-
-	error = uvm_mmap(p-p_vmspace-vm_map,
-			 uaddr, rlen,
-			 VM_PROT_READ|VM_PROT_WRITE,
-			 VM_PROT_READ|VM_PROT_WRITE,
-			 MAP_PRIVATE|MAP_ANON,
-			 NULL, 0,
-			 p-p_rlimit[RLIMIT_MEMLOCK].rlim_cur);
-	
+	uaddr = NULL;
+	error = uvm_mmap_anon(p, uaddr, rlen);
 	if (error == 0) {
-		error = copyout(buf, (char *)uaddr, len);
+		error = copyout(buf, uaddr, len);
 		if (error == 0) {
-			pref-pref_plist = (char *)uaddr;
+			pref-pref_plist = uaddr;
 			pref-pref_len   = len;
 		}
 	}

Index: src/sys/arch/mac68k/dev/grf_compat.c
diff -u src/sys/arch/mac68k/dev/grf_compat.c:1.26 src/sys/arch/mac68k/dev/grf_compat.c:1.27
--- src/sys/arch/mac68k/dev/grf_compat.c:1.26	Fri Jul 25 08:10:33 2014
+++ src/sys/arch/mac68k/dev/grf_compat.c	Sun Dec 14 23:48:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf_compat.c,v 1.26 2014/07/25 08:10:33 dholland Exp $	*/
+/*	$NetBSD: grf_compat.c,v 1.27 2014/12/14 23:48:58 chs Exp $	*/
 
 /*
  * Copyright (C) 1999 Scott Reynolds
@@ -34,7 +34,7 @@
 #include opt_grf_compat.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: grf_compat.c,v 1.26 2014/07/25 08:10:33 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: grf_compat.c,v 1.27 2014/12/14 23:48:58 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -43,12 +43,9 @@ __KERNEL_RCSID(0, $NetBSD: grf_compat.c
 #include sys/errno.h
 #include sys/ioctl.h
 #include sys/malloc.h
-#include sys/mman.h
 #include sys/proc.h
 #include sys/resourcevar.h
-#include sys/vnode.h
 
-#include machine/autoconf.h
 #include machine/bus.h
 #include machine/grfioctl.h
 
@@ -59,7 +56,6 @@ __KERNEL_RCSID(0, $NetBSD: grf_compat.c
 #include miscfs/specfs/specdev.h
 
 

CVS commit: src

2014-12-14 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec 14 23:49:17 UTC 2014

Modified Files:
src/lib/libc/tls: tls.c
src/libexec/ld.elf_so: tls.c
src/sys/arch/powerpc/include: types.h
src/sys/arch/powerpc/powerpc: sig_machdep.c

Log Message:
fix powerpc TLS problems by removing the hacks for PPC EABI.
the kernel no longer treats R2 specially and its use as
the TLS register is now handled entirely in userland.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/tls/tls.c
cvs rdiff -u -r1.9 -r1.10 src/libexec/ld.elf_so/tls.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/powerpc/powerpc/sig_machdep.c

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

Modified files:

Index: src/lib/libc/tls/tls.c
diff -u src/lib/libc/tls/tls.c:1.7 src/lib/libc/tls/tls.c:1.8
--- src/lib/libc/tls/tls.c:1.7	Mon Aug 19 22:14:37 2013
+++ src/lib/libc/tls/tls.c	Sun Dec 14 23:49:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.7 2013/08/19 22:14:37 matt Exp $	*/
+/*	$NetBSD: tls.c,v 1.8 2014/12/14 23:49:17 chs Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.7 2013/08/19 22:14:37 matt Exp $);
+__RCSID($NetBSD: tls.c,v 1.8 2014/12/14 23:49:17 chs Exp $);
 
 #include namespace.h
 
@@ -155,15 +155,6 @@ __libc_static_tls_setup(void)
 	struct tls_tcb *tcb;
 
 	if (rtld_DYNAMIC != NULL) {
-#ifdef __powerpc__
-		/*
-		 * Old powerpc crt0's are going to overwrite r2 so we need to
-		 * restore it but only do so if the saved value isn't NULL (if
-		 * it is NULL, ld.elf_so doesn't have the matching change).
-		 */
-		if ((tcb = _lwp_getprivate()) != NULL)
-			__lwp_settcb(tcb);
-#endif
 		return;
 	}
 

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.9 src/libexec/ld.elf_so/tls.c:1.10
--- src/libexec/ld.elf_so/tls.c:1.9	Mon Oct 21 19:14:15 2013
+++ src/libexec/ld.elf_so/tls.c	Sun Dec 14 23:49:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.9 2013/10/21 19:14:15 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.10 2014/12/14 23:49:17 chs Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.9 2013/10/21 19:14:15 joerg Exp $);
+__RCSID($NetBSD: tls.c,v 1.10 2014/12/14 23:49:17 chs Exp $);
 
 #include sys/param.h
 #include sys/ucontext.h
@@ -106,13 +106,6 @@ _rtld_tls_initial_allocation(void)
 	tcb = _rtld_tls_allocate_locked();
 #ifdef __HAVE___LWP_SETTCB
 	__lwp_settcb(tcb);
-#ifdef __powerpc__
-	/*
-	 * Save the tcb pointer so that libc can retrieve it.  Older
-	 * crt0 will obliterate r2 so there is code in libc to restore it.
-	 */
-	_lwp_setprivate(tcb);
-#endif
 #else
 	_lwp_setprivate(tcb);
 #endif

Index: src/sys/arch/powerpc/include/types.h
diff -u src/sys/arch/powerpc/include/types.h:1.49 src/sys/arch/powerpc/include/types.h:1.50
--- src/sys/arch/powerpc/include/types.h:1.49	Tue Mar 18 18:20:41 2014
+++ src/sys/arch/powerpc/include/types.h	Sun Dec 14 23:49:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.49 2014/03/18 18:20:41 riastradh Exp $	*/
+/*	$NetBSD: types.h,v 1.50 2014/12/14 23:49:17 chs Exp $	*/
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -81,6 +81,7 @@ typedef volatile int __cpu_simple_lock_t
 #ifdef _LP64
 #define	__HAVE_ATOMIC64_OPS
 #endif
+#define	__HAVE_CPU_LWP_SETPRIVATE
 #define	__HAVE_COMMON___TLS_GET_ADDR
 #define	__HAVE___LWP_GETTCB_FAST
 #define	__HAVE___LWP_SETTCB

Index: src/sys/arch/powerpc/powerpc/sig_machdep.c
diff -u src/sys/arch/powerpc/powerpc/sig_machdep.c:1.43 src/sys/arch/powerpc/powerpc/sig_machdep.c:1.44
--- src/sys/arch/powerpc/powerpc/sig_machdep.c:1.43	Tue Sep 11 00:15:19 2012
+++ src/sys/arch/powerpc/powerpc/sig_machdep.c	Sun Dec 14 23:49:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sig_machdep.c,v 1.43 2012/09/11 00:15:19 matt Exp $	*/
+/*	$NetBSD: sig_machdep.c,v 1.44 2014/12/14 23:49:17 chs Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.43 2012/09/11 00:15:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.44 2014/12/14 23:49:17 chs Exp $);
 
 #include opt_ppcarch.h
 #include opt_altivec.h
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, $NetBSD: sig_machdep.
 #include sys/syscallargs.h
 #include sys/systm.h
 #include sys/ucontext.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
@@ -172,8 +173,7 @@ cpu_getmcontext(struct lwp *l, mcontext_
 #endif
 
 	*flagp |= _UC_CPU;
-	if (gr[_REG_R2] == (uintptr_t)l-l_private)
-		*flagp |= _UC_TLSBASE;
+	*flagp |= _UC_TLSBASE;
 
 #ifdef PPC_HAVE_FPU
 	/* Save FPU context, if any. */
@@ -231,17 +231,6 @@ cpu_setmcontext(struct lwp *l, const mco
 #ifdef PPC_OEA
 		tf-tf_mq = gr[_REG_MQ];
 #endif
-		/*
-		 * If R2 contains the TLS base, make sure to update 

CVS commit: src/sys/sys

2014-12-14 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec 14 23:49:45 UTC 2014

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

Log Message:
welcome to 7.99.3.


To generate a diff of this commit:
cvs rdiff -u -r1.462 -r1.463 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/sys/sys/param.h
diff -u src/sys/sys/param.h:1.462 src/sys/sys/param.h:1.463
--- src/sys/sys/param.h:1.462	Thu Nov 27 01:44:59 2014
+++ src/sys/sys/param.h	Sun Dec 14 23:49:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.462 2014/11/27 01:44:59 ozaki-r Exp $	*/
+/*	$NetBSD: param.h,v 1.463 2014/12/14 23:49:45 chs Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799000200	/* NetBSD 7.99.2 */
+#define	__NetBSD_Version__	799000300	/* NetBSD 7.99.3 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



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

2014-12-14 Thread Chuck Silvers
Module Name:xsrc
Committed By:   chs
Date:   Sun Dec 14 23:52:45 UTC 2014

Modified Files:
xsrc/external/mit/libdrm/dist: xf86drm.c
xsrc/external/mit/libdrm/dist/include/drm: drm.h

Log Message:
remove the interim code to create mappings via ioctl(),
mmap() works fine now.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 xsrc/external/mit/libdrm/dist/xf86drm.c
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libdrm/dist/include/drm/drm.h

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.9 xsrc/external/mit/libdrm/dist/xf86drm.c:1.10
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.9	Sat Dec 13 21:39:07 2014
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Dec 14 23:52:45 2014
@@ -1129,9 +1129,6 @@ int drmClose(int fd)
 int drmMap(int fd, drm_handle_t handle, drmSize size, drmAddressPtr address)
 {
 static unsigned long pagesize_mask = 0;
-#ifdef DRM_IOCTL_MMAP
-struct drm_mmap mmap_req = {0};
-#endif
 
 if (fd  0)
 	return -EINVAL;
@@ -1141,17 +1138,6 @@ int drmMap(int fd, drm_handle_t handle, 
 
 size = (size + pagesize_mask)  ~pagesize_mask;
 
-#ifdef DRM_IOCTL_MMAP
-mmap_req.dnm_addr = NULL;
-mmap_req.dnm_size = size;
-mmap_req.dnm_prot = (PROT_READ | PROT_WRITE);
-mmap_req.dnm_flags = MAP_SHARED;
-mmap_req.dnm_offset = handle;
-if (drmIoctl(fd, DRM_IOCTL_MMAP, mmap_req) == 0) {
-	*address = mmap_req.dnm_addr;
-	return 0;
-}
-#endif
 *address = drm_mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, handle);
 if (*address == MAP_FAILED)
 	return -errno;
@@ -2585,4 +2571,3 @@ int drmPrimeFDToHandle(int fd, int prime
 	*handle = args.handle;
 	return 0;
 }
-

Index: xsrc/external/mit/libdrm/dist/include/drm/drm.h
diff -u xsrc/external/mit/libdrm/dist/include/drm/drm.h:1.3 xsrc/external/mit/libdrm/dist/include/drm/drm.h:1.4
--- xsrc/external/mit/libdrm/dist/include/drm/drm.h:1.3	Sat Dec 13 21:39:07 2014
+++ xsrc/external/mit/libdrm/dist/include/drm/drm.h	Sun Dec 14 23:52:45 2014
@@ -759,20 +759,6 @@ struct drm_prime_handle {
 #define DRM_IOCTL_MODE_OBJ_SETPROPERTY	DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
 #define DRM_IOCTL_MODE_CURSOR2		DRM_IOWR(0xBB, struct drm_mode_cursor2)
 
-#ifdef __NetBSD__
-/*
- * Instrumenting mmap is trickier than just making an ioctl to do it.
- */
-struct drm_mmap {
-	void		*dnm_addr;  /* in/out */
-	size_t		dnm_size;   /* in */
-	int		dnm_prot;   /* in */
-	int		dnm_flags;  /* in */
-	off_t		dnm_offset; /* in */
-};
-#define	DRM_IOCTL_MMAP	DRM_IOWR(0xff, struct drm_mmap)
-#endif
-
 /**
  * Device specific ioctls should only be in their respective headers
  * The device specific ioctl range is from 0x40 to 0x99.



CVS commit: src/external/mit/xorg

2014-12-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 15 00:20:29 UTC 2014

Modified Files:
src/external/mit/xorg/lib/dri/libmesa: Makefile
src/external/mit/xorg/lib/libGL: Makefile
src/external/mit/xorg/lib/libOSMesa: libmesa.mk
Added Files:
src/external/mit/xorg/lib/libGL: Makefile.glslsrcs
Removed Files:
src/external/mit/xorg/tools/glsl: Makefile Makefile.glsl
Makefile.glslsrcs

Log Message:
delete tools/glsl, is hasn't been used for a while.
move Makefile.glsl into libGL.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/mit/xorg/lib/dri/libmesa/Makefile
cvs rdiff -u -r1.19 -r1.20 src/external/mit/xorg/lib/libGL/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/lib/libGL/Makefile.glslsrcs
cvs rdiff -u -r1.8 -r1.9 src/external/mit/xorg/lib/libOSMesa/libmesa.mk
cvs rdiff -u -r1.1 -r0 src/external/mit/xorg/tools/glsl/Makefile \
src/external/mit/xorg/tools/glsl/Makefile.glsl
cvs rdiff -u -r1.2 -r0 src/external/mit/xorg/tools/glsl/Makefile.glslsrcs

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

Modified files:

Index: src/external/mit/xorg/lib/dri/libmesa/Makefile
diff -u src/external/mit/xorg/lib/dri/libmesa/Makefile:1.13 src/external/mit/xorg/lib/dri/libmesa/Makefile:1.14
--- src/external/mit/xorg/lib/dri/libmesa/Makefile:1.13	Sun Jul 13 16:35:49 2014
+++ src/external/mit/xorg/lib/dri/libmesa/Makefile	Mon Dec 15 00:20:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2014/07/13 16:35:49 joerg Exp $
+#	$NetBSD: Makefile,v 1.14 2014/12/15 00:20:29 mrg Exp $
 
 .include bsd.own.mk
 
@@ -24,7 +24,7 @@ CPPFLAGS+=	${X11FLAGS.THREADLIB} \
 CFLAGS+=	-pthread
 
 .include ../../libOSMesa/libmesa.mk
-.include ../../../tools/glsl/Makefile.glslsrcs
+.include ../../libGL/Makefile.glslsrcs
 
 SRCS+=  ${SRCS.glsl}
 

Index: src/external/mit/xorg/lib/libGL/Makefile
diff -u src/external/mit/xorg/lib/libGL/Makefile:1.19 src/external/mit/xorg/lib/libGL/Makefile:1.20
--- src/external/mit/xorg/lib/libGL/Makefile:1.19	Wed Jul  9 20:22:56 2014
+++ src/external/mit/xorg/lib/libGL/Makefile	Mon Dec 15 00:20:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2014/07/09 20:22:56 riastradh Exp $
+#	$NetBSD: Makefile,v 1.20 2014/12/15 00:20:29 mrg Exp $
 
 .include bsd.own.mk
 
@@ -57,7 +57,7 @@ INCS=	GLwDrawA.h GLwDrawAP.h GLwMDrawA.h
 INCSDIR=${X11INCDIR}/GL
 
 # XXX Create a separate libglsl rather than copying this...
-.include ../../tools/glsl/Makefile.glslsrcs
+.include Makefile.glslsrcs
 
 SRCS+=	${SRCS.dri} ${SRCS.glx} ${SRCS.glsl} ${SRCS.mapi}
 

Index: src/external/mit/xorg/lib/libOSMesa/libmesa.mk
diff -u src/external/mit/xorg/lib/libOSMesa/libmesa.mk:1.8 src/external/mit/xorg/lib/libOSMesa/libmesa.mk:1.9
--- src/external/mit/xorg/lib/libOSMesa/libmesa.mk:1.8	Wed Jul  9 20:22:56 2014
+++ src/external/mit/xorg/lib/libOSMesa/libmesa.mk	Mon Dec 15 00:20:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: libmesa.mk,v 1.8 2014/07/09 20:22:56 riastradh Exp $
+#	$NetBSD: libmesa.mk,v 1.9 2014/12/15 00:20:29 mrg Exp $
 #
 # Consumer of this Makefile should set MESA_SRC_MODULES.
 
@@ -338,7 +338,7 @@ CPPFLAGS+=	-I${X11SRCDIR.MesaLib}/src/${
 LIBDPLIBS=	m	${NETBSDSRCDIR}/lib/libm
 
 # build the shader headers
-.include ../../tools/glsl/Makefile.glsl
+#.include ../../tools/glsl/Makefile.glsl
 
 CPPFLAGS+=	-I.
 CPPFLAGS+=	-I${X11SRCDIR.MesaLib}/include

Added files:

Index: src/external/mit/xorg/lib/libGL/Makefile.glslsrcs
diff -u /dev/null src/external/mit/xorg/lib/libGL/Makefile.glslsrcs:1.1
--- /dev/null	Mon Dec 15 00:20:29 2014
+++ src/external/mit/xorg/lib/libGL/Makefile.glslsrcs	Mon Dec 15 00:20:29 2014
@@ -0,0 +1,100 @@
+#	$NetBSD: Makefile.glslsrcs,v 1.1 2014/12/15 00:20:29 mrg Exp $
+
+# Derived loosely from src/glsl/Makefile.
+
+# XXX Now that we don't need glsl-compile as a tool, this should just
+# be made into a library instead.
+
+.PATH: ${X11SRCDIR.MesaLib}/src/glsl
+.PATH: ${X11SRCDIR.MesaLib}/src/glsl/glcpp
+
+CPPFLAGS+=	-I${X11SRCDIR.MesaLib}/include
+CPPFLAGS+=	-I${X11SRCDIR.MesaLib}/src/glsl
+CPPFLAGS+=	-I${X11SRCDIR.MesaLib}/src/mapi
+CPPFLAGS+=	-I${X11SRCDIR.MesaLib}/src/mesa
+
+SRCS.glsl.libglcpp= \
+	glcpp-lex.c \
+	glcpp-parse.c \
+	pp.c
+
+SRCS.glsl.glcpp= \
+	${SRCS.glsl.libglcpp} \
+	strtod.c \
+	glcpp.c
+
+SRCS.glsl.c= \
+	strtod.c \
+	ralloc.c \
+	${SRCS.glsl.libglcpp}
+
+SRCS.glsl.cxx= \
+	ast_expr.cpp \
+	ast_function.cpp \
+	ast_to_hir.cpp \
+	ast_type.cpp \
+	glsl_lexer.cpp \
+	glsl_parser.cpp \
+	glsl_parser_extras.cpp \
+	glsl_types.cpp \
+	glsl_symbol_table.cpp \
+	hir_field_selection.cpp \
+	ir_basic_block.cpp \
+	ir_clone.cpp \
+	ir_constant_expression.cpp \
+	ir.cpp \
+	ir_expression_flattening.cpp \
+	ir_function_can_inline.cpp \
+	ir_function_detect_recursion.cpp \
+	ir_function.cpp \
+	ir_hierarchical_visitor.cpp \
+	ir_hv_accept.cpp \
+	ir_import_prototypes.cpp \
+	ir_print_visitor.cpp \
+	ir_reader.cpp \
+	ir_rvalue_visitor.cpp \
+	

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

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 15 02:01:41 UTC 2014

Modified Files:
src/sys/arch/amd64/conf: files.amd64

Log Message:
fix compat paths.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/amd64/conf/files.amd64

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/files.amd64
diff -u src/sys/arch/amd64/conf/files.amd64:1.85 src/sys/arch/amd64/conf/files.amd64:1.86
--- src/sys/arch/amd64/conf/files.amd64:1.85	Sun Dec 14 17:32:46 2014
+++ src/sys/arch/amd64/conf/files.amd64	Sun Dec 14 21:01:41 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amd64,v 1.85 2014/12/14 22:32:46 christos Exp $
+#	$NetBSD: files.amd64,v 1.86 2014/12/15 02:01:41 christos Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -131,8 +131,8 @@ attach	fd at fdc
 # Compatibility modules
 #
 # Binary compatibility with previous NetBSD releases (COMPAT_XX)
-file	arch/i386/i386/compat_13_machdep.c	compat_13
-file	arch/i386/i386/compat_16_machdep.c	compat_16
+file	arch/amd64/amd64/compat_13_machdep.c	compat_13
+file	arch/amd64/amd64/compat_16_machdep.c	compat_16
 
 # NetBSD/i386 32-bit binary compatibility (COMPAT_NETBSD32)
 include compat/netbsd32/files.netbsd32



CVS commit: src/sys/net

2014-12-14 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Dec 15 06:52:25 UTC 2014

Modified Files:
src/sys/net: if.c if.h

Log Message:
Introduce if_initialize and if_register as an alternative to if_attach

if_attach initializes an ifnet object and registers it to the system
(e.g., ifnet_list), however, if_attach doesn't complete the
initialization and the rest of it will be done by if_alloc_sadl
that is normally directly called by device drivers or called via
functions like ether_ifattach. So there is a race between
if_attach and if_alloc_sadl (A half-baked ifnet object may be
accessed, for example, via ioctl between them).

The aim of this fix is to register an initializing ifnet object
after completing its initializations. To this end, this fix
separates if_attach into an initialization part (if_initialize)
and a registration part (if_register) and call the latter after
if_alloc_sadl (ether_ifattach). So a typical usage of the two
new APIs is like this:

  if_initialize(ifp);  // was if_attach
  ether_ifattach(ifp, enaddr);
  if_register(ifp);

Nonetheless, changing every drivers to do so at once isn't
feasible. So we keep if_attach working as it used to be and
will change only some drivers that we need at this point.
Once we know the fix really works well, we'll change all
the others.

Some more information of the fix can be found here:
http://mail-index.netbsd.org/tech-kern/2014/12/10/msg018242.html

No objection on tech-kern and tech-net.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/net/if.c
cvs rdiff -u -r1.183 -r1.184 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.306 src/sys/net/if.c:1.307
--- src/sys/net/if.c:1.306	Sun Dec 14 08:57:14 2014
+++ src/sys/net/if.c	Mon Dec 15 06:52:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.306 2014/12/14 08:57:14 martin Exp $	*/
+/*	$NetBSD: if.c,v 1.307 2014/12/15 06:52:25 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.306 2014/12/14 08:57:14 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.307 2014/12/15 06:52:25 ozaki-r Exp $);
 
 #include opt_inet.h
 
@@ -582,19 +582,21 @@ skip:
 }
 
 /*
- * Attach an interface to the list of active interfaces.
+ * Initialize an interface and assign an index for it.
+ *
+ * It must be called prior to a device specific attach routine
+ * (e.g., ether_ifattach and ieee80211_ifattach) or if_alloc_sadl,
+ * and be followed by if_register:
+ *
+ * if_initialize(ifp);
+ * ether_ifattach(ifp, enaddr);
+ * if_register(ifp);
  */
 void
-if_attach(ifnet_t *ifp)
+if_initialize(ifnet_t *ifp)
 {
 	KASSERT(if_indexlim  0);
 	TAILQ_INIT(ifp-if_addrlist);
-	TAILQ_INSERT_TAIL(ifnet_list, ifp, if_list);
-
-	if (ifioctl_attach(ifp) != 0)
-		panic(%s: ifioctl_attach() failed, __func__);
-
-	if_getindex(ifp);
 
 	/*
 	 * Link level name is allocated later by a separate call to
@@ -604,8 +606,6 @@ if_attach(ifnet_t *ifp)
 	if (ifp-if_snd.ifq_maxlen == 0)
 		ifp-if_snd.ifq_maxlen = ifqmaxlen;
 
-	sysctl_sndq_setup(ifp-if_sysctl_log, ifp-if_xname, ifp-if_snd);
-
 	ifp-if_broadcastaddr = 0; /* reliably crash if used uninitialized */
 
 	ifp-if_link_state = LINK_STATE_UNKNOWN;
@@ -632,6 +632,20 @@ if_attach(ifnet_t *ifp)
 	(void)pfil_run_hooks(if_pfil,
 	(struct mbuf **)PFIL_IFNET_ATTACH, ifp, PFIL_IFNET);
 
+	if_getindex(ifp);
+}
+
+/*
+ * Register an interface to the list of active interfaces.
+ */
+void
+if_register(ifnet_t *ifp)
+{
+	if (ifioctl_attach(ifp) != 0)
+		panic(%s: ifioctl_attach() failed, __func__);
+
+	sysctl_sndq_setup(ifp-if_sysctl_log, ifp-if_xname, ifp-if_snd);
+
 	if (!STAILQ_EMPTY(domains))
 		if_attachdomain1(ifp);
 
@@ -645,6 +659,19 @@ if_attach(ifnet_t *ifp)
 		callout_setfunc(ifp-if_slowtimo_ch, if_slowtimo, ifp);
 		if_slowtimo(ifp);
 	}
+
+	TAILQ_INSERT_TAIL(ifnet_list, ifp, if_list);
+}
+
+/*
+ * Deprecated. Use if_initialize and if_register instead.
+ * See the above comment of if_initialize.
+ */
+void
+if_attach(ifnet_t *ifp)
+{
+	if_initialize(ifp);
+	if_register(ifp);
 }
 
 void

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.183 src/sys/net/if.h:1.184
--- src/sys/net/if.h:1.183	Tue Dec  2 04:43:35 2014
+++ src/sys/net/if.h	Mon Dec 15 06:52:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.183 2014/12/02 04:43:35 ozaki-r Exp $	*/
+/*	$NetBSD: if.h,v 1.184 2014/12/15 06:52:25 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -864,7 +864,9 @@ void if_activate_sadl(struct ifnet *, st
 const struct sockaddr_dl *);
 void	if_set_sadl(struct ifnet *, const void *, u_char, bool);
 void	if_alloc_sadl(struct ifnet *);
-void	if_attach(struct ifnet *);
+void	if_initialize(struct ifnet *);
+void	if_register(struct ifnet *);
+void	if_attach(struct 

CVS commit: [netbsd-5] xsrc/xfree/xc/programs/Xserver

2014-12-14 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Dec 15 07:02:47 UTC 2014

Modified Files:
xsrc/xfree/xc/programs/Xserver/GL/glx [netbsd-5]: single2.c
single2swap.c singlepix.c singlepixswap.c
xsrc/xfree/xc/programs/Xserver/Xext [netbsd-5]: EVI.c xf86vmode.c

Log Message:
Apply patch (requested by mrg in ticket 1935):
Fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.8.1 -r1.1.1.6.8.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c \
xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c
cvs rdiff -u -r1.1.1.3.22.1 -r1.1.1.3.22.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c
cvs rdiff -u -r1.1.1.4.22.1 -r1.1.1.4.22.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.20.1 \
xsrc/xfree/xc/programs/Xserver/Xext/EVI.c
cvs rdiff -u -r1.1.1.6 -r1.1.1.6.20.1 \
xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.8.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.8.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.8.1	Fri Dec 12 06:54:25 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	Mon Dec 15 07:02:47 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include GL/glx_ansic.h
 
+#include stdint.h
+
 int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
 {
 ClientPtr client = cl-client;
Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.8.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.8.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.8.1	Fri Dec 12 06:54:25 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c	Mon Dec 15 07:02:47 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include GL/glx_ansic.h
 
+#include stdint.h
+
 int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
 {
 ClientPtr client = cl-client;

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.22.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.22.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.22.1	Fri Dec 12 06:54:25 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c	Mon Dec 15 07:02:47 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include g_disptab_EXT.h
 
+#include stdint.h
+
 int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 {
 GLsizei width, height;

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.22.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.22.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.22.1	Fri Dec 12 06:54:25 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c	Mon Dec 15 07:02:47 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include g_disptab_EXT.h
 
+#include stdint.h
+
 int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 {
 GLsizei width, height;

Index: xsrc/xfree/xc/programs/Xserver/Xext/EVI.c
diff -u xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4 xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4.20.1
--- xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4	Fri Mar  5 14:27:38 2004
+++ xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	Mon Dec 15 07:02:47 2014
@@ -33,6 +33,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include EVIstruct.h
 #include modinit.h
 
+#include stdint.h
+
 #if 0
 static unsigned char XEVIReqCode = 0;
 #endif

Index: xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c
diff -u xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6 xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6.20.1
--- xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6	Fri Mar  5 14:27:40 2004
+++ xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	Mon Dec 15 07:02:47 2014
@@ -51,6 +51,8 @@ from Kaleb S. KEITHLEY
 #include xf86_ansic.h
 #endif
 
+#include stdint.h
+
 static int VidModeErrorBase;
 static int VidModeGeneration = 0;
 static int VidModeClientPrivateIndex;



CVS commit: [netbsd-5-1] xsrc/xfree/xc/programs/Xserver

2014-12-14 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Dec 15 07:03:26 UTC 2014

Modified Files:
xsrc/xfree/xc/programs/Xserver/GL/glx [netbsd-5-1]: single2.c
single2swap.c singlepix.c singlepixswap.c
xsrc/xfree/xc/programs/Xserver/Xext [netbsd-5-1]: EVI.c xf86vmode.c

Log Message:
Apply patch (requested by mrg in ticket 1935):
Fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.12.1 -r1.1.1.6.12.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c \
xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c
cvs rdiff -u -r1.1.1.3.26.1 -r1.1.1.3.26.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c
cvs rdiff -u -r1.1.1.4.26.1 -r1.1.1.4.26.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.24.1 \
xsrc/xfree/xc/programs/Xserver/Xext/EVI.c
cvs rdiff -u -r1.1.1.6 -r1.1.1.6.24.1 \
xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.12.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.12.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.12.1	Fri Dec 12 06:56:53 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	Mon Dec 15 07:03:25 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include GL/glx_ansic.h
 
+#include stdint.h
+
 int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
 {
 ClientPtr client = cl-client;
Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.12.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.12.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.12.1	Fri Dec 12 06:56:53 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c	Mon Dec 15 07:03:25 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include GL/glx_ansic.h
 
+#include stdint.h
+
 int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
 {
 ClientPtr client = cl-client;

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.26.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.26.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.26.1	Fri Dec 12 06:56:53 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c	Mon Dec 15 07:03:25 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include g_disptab_EXT.h
 
+#include stdint.h
+
 int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 {
 GLsizei width, height;

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.26.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.26.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.26.1	Fri Dec 12 06:56:53 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c	Mon Dec 15 07:03:25 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include g_disptab_EXT.h
 
+#include stdint.h
+
 int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 {
 GLsizei width, height;

Index: xsrc/xfree/xc/programs/Xserver/Xext/EVI.c
diff -u xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4 xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4.24.1
--- xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4	Fri Mar  5 14:27:38 2004
+++ xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	Mon Dec 15 07:03:26 2014
@@ -33,6 +33,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include EVIstruct.h
 #include modinit.h
 
+#include stdint.h
+
 #if 0
 static unsigned char XEVIReqCode = 0;
 #endif

Index: xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c
diff -u xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6 xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6.24.1
--- xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6	Fri Mar  5 14:27:40 2004
+++ xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	Mon Dec 15 07:03:26 2014
@@ -51,6 +51,8 @@ from Kaleb S. KEITHLEY
 #include xf86_ansic.h
 #endif
 
+#include stdint.h
+
 static int VidModeErrorBase;
 static int VidModeGeneration = 0;
 static int VidModeClientPrivateIndex;



CVS commit: [netbsd-5-2] xsrc/xfree/xc/programs/Xserver

2014-12-14 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Dec 15 07:03:50 UTC 2014

Modified Files:
xsrc/xfree/xc/programs/Xserver/GL/glx [netbsd-5-2]: single2.c
single2swap.c singlepix.c singlepixswap.c
xsrc/xfree/xc/programs/Xserver/Xext [netbsd-5-2]: EVI.c xf86vmode.c

Log Message:
Apply patch (requested by mrg in ticket 1935):
Fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.18.1 -r1.1.1.6.18.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c \
xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c
cvs rdiff -u -r1.1.1.3.32.1 -r1.1.1.3.32.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c
cvs rdiff -u -r1.1.1.4.32.1 -r1.1.1.4.32.2 \
xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.30.1 \
xsrc/xfree/xc/programs/Xserver/Xext/EVI.c
cvs rdiff -u -r1.1.1.6 -r1.1.1.6.30.1 \
xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.18.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.18.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.18.1	Fri Dec 12 06:58:36 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	Mon Dec 15 07:03:50 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include GL/glx_ansic.h
 
+#include stdint.h
+
 int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
 {
 ClientPtr client = cl-client;
Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.18.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.18.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.18.1	Fri Dec 12 06:58:36 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c	Mon Dec 15 07:03:50 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include GL/glx_ansic.h
 
+#include stdint.h
+
 int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
 {
 ClientPtr client = cl-client;

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.32.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.32.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.32.1	Fri Dec 12 06:58:36 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c	Mon Dec 15 07:03:50 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include g_disptab_EXT.h
 
+#include stdint.h
+
 int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 {
 GLsizei width, height;

Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c
diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.32.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.32.2
--- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.32.1	Fri Dec 12 06:58:36 2014
+++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c	Mon Dec 15 07:03:50 2014
@@ -42,6 +42,8 @@
 #include g_disptab.h
 #include g_disptab_EXT.h
 
+#include stdint.h
+
 int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 {
 GLsizei width, height;

Index: xsrc/xfree/xc/programs/Xserver/Xext/EVI.c
diff -u xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4 xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4.30.1
--- xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4	Fri Mar  5 14:27:38 2004
+++ xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	Mon Dec 15 07:03:50 2014
@@ -33,6 +33,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include EVIstruct.h
 #include modinit.h
 
+#include stdint.h
+
 #if 0
 static unsigned char XEVIReqCode = 0;
 #endif

Index: xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c
diff -u xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6 xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6.30.1
--- xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6	Fri Mar  5 14:27:40 2004
+++ xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	Mon Dec 15 07:03:50 2014
@@ -51,6 +51,8 @@ from Kaleb S. KEITHLEY
 #include xf86_ansic.h
 #endif
 
+#include stdint.h
+
 static int VidModeErrorBase;
 static int VidModeGeneration = 0;
 static int VidModeClientPrivateIndex;



CVS commit: [netbsd-5] src/doc

2014-12-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec 15 07:12:24 UTC 2014

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
update 1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.85 -r1.1.2.86 src/doc/CHANGES-5.3

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-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.85 src/doc/CHANGES-5.3:1.1.2.86
--- src/doc/CHANGES-5.3:1.1.2.85	Fri Dec 12 06:56:12 2014
+++ src/doc/CHANGES-5.3	Mon Dec 15 07:12:24 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.85 2014/12/12 06:56:12 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.86 2014/12/15 07:12:24 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1224,12 +1224,14 @@ xsrc/xfree/xc/programs/Xserver/GL/glx/gl
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxserver.h 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/rensize.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2, patch
 xsrc/xfree/xc/programs/Xserver/GL/glx/unpack.h	1.2
+xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xcmisc.c	1.3
+xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xvdisp.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgdctl.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgfctl.c	1.2



CVS commit: [netbsd-5-1] src/doc

2014-12-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec 15 07:13:33 UTC 2014

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.6

Log Message:
update 1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-5.1.6

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-5.1.6
diff -u src/doc/CHANGES-5.1.6:1.1.2.7 src/doc/CHANGES-5.1.6:1.1.2.8
--- src/doc/CHANGES-5.1.6:1.1.2.7	Fri Dec 12 06:58:00 2014
+++ src/doc/CHANGES-5.1.6	Mon Dec 15 07:13:33 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.6,v 1.1.2.7 2014/12/12 06:58:00 snj Exp $
+# $NetBSD: CHANGES-5.1.6,v 1.1.2.8 2014/12/15 07:13:33 snj Exp $
 
 A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6
 release:
@@ -80,12 +80,14 @@ xsrc/xfree/xc/programs/Xserver/GL/glx/gl
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxserver.h 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/rensize.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2, patch
 xsrc/xfree/xc/programs/Xserver/GL/glx/unpack.h	1.2
+xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xcmisc.c	1.3
+xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xvdisp.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgdctl.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgfctl.c	1.2



CVS commit: [netbsd-5-2] src/doc

2014-12-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec 15 07:14:22 UTC 2014

Modified Files:
src/doc [netbsd-5-2]: CHANGES-5.2.4

Log Message:
update 1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-5.2.4

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-5.2.4
diff -u src/doc/CHANGES-5.2.4:1.1.2.7 src/doc/CHANGES-5.2.4:1.1.2.8
--- src/doc/CHANGES-5.2.4:1.1.2.7	Fri Dec 12 06:59:16 2014
+++ src/doc/CHANGES-5.2.4	Mon Dec 15 07:14:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.4,v 1.1.2.7 2014/12/12 06:59:16 snj Exp $
+# $NetBSD: CHANGES-5.2.4,v 1.1.2.8 2014/12/15 07:14:22 snj Exp $
 
 A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4
 release:
@@ -80,12 +80,14 @@ xsrc/xfree/xc/programs/Xserver/GL/glx/gl
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxserver.h 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/rensize.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2, patch
 xsrc/xfree/xc/programs/Xserver/GL/glx/unpack.h	1.2
+xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xcmisc.c	1.3
+xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xvdisp.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgdctl.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgfctl.c	1.2



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

2014-12-14 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Dec 15 07:35:09 UTC 2014

Modified Files:
src/sys/arch/xen/conf: files.xen

Log Message:
Add two new compat files for Xen on amd64


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/xen/conf/files.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/xen/conf/files.xen
diff -u src/sys/arch/xen/conf/files.xen:1.134 src/sys/arch/xen/conf/files.xen:1.135
--- src/sys/arch/xen/conf/files.xen:1.134	Sat Oct 11 06:07:48 2014
+++ src/sys/arch/xen/conf/files.xen	Mon Dec 15 07:35:09 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.xen,v 1.134 2014/10/11 06:07:48 uebayasi Exp $
+#	$NetBSD: files.xen,v 1.135 2014/12/15 07:35:09 ozaki-r Exp $
 #	NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp 
 #	NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp 
 
@@ -337,6 +337,10 @@ file	arch/i386/i386/freebsd_sigcode.S	co
 file	arch/i386/i386/freebsd_syscall.c	compat_freebsd
 
 elifdef amd64
+# Binary compatibility with previous NetBSD releases (COMPAT_XX)
+file	arch/amd64/amd64/compat_13_machdep.c	compat_13
+file	arch/amd64/amd64/compat_16_machdep.c	compat_16 | compat_ibcs2
+
 # NetBSD/i386 32-bit binary compatibility (COMPAT_NETBSD32)
 include compat/netbsd32/files.netbsd32
 file	arch/amd64/amd64/netbsd32_machdep.c	compat_netbsd32