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

2018-09-08 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Sun Sep  9 03:58:37 UTC 2018

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

Log Message:
include sys/param.h for MIN/MAX, needed when building in pkgsrc
tolerate set version failing in another location too.

this now works well enough for mesa 18.2.0 to display glxgears followed
soon by X crashing and refusing to start again until the machine is
rebooted, at least in my case.

PR pkg/51795, pkg/51786


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 xsrc/external/mit/libdrm/dist/xf86drm.c

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.19 xsrc/external/mit/libdrm/dist/xf86drm.c:1.20
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.19	Sun Sep  9 03:24:46 2018
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Sep  9 03:58:37 2018
@@ -89,6 +89,7 @@
 #ifdef __NetBSD__
 #undef DRM_MAJOR
 #define DRM_MAJOR 180
+#include 
 #include 
 #include 
 #endif
@@ -3128,8 +3129,10 @@ static int drmParsePciBusInfo(int maj, i
 	sv.drm_dd_major = -1;
 	sv.drm_dd_minor = -1;
 	if (drmSetInterfaceVersion(fd, )) {
-	(void)close(fd);
-	return -ENODEV;
+/*
+	 * We're probably not the master.  Hope the master already
+	 * set the version to >=1.1 so that we can get the busid.
+	 */
 	}
 }
 



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

2018-09-08 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Sun Sep  9 03:58:37 UTC 2018

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

Log Message:
include sys/param.h for MIN/MAX, needed when building in pkgsrc
tolerate set version failing in another location too.

this now works well enough for mesa 18.2.0 to display glxgears followed
soon by X crashing and refusing to start again until the machine is
rebooted, at least in my case.

PR pkg/51795, pkg/51786


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 xsrc/external/mit/libdrm/dist/xf86drm.c

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



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

2018-09-08 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Sun Sep  9 03:24:46 UTC 2018

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

Log Message:
Let's get the sense of strncmp correct, shall we?

PR pkg/51795
PR kern/51786

XXX pullup-7
XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 xsrc/external/mit/libdrm/dist/xf86drm.c

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



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

2018-09-08 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Sun Sep  9 03:24:46 UTC 2018

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

Log Message:
Let's get the sense of strncmp correct, shall we?

PR pkg/51795
PR kern/51786

XXX pullup-7
XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 xsrc/external/mit/libdrm/dist/xf86drm.c

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.18 xsrc/external/mit/libdrm/dist/xf86drm.c:1.19
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.18	Sun Sep  9 03:05:36 2018
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Sep  9 03:24:46 2018
@@ -3055,7 +3055,7 @@ static int drmParseSubsystemType(int maj
 
 /* Find a string we know about; otherwise -EINVAL.  */
 ret = -EINVAL;
-if (strncmp(buf, "pci:", 4) != 0)
+if (strncmp(buf, "pci:", 4) == 0)
 	ret = DRM_BUS_PCI;
 
 /* We're done with the bus id.  */



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 03:12:51 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo:
nouveau_nvkm_engine_fifo_chan.c

Log Message:
Yet another diagused


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.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/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c:1.8 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c:1.9
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c:1.8	Mon Aug 27 14:54:33 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c	Sun Sep  9 03:12:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.8 2018/08/27 14:54:33 riastradh Exp $	*/
+/*	$NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.9 2018/09/09 03:12:51 pgoyette Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.8 2018/08/27 14:54:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.9 2018/09/09 03:12:51 pgoyette Exp $");
 
 #include "chan.h"
 
@@ -480,7 +480,8 @@ nvkm_fifo_chan_ctor(const struct nvkm_fi
 		bus_space_tag_t mmiot = device->mmiot;
 		bus_space_handle_t mmioh = device->mmioh;
 		bus_size_t mmiosz = device->mmiosz;
-		bus_addr_t mmioaddr = device->func->resource_addr(device, bar);
+		__diagused bus_addr_t mmioaddr =
+		device->func->resource_addr(device, bar);
 
 		/* Check whether it lies inside the region.  */
 		if (mmiosz < base ||



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 03:12:51 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo:
nouveau_nvkm_engine_fifo_chan.c

Log Message:
Yet another diagused


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 03:10:03 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_nvif.c

Log Message:
Another __diagused

OK riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 03:10:03 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_nvif.c

Log Message:
Another __diagused

OK riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.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/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c:1.4 src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c:1.5
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c:1.4	Mon Aug 27 14:47:53 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c	Sun Sep  9 03:10:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_nvif.c,v 1.4 2018/08/27 14:47:53 riastradh Exp $	*/
+/*	$NetBSD: nouveau_nvif.c,v 1.5 2018/09/09 03:10:03 pgoyette Exp $	*/
 
 /*
  * Copyright 2014 Red Hat Inc.
@@ -29,7 +29,7 @@
  **/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvif.c,v 1.4 2018/08/27 14:47:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvif.c,v 1.5 2018/09/09 03:10:03 pgoyette Exp $");
 
 #include 
 #include 
@@ -90,7 +90,7 @@ nvkm_client_unmap(void *priv, bus_space_
 	if (tag == client->mmiot &&
 	client->mmioaddr <= busaddr &&
 	busaddr - client->mmioaddr <= client->mmiosz) {
-		const bus_size_t offset = busaddr - client->mmioaddr;
+		__diagused const bus_size_t offset = busaddr - client->mmioaddr;
 		KASSERT(size <= client->mmiosz - offset);
 		/* Nothing to do to release a subregion.  */
 		return;



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

2018-09-08 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Sun Sep  9 03:05:37 UTC 2018

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

Log Message:
Don't make setversion failure fatal -- only master can set it.

PR pkg/51795
PR kern/51786

XXX pullup-7
XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 xsrc/external/mit/libdrm/dist/xf86drm.c

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.17 xsrc/external/mit/libdrm/dist/xf86drm.c:1.18
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.17	Sun Sep  9 02:00:29 2018
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Sep  9 03:05:36 2018
@@ -3036,8 +3036,10 @@ static int drmParseSubsystemType(int maj
 	sv.drm_dd_major = -1;
 	sv.drm_dd_minor = -1;
 	if (drmSetInterfaceVersion(fd, )) {
-	(void)close(fd);
-	return -ENODEV;
+	/*
+	 * We're probably not the master.  Hope the master already
+	 * set the version to >=1.1 so that we can get the busid.
+	 */
 	}
 }
 



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

2018-09-08 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Sun Sep  9 03:05:37 UTC 2018

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

Log Message:
Don't make setversion failure fatal -- only master can set it.

PR pkg/51795
PR kern/51786

XXX pullup-7
XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 xsrc/external/mit/libdrm/dist/xf86drm.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 03:04:43 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_cmd_parser.c

Log Message:
Add __diagused attribute to some diagnostic routines.

OK riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.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/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.17 src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.18
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.17	Mon Aug 27 14:50:04 2018
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c	Sun Sep  9 03:04:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_cmd_parser.c,v 1.17 2018/08/27 14:50:04 riastradh Exp $	*/
+/*	$NetBSD: i915_cmd_parser.c,v 1.18 2018/09/09 03:04:43 pgoyette Exp $	*/
 
 /*
  * Copyright © 2013 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.17 2018/08/27 14:50:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.18 2018/09/09 03:04:43 pgoyette Exp $");
 
 #include "i915_drv.h"
 
@@ -555,6 +555,7 @@ static u32 gen7_blt_get_cmd_length_mask(
 	return 0;
 }
 
+__diagused
 static bool validate_cmds_sorted(struct intel_engine_cs *ring,
  const struct drm_i915_cmd_table *cmd_tables,
  int cmd_table_count)
@@ -611,6 +612,7 @@ static bool check_sorted(int ring_id,
 	return ret;
 }
 
+__diagused
 static bool validate_regs_sorted(struct intel_engine_cs *ring)
 {
 	return check_sorted(ring->id, ring->reg_table, ring->reg_count) &&



CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 03:04:43 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_cmd_parser.c

Log Message:
Add __diagused attribute to some diagnostic routines.

OK riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c

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



CVS commit: [pgoyette-compat] src/doc

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 02:20:17 UTC 2018

Added Files:
src/doc [pgoyette-compat]: TODO.compat-module
Removed Files:
src/doc [pgoyette-compat]: COMPAT-branch-notes

Log Message:
Rename COMPAT-branch-notes to TODO.compat-module


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r0 src/doc/COMPAT-branch-notes
cvs rdiff -u -r0 -r1.1.2.1 src/doc/TODO.compat-module

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

Added files:

Index: src/doc/TODO.compat-module
diff -u /dev/null src/doc/TODO.compat-module:1.1.2.1
--- /dev/null	Sun Sep  9 02:20:17 2018
+++ src/doc/TODO.compat-module	Sun Sep  9 02:20:17 2018
@@ -0,0 +1,103 @@
+/* $NetBSD: TODO.compat-module,v 1.1.2.1 2018/09/09 02:20:17 pgoyette Exp $ */
+
+DONE
+
+1.  Returned the build to use a .a compat library rather than a .o
+library.  The original method used was .a but that was changed
+(fairly recently) as a work-around to address some support
+routines that were not being included when needed.  These support
+modules are now included in their own module, and the work-around
+is therefore no longer needed.
+
+2.  Reverted some intentional auto-load breakage for loading the sysv_ipc
+module; the breakage was introduced as the fix for the above-mentioned
+build breakage.  
+
+3.  Split the sysv_ipc compat routines into their own compat_sysv module.
+
+4.  Resolved some inter-module dependencies.
+
+5.  Extracted some net/if.c compat routines into the compat module, and
+replaced the originals with indirect (vectored) function calls.
+
+6.  Reconfirmed existing compat-module dependencies, and update the
+defopt/defflag lines in the config files* as needed, to insure that
+built-in dependencies get resolved.
+
+7.  Fixed limits on the number of module depedencies and maximum
+recursion level have been removed.  Previous code for reporting
+module status to userland has been versioned and moved to the
+compat_80 module.
+
+8.  The old monolithic compat module has been broken into multiple
+modules, one for each old NetBSD version.  The monolithic module
+is still available.
+
+Similarly, the compat_sysv module has also been split into several
+version-specific modules, and the mini-monolithic compat_sysv module
+is still provided.
+
+9.  syscalls.master has been updated to autoload the version-specific
+compat modules rather than the monolithic modules.
+
+10. Separated COMPAT_BSDPTY stuff, allowing the COMPAT_60 module to be
+built regardless.
+
+
+TODO - Required for branch merge
+
+none
+
+
+TODO - Not required for branch merge
+
+1.  Audit the entire code base for any remaining embedded #ifdef's for
+COMPAT_xx.  When found, move the actual compat code into the compat
+hierarchy and replace originals with indirect (vectored) calls.
+
+2.  The rtsock compat code is a disaster, with rtsock_50.c #include-ing
+the main rtsock.c code with various manipulations of the COMPAT_50
+macro.  Once rtsock is separated, compat_14 references to rtsock_50
+routines needs to be verified.
+
+Currently, this entire code is built for the monolithic COMPAT
+module, but there's no way to reach the entry points, so none of
+the compat code can be executed, neither on the branch nor on
+HEAD.
+
+3.  The compat_60 module still needs some work for XEN systems.  We
+probably need some build infrastructure changes to ensure that
+XEN (and, for i386, XEN-PAE) modules are build with the correct
+macros defined and with -I directories specified in the same order
+as for building kernels. See PR port-xen/53130.  This currently
+prevents loading of micro-code updates for amd64 processors running
+XEN kernels.  This limitation also exists on HEAD.
+
+4.  There seems to be quite a bit of MD compat_xx code, in the various
+sys/arch/ directories.  I haven't yet looked at any of this.  But it
+seems to me that the MI compat build infrastructure should have some
+mechanism to "reach over" to the MD code, #include a Makefile.inc file,
+and perhaps define something to enable the MI modcmd code to call a
+compat_xx_MD_init() routine.
+
+Note also that there are a few bits of MD code that is COMPAT_44
+related.  (The only bit of MI COMPAT_44 code is in the single module
+shared by COMPAT_43 and COMPAT_09.)  This affects the cesfic, hp300,
+news68k, and x68k platforms, all in their respective machdep.c
+source file.  Additionally, the zaurus platform defines COMPAT_44 in
+its INSTALL kernel configuration - but no other configuration files!
+
+As far as I can tell, none of the MD compat code is currently built
+into the monolithic COMPAT module on HEAD.  Thus, its absence from
+any of the 

CVS commit: [pgoyette-compat] src/doc

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep  9 02:20:17 UTC 2018

Added Files:
src/doc [pgoyette-compat]: TODO.compat-module
Removed Files:
src/doc [pgoyette-compat]: COMPAT-branch-notes

Log Message:
Rename COMPAT-branch-notes to TODO.compat-module


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r0 src/doc/COMPAT-branch-notes
cvs rdiff -u -r0 -r1.1.2.1 src/doc/TODO.compat-module

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



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

2018-09-08 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Sun Sep  9 02:00:29 UTC 2018

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

Log Message:
Implement drmParsePciBusInfo and drmParsePciDeviceInfo.

Uses drmGetBusid for bus info, and pciN with libpci for device info.

Aims to address PR pkg/51795 without needing the kernel changes
suggested in PR kern/51786.  Compile-tested only sofar -- should
confirm before closing any PRs.

(Sorry it took so long for me to find a round tuit!)

XXX pullup-7
XXX pullup-8

...along with src/external/mit/xorg/lib/libdrm/Makefile r1.16 for
libpci.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 xsrc/external/mit/libdrm/dist/xf86drm.c

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.16 xsrc/external/mit/libdrm/dist/xf86drm.c:1.17
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.16	Wed Mar 14 07:19:26 2018
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Sep  9 02:00:29 2018
@@ -89,6 +89,8 @@
 #ifdef __NetBSD__
 #undef DRM_MAJOR
 #define DRM_MAJOR 180
+#include 
+#include 
 #endif
 
 #ifdef __OpenBSD__
@@ -3002,6 +3004,63 @@ static int drmParseSubsystemType(int maj
 return DRM_BUS_HOST1X;
 
 return -EINVAL;
+#elif defined(__NetBSD__)
+int type, fd;
+drmSetVersion sv;
+char *buf;
+unsigned domain, bus, dev;
+int func;
+int ret;
+
+/* Get the type of device we're looking for to pick the right pathname.  */
+type = drmGetMinorType(min);
+if (type == -1)
+	return -ENODEV;
+
+/* Open the device.  Don't try to create it if it's not there.  */
+fd = drmOpenMinor(min, 0, type);
+if (fd < 0)
+	return -errno;
+
+/*
+ * Set the interface version to 1.4 or 1.1, which has the effect of
+ * populating the bus id for us.
+ */
+sv.drm_di_major = 1;
+sv.drm_di_minor = 4;
+sv.drm_dd_major = -1;
+sv.drm_dd_minor = -1;
+if (drmSetInterfaceVersion(fd, )) {
+	sv.drm_di_major = 1;
+	sv.drm_di_minor = 1;
+	sv.drm_dd_major = -1;
+	sv.drm_dd_minor = -1;
+	if (drmSetInterfaceVersion(fd, )) {
+	(void)close(fd);
+	return -ENODEV;
+	}
+}
+
+/* Get the bus id.  */
+buf = drmGetBusid(fd);
+
+/* We're done with the device now.  */
+(void)close(fd);
+
+/* If there is no bus id, fail.  */
+if (buf == NULL)
+	return -ENODEV;
+
+/* Find a string we know about; otherwise -EINVAL.  */
+ret = -EINVAL;
+if (strncmp(buf, "pci:", 4) != 0)
+	ret = DRM_BUS_PCI;
+
+/* We're done with the bus id.  */
+free(buf);
+
+/* Success or not, we're done.  */
+return ret;
 #elif defined(__OpenBSD__)
 return DRM_BUS_PCI;
 #else
@@ -3035,6 +3094,71 @@ static int drmParsePciBusInfo(int maj, i
 info->func = func;
 
 return 0;
+#elif defined(__NetBSD__)
+int type, fd;
+drmSetVersion sv;
+char *buf;
+unsigned domain, bus, dev;
+int func;
+int ret;
+
+/* Get the type of device we're looking for to pick the right pathname.  */
+type = drmGetMinorType(min);
+if (type == -1)
+	return -ENODEV;
+
+/* Open the device.  Don't try to create it if it's not there.  */
+fd = drmOpenMinor(min, 0, type);
+if (fd < 0)
+	return -errno;
+
+/*
+ * Set the interface version to 1.4 or 1.1, which has the effect of
+ * populating the bus id for us.
+ */
+sv.drm_di_major = 1;
+sv.drm_di_minor = 4;
+sv.drm_dd_major = -1;
+sv.drm_dd_minor = -1;
+if (drmSetInterfaceVersion(fd, )) {
+	sv.drm_di_major = 1;
+	sv.drm_di_minor = 1;
+	sv.drm_dd_major = -1;
+	sv.drm_dd_minor = -1;
+	if (drmSetInterfaceVersion(fd, )) {
+	(void)close(fd);
+	return -ENODEV;
+	}
+}
+
+/* Get the bus id.  */
+buf = drmGetBusid(fd);
+
+/* We're done with the device now.  */
+(void)close(fd);
+
+/* If there is no bus id, fail.  */
+if (buf == NULL)
+	return -ENODEV;
+
+/* Parse the bus id.  */
+ret = sscanf(buf, "pci:%04x:%02x:%02x.%d", , , , );
+
+/* We're done with the bus id.  */
+free(buf);
+
+/* If scanf didn't return 4 -- domain, bus, dev, func -- then fail.  */
+if (ret != 4)
+	return -ENODEV;
+
+/* Populate the results.  */
+info->domain = domain;
+info->bus = bus;
+info->dev = dev;
+info->func = func;
+
+/* Success!  */
+return 0;
 #elif defined(__OpenBSD__)
 struct drm_pciinfo pinfo;
 int fd, type;
@@ -3199,6 +3323,41 @@ static int drmParsePciDeviceInfo(int maj
 return parse_config_sysfs_file(maj, min, device);
 
 return 0;
+#elif defined(__NetBSD__)
+drmPciBusInfo businfo;
+char fname[PATH_MAX];
+int pcifd;
+pcireg_t id, class, subsys;
+int ret;
+
+/* Find where on the bus the device lives.  */
+ret = drmParsePciBusInfo(maj, min, );
+if (ret)
+	return ret;
+
+/* Open the 

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

2018-09-08 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Sun Sep  9 02:00:29 UTC 2018

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

Log Message:
Implement drmParsePciBusInfo and drmParsePciDeviceInfo.

Uses drmGetBusid for bus info, and pciN with libpci for device info.

Aims to address PR pkg/51795 without needing the kernel changes
suggested in PR kern/51786.  Compile-tested only sofar -- should
confirm before closing any PRs.

(Sorry it took so long for me to find a round tuit!)

XXX pullup-7
XXX pullup-8

...along with src/external/mit/xorg/lib/libdrm/Makefile r1.16 for
libpci.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 xsrc/external/mit/libdrm/dist/xf86drm.c

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



CVS commit: src/external/mit/xorg/lib/libdrm

2018-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Sep  9 01:53:23 UTC 2018

Modified Files:
src/external/mit/xorg/lib/libdrm: Makefile

Log Message:
libdrm needs libpci for bus info stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/mit/xorg/lib/libdrm/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/libdrm/Makefile
diff -u src/external/mit/xorg/lib/libdrm/Makefile:1.15 src/external/mit/xorg/lib/libdrm/Makefile:1.16
--- src/external/mit/xorg/lib/libdrm/Makefile:1.15	Sat Mar  4 23:24:51 2017
+++ src/external/mit/xorg/lib/libdrm/Makefile	Sun Sep  9 01:53:23 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2017/03/04 23:24:51 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2018/09/09 01:53:23 riastradh Exp $
 
 .include 
 
@@ -23,6 +23,7 @@ COPTS.xf86drm.c+=	${${ACTIVE_CC} == "cla
 CWARNFLAGS.clang+=	-Wno-conversion -Wno-tautological-compare
 
 LIBDPLIBS=	m	${.CURDIR}/../../../../../lib/libm
+LIBDPLIBS=	pci	${.CURDIR}/../../../../../lib/libpci
 
 .if 0
 MAN=		drm.7 \



CVS commit: src/external/mit/xorg/lib/libdrm

2018-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Sep  9 01:53:23 UTC 2018

Modified Files:
src/external/mit/xorg/lib/libdrm: Makefile

Log Message:
libdrm needs libpci for bus info stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/mit/xorg/lib/libdrm/Makefile

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



CVS commit: [pgoyette-compat] src/doc

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep  8 23:39:21 UTC 2018

Modified Files:
src/doc [pgoyette-compat]: COMPAT-branch-notes

Log Message:
Add a note regarding possible future investigation of the .a vs .o
compat library mechanisms.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/COMPAT-branch-notes

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

Modified files:

Index: src/doc/COMPAT-branch-notes
diff -u src/doc/COMPAT-branch-notes:1.1.2.23 src/doc/COMPAT-branch-notes:1.1.2.24
--- src/doc/COMPAT-branch-notes:1.1.2.23	Fri Sep  7 23:32:29 2018
+++ src/doc/COMPAT-branch-notes	Sat Sep  8 23:39:21 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: COMPAT-branch-notes,v 1.1.2.23 2018/09/07 23:32:29 pgoyette Exp $ */
+/* $NetBSD: COMPAT-branch-notes,v 1.1.2.24 2018/09/08 23:39:21 pgoyette Exp $ */
 
 DONE
 
@@ -97,3 +97,7 @@ TODO - Not required for branch merge
 COMPAT module on HEAD, so lack of integration on the branch is not a
 regression.
 
+6.  Even though the build mechanism has been switched back to using a
+.a compat library, it might be useful to make it work with the .o
+library.
+



CVS commit: [pgoyette-compat] src/doc

2018-09-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep  8 23:39:21 UTC 2018

Modified Files:
src/doc [pgoyette-compat]: COMPAT-branch-notes

Log Message:
Add a note regarding possible future investigation of the .a vs .o
compat library mechanisms.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/COMPAT-branch-notes

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



CVS commit: src/usr.sbin/sysinst

2018-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep  8 20:01:19 UTC 2018

Modified Files:
src/usr.sbin/sysinst: defs.h

Log Message:
Fix editor accident in previous


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/defs.h

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

Modified files:

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.14 src/usr.sbin/sysinst/defs.h:1.15
--- src/usr.sbin/sysinst/defs.h:1.14	Thu Sep  6 07:56:40 2018
+++ src/usr.sbin/sysinst/defs.h	Sat Sep  8 20:01:19 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.14 2018/09/06 07:56:40 martin Exp $	*/
+/*	$NetBSD: defs.h,v 1.15 2018/09/08 20:01:19 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -353,7 +353,7 @@ int  clean_xfer_dir;
 #endif
 
 #if !defined(SYSINST_PKG_HOST)
-#define SYSINST_PKG_HOST		"pub/NetBSD/NetBSD-" REL
+#define SYSINST_PKG_HOST	"ftp.NetBSD.org"
 #endif
 
 #if !defined(SYSINST_PKG_DIR)



CVS commit: src/usr.sbin/sysinst

2018-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep  8 20:01:19 UTC 2018

Modified Files:
src/usr.sbin/sysinst: defs.h

Log Message:
Fix editor accident in previous


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/defs.h

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



CVS commit: src/doc

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 19:12:01 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
mention libnv


To generate a diff of this commit:
cvs rdiff -u -r1.2440 -r1.2441 src/doc/CHANGES

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



CVS commit: src/doc

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 19:12:01 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
mention libnv


To generate a diff of this commit:
cvs rdiff -u -r1.2440 -r1.2441 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2440 src/doc/CHANGES:1.2441
--- src/doc/CHANGES:1.2440	Thu Sep  6 02:46:25 2018
+++ src/doc/CHANGES	Sat Sep  8 15:12:01 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2440 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2441 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -222,3 +222,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	mpc: Updated to version 1.1.0. [mrg 20180904]
 	kernel: Remove en(4). [maxv 20180906]
 	kernel: Remove the NATM code. [maxv 20180906]
+	libnv: Imported from FreeBSD [christos 20180908]



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

2018-09-08 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Sep  8 18:24:02 UTC 2018

Modified Files:
src/tests/usr.bin/printf: t_builtin.sh

Log Message:
Make sure we're in the standard locale when testing for printf
being built in to the shell, so we don't receive an unrecognisable
(to the script) message from the shell when we ask it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/printf/t_builtin.sh

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



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

2018-09-08 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Sep  8 18:24:02 UTC 2018

Modified Files:
src/tests/usr.bin/printf: t_builtin.sh

Log Message:
Make sure we're in the standard locale when testing for printf
being built in to the shell, so we don't receive an unrecognisable
(to the script) message from the shell when we ask it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/printf/t_builtin.sh

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

Modified files:

Index: src/tests/usr.bin/printf/t_builtin.sh
diff -u src/tests/usr.bin/printf/t_builtin.sh:1.1 src/tests/usr.bin/printf/t_builtin.sh:1.2
--- src/tests/usr.bin/printf/t_builtin.sh:1.1	Wed Sep  5 21:05:40 2018
+++ src/tests/usr.bin/printf/t_builtin.sh	Sat Sep  8 18:24:01 2018
@@ -1,4 +1,4 @@
-# $NetBSD: t_builtin.sh,v 1.1 2018/09/05 21:05:40 kre Exp $
+# $NetBSD: t_builtin.sh,v 1.2 2018/09/08 18:24:01 kre Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -95,7 +95,8 @@ Not_builtin()
 
 setup()
 {
-	case "$( ${TEST_SH} -c 'type printf' 2>&1 )" in
+	case "$(unset LANG LC_ALL LC_NUMERIC LC_CTYPE LC_MESSAGES
+	${TEST_SH} -c 'type printf' 2>&1 )" in
 
 	( *[Bb]uiltin* | *[Bb]uilt[-\ ][Ii]n* )
 		# nothing here, it all happens below.



CVS commit: src/usr.sbin/sysinst/arch/sgimips

2018-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep  8 18:10:35 UTC 2018

Modified Files:
src/usr.sbin/sysinst/arch/sgimips: md.c

Log Message:
PR port-sgimips/53583: fetch kernel name always before using it.
Make the struct utsname local to avoid future similar issues.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/sgimips/md.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/sysinst/arch/sgimips/md.c
diff -u src/usr.sbin/sysinst/arch/sgimips/md.c:1.4 src/usr.sbin/sysinst/arch/sgimips/md.c:1.5
--- src/usr.sbin/sysinst/arch/sgimips/md.c:1.4	Sat Mar 17 22:27:04 2018
+++ src/usr.sbin/sysinst/arch/sgimips/md.c	Sat Sep  8 18:10:35 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.4 2018/03/17 22:27:04 jmcneill Exp $	*/
+/*	$NetBSD: md.c,v 1.5 2018/09/08 18:10:35 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -51,7 +51,6 @@
 #include "msg_defs.h"
 #include "menu_defs.h"
 
-struct utsname instsys;
 
 void
 md_init(void)
@@ -61,13 +60,15 @@ md_init(void)
 void
 md_init_set_status(int flags)
 {
+	struct utsname instsys;
+
 	(void)flags;
 
 /*
  * Get the name of the Install Kernel we are running under and
  * enable the installation of the corresponding GENERIC kernel.
  */
-uname();
+	uname();
 if (strstr(instsys.version, "(INSTALL32_IP3x"))
 set_kernel_set(SET_KERNEL_2);
 else if (strstr(instsys.version, "(INSTALL32_IP2x"))
@@ -156,7 +157,10 @@ md_pre_disklabel(void)
 int
 md_post_disklabel(void)
 {
-if (strstr(instsys.version, "(INSTALL32_IP3x"))
+	struct utsname instsys;
+	uname();
+ 
+	if (strstr(instsys.version, "(INSTALL32_IP3x"))
 		return run_program(RUN_DISPLAY,
 		"%s %s", "/usr/mdec/sgivol -f -w boot /usr/mdec/ip3xboot",
 		pm->diskdev);
@@ -194,9 +198,12 @@ md_post_extract(void)
 void
 md_cleanup_install(void)
 {
+	struct utsname instsys;
+
 #ifndef DEBUG
 	enable_rc_conf();
 #endif
+	uname();
 
 	if (strstr(instsys.version, "(GENERIC32_IP12"))
 		run_program(0, "/usr/mdec/sgivol -f -w netbsd %s %s",



CVS commit: src/usr.sbin/sysinst/arch/sgimips

2018-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep  8 18:10:35 UTC 2018

Modified Files:
src/usr.sbin/sysinst/arch/sgimips: md.c

Log Message:
PR port-sgimips/53583: fetch kernel name always before using it.
Make the struct utsname local to avoid future similar issues.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/sgimips/md.c

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



CVS commit: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:32:25 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: dnvlist.c nvlist.c nvpair.c

Log Message:
fix kernel build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/libnv/dist/dnvlist.c \
src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/nvpair.c

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



CVS commit: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:32:25 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: dnvlist.c nvlist.c nvpair.c

Log Message:
fix kernel build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/libnv/dist/dnvlist.c \
src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/dnvlist.c
diff -u src/sys/external/bsd/libnv/dist/dnvlist.c:1.3 src/sys/external/bsd/libnv/dist/dnvlist.c:1.4
--- src/sys/external/bsd/libnv/dist/dnvlist.c:1.3	Sat Sep  8 10:12:53 2018
+++ src/sys/external/bsd/libnv/dist/dnvlist.c	Sat Sep  8 10:32:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnvlist.c,v 1.3 2018/09/08 14:12:53 christos Exp $	*/
+/*	$NetBSD: dnvlist.c,v 1.4 2018/09/08 14:32:25 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -35,7 +35,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/dnvlist.c 328474 2018-01-27 12:58:21Z oshogbo $");
 #else
-__RCSID("$NetBSD: dnvlist.c,v 1.3 2018/09/08 14:12:53 christos Exp $");
+__RCSID("$NetBSD: dnvlist.c,v 1.4 2018/09/08 14:32:25 christos Exp $");
 #endif
 
 #if defined(_KERNEL) || defined(_STANDALONE)
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: dnvlist.c,v 1.3 2018/0
 #include 
 #include 
 
-#ifndef __FreeBSD__
+#ifdef __FreeBSD__
 #include 
 #endif
 
Index: src/sys/external/bsd/libnv/dist/nvlist.c
diff -u src/sys/external/bsd/libnv/dist/nvlist.c:1.3 src/sys/external/bsd/libnv/dist/nvlist.c:1.4
--- src/sys/external/bsd/libnv/dist/nvlist.c:1.3	Sat Sep  8 10:12:53 2018
+++ src/sys/external/bsd/libnv/dist/nvlist.c	Sat Sep  8 10:32:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvlist.c,v 1.3 2018/09/08 14:12:53 christos Exp $	*/
+/*	$NetBSD: nvlist.c,v 1.4 2018/09/08 14:32:25 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvlist.c 335347 2018-06-18 22:57:32Z oshogbo $");
 #else
-__RCSID("$NetBSD: nvlist.c,v 1.3 2018/09/08 14:12:53 christos Exp $");
+__RCSID("$NetBSD: nvlist.c,v 1.4 2018/09/08 14:32:25 christos Exp $");
 #endif
 
 #include 
@@ -1508,7 +1508,6 @@ nvlist_add_stringf(nvlist_t *nvl, const 
 	nvlist_add_stringv(nvl, name, valuefmt, valueap);
 	va_end(valueap);
 }
-#endif
 
 void
 nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt,
@@ -1529,6 +1528,7 @@ nvlist_add_stringv(nvlist_t *nvl, const 
 		(void)nvlist_move_nvpair(nvl, nvp);
 	}
 }
+#endif
 
 void
 nvlist_add_null(nvlist_t *nvl, const char *name)

Index: src/sys/external/bsd/libnv/dist/nvpair.c
diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.2 src/sys/external/bsd/libnv/dist/nvpair.c:1.3
--- src/sys/external/bsd/libnv/dist/nvpair.c:1.2	Sat Sep  8 10:02:15 2018
+++ src/sys/external/bsd/libnv/dist/nvpair.c	Sat Sep  8 10:32:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvpair.c,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+/*	$NetBSD: nvpair.c,v 1.3 2018/09/08 14:32:25 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
 #else
-__RCSID("$NetBSD: nvpair.c,v 1.2 2018/09/08 14:02:15 christos Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.3 2018/09/08 14:32:25 christos Exp $");
 #endif
 
 #include 
@@ -1191,6 +1191,7 @@ nvpair_name(const nvpair_t *nvp)
 	return (nvp->nvp_name);
 }
 
+#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(__NetBSD__)
 nvpair_t *
 nvpair_create_stringf(const char *name, const char *valuefmt, ...)
 {
@@ -1219,6 +1220,7 @@ nvpair_create_stringv(const char *name, 
 		nv_free(str);
 	return (nvp);
 }
+#endif
 
 nvpair_t *
 nvpair_create_null(const char *name)



CVS commit: src/sys/external/bsd/libnv/conf

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:13:09 UTC 2018

Added Files:
src/sys/external/bsd/libnv/conf: files.libnv

Log Message:
Add config glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/libnv/conf/files.libnv

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



CVS commit: src/sys/external/bsd/libnv/conf

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:13:09 UTC 2018

Added Files:
src/sys/external/bsd/libnv/conf: files.libnv

Log Message:
Add config glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/libnv/conf/files.libnv

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

Added files:

Index: src/sys/external/bsd/libnv/conf/files.libnv
diff -u /dev/null src/sys/external/bsd/libnv/conf/files.libnv:1.1
--- /dev/null	Sat Sep  8 10:13:09 2018
+++ src/sys/external/bsd/libnv/conf/files.libnv	Sat Sep  8 10:13:09 2018
@@ -0,0 +1,13 @@
+# $NetBSD: files.libnv,v 1.1 2018/09/08 14:13:09 christos Exp $
+
+define		libnv
+makeoptions	libnv	CPPFLAGS+="-I$S/external/bsd/libnv/dist"
+
+prefix	external/bsd/libnv/dist
+
+file	dnvlist.c			libnv
+file	nvlist.c			libnv
+file	nvpair.c			libnv
+file	nv_kern_netbsd.c		libnv
+
+prefix



CVS commit: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:12:53 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: dnvlist.c nv_impl.h nv_kern_netbsd.c
nvlist.c

Log Message:
FIx userland build


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/dnvlist.c \
src/sys/external/bsd/libnv/dist/nv_impl.h \
src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/libnv/dist/nv_kern_netbsd.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/external/bsd/libnv/dist/dnvlist.c
diff -u src/sys/external/bsd/libnv/dist/dnvlist.c:1.2 src/sys/external/bsd/libnv/dist/dnvlist.c:1.3
--- src/sys/external/bsd/libnv/dist/dnvlist.c:1.2	Sat Sep  8 10:02:15 2018
+++ src/sys/external/bsd/libnv/dist/dnvlist.c	Sat Sep  8 10:12:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnvlist.c,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+/*	$NetBSD: dnvlist.c,v 1.3 2018/09/08 14:12:53 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -35,7 +35,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/dnvlist.c 328474 2018-01-27 12:58:21Z oshogbo $");
 #else
-__RCSID("$NetBSD: dnvlist.c,v 1.2 2018/09/08 14:02:15 christos Exp $");
+__RCSID("$NetBSD: dnvlist.c,v 1.3 2018/09/08 14:12:53 christos Exp $");
 #endif
 
 #if defined(_KERNEL) || defined(_STANDALONE)
@@ -57,7 +57,7 @@ __RCSID("$NetBSD: dnvlist.c,v 1.2 2018/0
 #include 
 #endif
 
-#ifndef __FreeBSD__
+#ifdef __FreeBSD__
 #include 
 #include 
 #else
Index: src/sys/external/bsd/libnv/dist/nv_impl.h
diff -u src/sys/external/bsd/libnv/dist/nv_impl.h:1.2 src/sys/external/bsd/libnv/dist/nv_impl.h:1.3
--- src/sys/external/bsd/libnv/dist/nv_impl.h:1.2	Sat Sep  8 10:02:15 2018
+++ src/sys/external/bsd/libnv/dist/nv_impl.h	Sat Sep  8 10:12:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nv_impl.h,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+/*	$NetBSD: nv_impl.h,v 1.3 2018/09/08 14:12:53 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -56,58 +56,58 @@ typedef struct nvpair nvpair_t;
 #define	NV_FLAG_IN_ARRAY		0x100
 
 #if defined(_KERNEL)
-#define	nv_malloc(size)			malloc((size), M_NVLIST, M_WAITOK)
-#ifdef __FreeBSD__
-#define	nv_calloc(n, size)		mallocarray((n), (size), M_NVLIST, \
+# define nv_malloc(size)		malloc((size), M_NVLIST, M_WAITOK)
+# ifdef __FreeBSD__
+#  define nv_calloc(n, size)		mallocarray((n), (size), M_NVLIST, \
 	M_WAITOK | M_ZERO)
-#else
+# else
 extern void *nv_calloc(size_t, size_t);
-#endif
-#define	nv_realloc(buf, size)		realloc((buf), (size), M_NVLIST, \
+# endif
+# define nv_realloc(buf, size)		realloc((buf), (size), M_NVLIST, \
 	M_WAITOK)
-#define	nv_free(buf)			free((buf), M_NVLIST)
-#ifdef __FreeBSD__
-#define	nv_strdup(buf)			strdup((buf), M_NVLIST)
-#else
+# define nv_free(buf)			free((buf), M_NVLIST)
+# ifdef __FreeBSD__
+#  define nv_strdup(buf)		strdup((buf), M_NVLIST)
+# else
 extern char *nv_strdup(const char *);
-#endif
-#define	nv_vasprintf(ptr, ...)		vasprintf(ptr, M_NVLIST, __VA_ARGS__)
-#endif
+# endif
+# define nv_vasprintf(ptr, ...)		vasprintf(ptr, M_NVLIST, __VA_ARGS__)
 #elif defined(_STANDALONE)
 extern void *nv_malloc(size_t);
 extern void *nv_calloc(size_t, size_t);
 extern void *nv_realloc(void *, size_t);
 extern void nv_free(void *);
 extern char *nv_strdup(const char *);
-#define	nv_vasprintf(ptr, ...)		vasprintf(ptr, M_NVLIST, __VA_ARGS__)
-#else
+# define nv_vasprintf(ptr, ...)		vasprintf(ptr, M_NVLIST, __VA_ARGS__)
+#else /* USERLAND */
 
-#define	nv_malloc(size)			malloc((size))
-#define	nv_calloc(n, size)		calloc((n), (size))
-#define	nv_realloc(buf, size)		realloc((buf), (size))
-#define	nv_free(buf)			free((buf))
-#define	nv_strdup(buf)			strdup((buf))
-#define	nv_vasprintf(ptr, ...)		vasprintf(ptr, __VA_ARGS__)
-
-#define	ERRNO_SET(var)			do { errno = (var); } while (0)
-#define	ERRNO_SAVE()			do {\
+# define nv_malloc(size)		malloc((size))
+# define nv_calloc(n, size)		calloc(n, size)
+# define nv_realloc(buf, size)		realloc((buf), (size))
+# define nv_free(buf)			free((buf))
+# define nv_strdup(buf)			strdup(buf)
+# define nv_vasprintf(ptr, ...)		vasprintf(ptr, __VA_ARGS__)
+
+# define ERRNO_SET(var)			do {\
+		errno = (var); 		\
+	} while (/*CONSTCOND*/0)
+# define ERRNO_SAVE()			do {\
 		int _serrno;		\
-	\
 		_serrno = errno
 
-#define	ERRNO_RESTORE()errno = _serrno;	\
-	} while (0)
+# define ERRNO_RESTORE()			errno = _serrno;	\
+	} while (/*CONSTCOND*/0)
 
-#define	ERRNO_OR_DEFAULT(default)	(errno == 0 ? (default) : errno)
+# define ERRNO_OR_DEFAULT(default)	(errno == 0 ? (default) : errno)
 
 #endif
 
 #ifndef ERRNO_SET
-#define	ERRNO_SET(var)			do { } while (/*CONSTCOND*/0)
-#define	ERRNO_SAVE()			do { do { } while(/*CONSTCOND*/0)
-#define	ERRNO_RESTORE()			} while (/*CONSTCOND*/0)
-
-#define	

CVS commit: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:12:53 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: dnvlist.c nv_impl.h nv_kern_netbsd.c
nvlist.c

Log Message:
FIx userland build


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/dnvlist.c \
src/sys/external/bsd/libnv/dist/nv_impl.h \
src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/libnv/dist/nv_kern_netbsd.c

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



CVS commit: src/sys/conf

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:12:04 UTC 2018

Modified Files:
src/sys/conf: files

Log Message:
Add libnv


To generate a diff of this commit:
cvs rdiff -u -r1.1206 -r1.1207 src/sys/conf/files

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



CVS commit: src/sys/conf

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:12:04 UTC 2018

Modified Files:
src/sys/conf: files

Log Message:
Add libnv


To generate a diff of this commit:
cvs rdiff -u -r1.1206 -r1.1207 src/sys/conf/files

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1206 src/sys/conf/files:1.1207
--- src/sys/conf/files:1.1206	Thu Sep  6 02:42:00 2018
+++ src/sys/conf/files	Sat Sep  8 10:12:04 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1206 2018/09/06 06:42:00 maxv Exp $
+#	$NetBSD: files,v 1.1207 2018/09/08 14:12:04 christos Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -1628,3 +1628,8 @@ include "dev/clk/files.clk"
 #
 include "dev/ofw/files.ofw"
 include "dev/fdt/files.fdt"
+
+#
+# Name value library
+#
+include "external/bsd/libnv/conf/files.libnv"



CVS commit: src/lib

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:11:41 UTC 2018

Modified Files:
src/lib: Makefile

Log Message:
Add libnv


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/lib/Makefile

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

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.260 src/lib/Makefile:1.261
--- src/lib/Makefile:1.260	Sun Aug 12 09:01:55 2018
+++ src/lib/Makefile	Sat Sep  8 10:11:41 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.260 2018/08/12 13:01:55 christos Exp $
+#	$NetBSD: Makefile,v 1.261 2018/09/08 14:11:41 christos Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -67,6 +67,8 @@ SUBDIR+=	../external/bsd/sljit/lib
 SUBDIR+=	libbpfjit
 .endif
 
+SUBDIR+=	../external/bsd/libnv/lib
+
 .if (${MKZFS} != "no")
 SUBDIR+=../external/cddl/osnet/lib/libavl
 SUBDIR+=../external/cddl/osnet/lib/libnvpair
@@ -130,7 +132,7 @@ SUBDIR+=	librumpuser	# depends on libpth
 .endif
 
 .if (${MKNPF} != "no")
-SUBDIR+=	libnpf		# depends on libprop
+SUBDIR+=	libnpf		# depends on libnv
 .endif
 
 SUBDIR+=	../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt



CVS commit: src/lib

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:11:41 UTC 2018

Modified Files:
src/lib: Makefile

Log Message:
Add libnv


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/lib/Makefile

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



CVS commit: src/external/bsd

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:11:11 UTC 2018

Modified Files:
src/external/bsd: Makefile
Added Files:
src/external/bsd/libnv: Makefile Makefile.inc
src/external/bsd/libnv/lib: Makefile

Log Message:
add libnv build glue


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/external/bsd/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libnv/Makefile \
src/external/bsd/libnv/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libnv/lib/Makefile

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

Modified files:

Index: src/external/bsd/Makefile
diff -u src/external/bsd/Makefile:1.60 src/external/bsd/Makefile:1.61
--- src/external/bsd/Makefile:1.60	Sun Aug 12 09:02:42 2018
+++ src/external/bsd/Makefile	Sat Sep  8 10:11:10 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.60 2018/08/12 13:02:42 christos Exp $
+#	$NetBSD: Makefile,v 1.61 2018/09/08 14:11:10 christos Exp $
 
 .include 
 
@@ -44,6 +44,6 @@ SUBDIR+= librtld_db
 SUBDIR+= unbound
 .endif
 
-SUBDIR+= blacklist pdisk nvi ppp smbfs
+SUBDIR+= blacklist pdisk nvi ppp smbfs libnv
 
 .include 

Added files:

Index: src/external/bsd/libnv/Makefile
diff -u /dev/null src/external/bsd/libnv/Makefile:1.1
--- /dev/null	Sat Sep  8 10:11:11 2018
+++ src/external/bsd/libnv/Makefile	Sat Sep  8 10:11:10 2018
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2018/09/08 14:11:10 christos Exp $
+
+SUBDIR=	lib
+
+.include 
Index: src/external/bsd/libnv/Makefile.inc
diff -u /dev/null src/external/bsd/libnv/Makefile.inc:1.1
--- /dev/null	Sat Sep  8 10:11:11 2018
+++ src/external/bsd/libnv/Makefile.inc	Sat Sep  8 10:11:10 2018
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile.inc,v 1.1 2018/09/08 14:11:10 christos Exp $
+
+.include 
+
+LIBNV_DIR=	${NETBSDSRCDIR}/sys/external/bsd/libnv
+LIBNV_DIST=	${LIBNV_DIR}/dist
+
+#CPPFLAGS+=	-DWITH_MSGIO
+CPPFLAGS+=	-D_VA_LIST_DEFINED -D__FBSDID\(x\)=
+CPPFLAGS+=	-I${LIBNV_DIST}
+
+.PATH:		${LIBNV_DIST}

Index: src/external/bsd/libnv/lib/Makefile
diff -u /dev/null src/external/bsd/libnv/lib/Makefile:1.1
--- /dev/null	Sat Sep  8 10:11:11 2018
+++ src/external/bsd/libnv/lib/Makefile	Sat Sep  8 10:11:11 2018
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2018/09/08 14:11:11 christos Exp $
+
+LIBISPRIVATE=	yes
+LIB=		nv
+#USE_SHLIBDIR=	yes
+#SHLIB_MAJOR=	1
+#SHLIB_MINOR=	0
+
+WARNS?=		5
+
+.include 
+
+#INCS=		nv.h dnv.h
+#INCSDIR=	/usr/include
+#MAN=		nv.3
+
+SRCS=		dnvlist.c msgio.c nvlist.c nvpair.c nv_kern_netbsd.c
+
+.include 



CVS commit: src/external/bsd

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:11:11 UTC 2018

Modified Files:
src/external/bsd: Makefile
Added Files:
src/external/bsd/libnv: Makefile Makefile.inc
src/external/bsd/libnv/lib: Makefile

Log Message:
add libnv build glue


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/external/bsd/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libnv/Makefile \
src/external/bsd/libnv/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libnv/lib/Makefile

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



CVS commit: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:02:15 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: cnv.9 cnv.h cnvlist.c common_impl.h
dnv.9 dnv.h dnvlist.c msgio.c msgio.h nv.9 nv.h nv_impl.h nvlist.c
nvlist_impl.h nvpair.c nvpair_impl.h
Added Files:
src/sys/external/bsd/libnv/dist: nv_compat.h nv_kern_netbsd.c

Log Message:
Add NetBSD stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/libnv/dist/cnv.9 \
src/sys/external/bsd/libnv/dist/cnv.h \
src/sys/external/bsd/libnv/dist/cnvlist.c \
src/sys/external/bsd/libnv/dist/common_impl.h \
src/sys/external/bsd/libnv/dist/dnv.9 \
src/sys/external/bsd/libnv/dist/dnv.h \
src/sys/external/bsd/libnv/dist/dnvlist.c \
src/sys/external/bsd/libnv/dist/msgio.c \
src/sys/external/bsd/libnv/dist/msgio.h \
src/sys/external/bsd/libnv/dist/nv.9 src/sys/external/bsd/libnv/dist/nv.h \
src/sys/external/bsd/libnv/dist/nv_impl.h \
src/sys/external/bsd/libnv/dist/nvlist.c \
src/sys/external/bsd/libnv/dist/nvlist_impl.h \
src/sys/external/bsd/libnv/dist/nvpair.c \
src/sys/external/bsd/libnv/dist/nvpair_impl.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/libnv/dist/nv_compat.h \
src/sys/external/bsd/libnv/dist/nv_kern_netbsd.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/external/bsd/libnv/dist/cnv.9
diff -u src/sys/external/bsd/libnv/dist/cnv.9:1.1.1.1 src/sys/external/bsd/libnv/dist/cnv.9:1.2
--- src/sys/external/bsd/libnv/dist/cnv.9:1.1.1.1	Sat Sep  8 09:27:48 2018
+++ src/sys/external/bsd/libnv/dist/cnv.9	Sat Sep  8 10:02:15 2018
@@ -1,3 +1,4 @@
+.\"	$NetBSD: cnv.9,v 1.2 2018/09/08 14:02:15 christos Exp $
 .\"
 .\" Copyright (c) 2016 Adam Starak 
 .\" All rights reserved.
Index: src/sys/external/bsd/libnv/dist/cnv.h
diff -u src/sys/external/bsd/libnv/dist/cnv.h:1.1.1.1 src/sys/external/bsd/libnv/dist/cnv.h:1.2
--- src/sys/external/bsd/libnv/dist/cnv.h:1.1.1.1	Sat Sep  8 09:27:48 2018
+++ src/sys/external/bsd/libnv/dist/cnv.h	Sat Sep  8 10:02:15 2018
@@ -1,3 +1,5 @@
+/*	$NetBSD: cnv.h,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
@@ -33,7 +35,7 @@
 
 #include 
 
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_STANDALONE)
 #include 
 #include 
 #include 
@@ -70,7 +72,7 @@ const bool		*cnvlist_get_bool_array(cons
 const uint64_t		*cnvlist_get_number_array(const void *cookie, size_t *nitemsp);
 const char * const	*cnvlist_get_string_array(const void *cookie, size_t *nitemsp);
 const nvlist_t * const	*cnvlist_get_nvlist_array(const void *cookie, size_t *nitemsp);
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_STANDALONE)
 int			 cnvlist_get_descriptor(const void *cookie);
 const int		*cnvlist_get_descriptor_array(const void *cookie, size_t *nitemsp);
 #endif
@@ -91,7 +93,7 @@ bool			 *cnvlist_take_bool_array(void *c
 uint64_t		 *cnvlist_take_number_array(void *cookie, size_t *nitemsp);
 char			**cnvlist_take_string_array(void *cookie, size_t *nitemsp);
 nvlist_t		**cnvlist_take_nvlist_array(void *cookie, size_t *nitemsp);
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_STANDALONE)
 int			  cnvlist_take_descriptor(void *cookie);
 int			 *cnvlist_take_descriptor_array(void *cookie, size_t *nitemsp);
 #endif
@@ -110,7 +112,7 @@ void	cnvlist_free_bool_array(void *cooki
 void	cnvlist_free_number_array(void *cookie);
 void	cnvlist_free_string_array(void *cookie);
 void	cnvlist_free_nvlist_array(void *cookie);
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_STANDALONE)
 void	cnvlist_free_descriptor(void *cookie);
 void	cnvlist_free_descriptor_array(void *cookie);
 #endif
Index: src/sys/external/bsd/libnv/dist/cnvlist.c
diff -u src/sys/external/bsd/libnv/dist/cnvlist.c:1.1.1.1 src/sys/external/bsd/libnv/dist/cnvlist.c:1.2
--- src/sys/external/bsd/libnv/dist/cnvlist.c:1.1.1.1	Sat Sep  8 09:27:47 2018
+++ src/sys/external/bsd/libnv/dist/cnvlist.c	Sat Sep  8 10:02:15 2018
@@ -1,3 +1,5 @@
+/*	$NetBSD: cnvlist.c,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
@@ -29,9 +31,13 @@
  */
 
 #include 
+#ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/cnvlist.c 335343 2018-06-18 21:26:58Z oshogbo $");
+#else
+__RCSID("$NetBSD: cnvlist.c,v 1.2 2018/09/08 14:02:15 christos Exp $");
+#endif
 
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
 
 #include 
 #include 
@@ -39,7 +45,9 @@ __FBSDID("$FreeBSD: head/sys/contrib/lib
 #include 
 #include 
 
+#ifdef __FreeBSD__
 #include 
+#endif
 
 #else
 #include 
@@ -48,8 +56,13 @@ __FBSDID("$FreeBSD: head/sys/contrib/lib
 #include 
 #endif
 
-#include 
+#ifdef __FreeBSD__
 #include 
+#include 
+#else
+#include "nv.h"
+#include "cnv.h"
+#endif
 
 #include "nv_impl.h"
 #include "nvlist_impl.h"
@@ -85,7 +98,7 @@ CNVLIST_GET(bool, 

CVS commit: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 14:02:15 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: cnv.9 cnv.h cnvlist.c common_impl.h
dnv.9 dnv.h dnvlist.c msgio.c msgio.h nv.9 nv.h nv_impl.h nvlist.c
nvlist_impl.h nvpair.c nvpair_impl.h
Added Files:
src/sys/external/bsd/libnv/dist: nv_compat.h nv_kern_netbsd.c

Log Message:
Add NetBSD stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/libnv/dist/cnv.9 \
src/sys/external/bsd/libnv/dist/cnv.h \
src/sys/external/bsd/libnv/dist/cnvlist.c \
src/sys/external/bsd/libnv/dist/common_impl.h \
src/sys/external/bsd/libnv/dist/dnv.9 \
src/sys/external/bsd/libnv/dist/dnv.h \
src/sys/external/bsd/libnv/dist/dnvlist.c \
src/sys/external/bsd/libnv/dist/msgio.c \
src/sys/external/bsd/libnv/dist/msgio.h \
src/sys/external/bsd/libnv/dist/nv.9 src/sys/external/bsd/libnv/dist/nv.h \
src/sys/external/bsd/libnv/dist/nv_impl.h \
src/sys/external/bsd/libnv/dist/nvlist.c \
src/sys/external/bsd/libnv/dist/nvlist_impl.h \
src/sys/external/bsd/libnv/dist/nvpair.c \
src/sys/external/bsd/libnv/dist/nvpair_impl.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/libnv/dist/nv_compat.h \
src/sys/external/bsd/libnv/dist/nv_kern_netbsd.c

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



CVS import: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 13:27:48 UTC 2018

Update of /cvsroot/src/sys/external/bsd/libnv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16481

Log Message:
Import libnv from FreeBSD

Status:

Vendor Tag: FREEBSD
Release Tags:   libnv-20180908

N src/sys/external/bsd/libnv/dist/cnvlist.c
N src/sys/external/bsd/libnv/dist/dnvlist.c
N src/sys/external/bsd/libnv/dist/nv_impl.h
N src/sys/external/bsd/libnv/dist/nvlist.c
N src/sys/external/bsd/libnv/dist/nvlist_impl.h
N src/sys/external/bsd/libnv/dist/nvpair.c
N src/sys/external/bsd/libnv/dist/nvpair_impl.h
N src/sys/external/bsd/libnv/dist/common_impl.h
N src/sys/external/bsd/libnv/dist/msgio.c
N src/sys/external/bsd/libnv/dist/msgio.h
N src/sys/external/bsd/libnv/dist/nv.h
N src/sys/external/bsd/libnv/dist/dnv.h
N src/sys/external/bsd/libnv/dist/cnv.h
N src/sys/external/bsd/libnv/dist/cnv.9
N src/sys/external/bsd/libnv/dist/dnv.9
N src/sys/external/bsd/libnv/dist/nv.9

No conflicts created by this import



CVS import: src/sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 13:27:48 UTC 2018

Update of /cvsroot/src/sys/external/bsd/libnv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16481

Log Message:
Import libnv from FreeBSD

Status:

Vendor Tag: FREEBSD
Release Tags:   libnv-20180908

N src/sys/external/bsd/libnv/dist/cnvlist.c
N src/sys/external/bsd/libnv/dist/dnvlist.c
N src/sys/external/bsd/libnv/dist/nv_impl.h
N src/sys/external/bsd/libnv/dist/nvlist.c
N src/sys/external/bsd/libnv/dist/nvlist_impl.h
N src/sys/external/bsd/libnv/dist/nvpair.c
N src/sys/external/bsd/libnv/dist/nvpair_impl.h
N src/sys/external/bsd/libnv/dist/common_impl.h
N src/sys/external/bsd/libnv/dist/msgio.c
N src/sys/external/bsd/libnv/dist/msgio.h
N src/sys/external/bsd/libnv/dist/nv.h
N src/sys/external/bsd/libnv/dist/dnv.h
N src/sys/external/bsd/libnv/dist/cnv.h
N src/sys/external/bsd/libnv/dist/cnv.9
N src/sys/external/bsd/libnv/dist/dnv.9
N src/sys/external/bsd/libnv/dist/nv.9

No conflicts created by this import



CVS commit: src/doc

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 13:26:12 UTC 2018

Modified Files:
src/doc: 3RDPARTY

Log Message:
Add libnv info.


To generate a diff of this commit:
cvs rdiff -u -r1.1563 -r1.1564 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.1563 src/doc/3RDPARTY:1.1564
--- src/doc/3RDPARTY:1.1563	Sat Sep  8 05:02:50 2018
+++ src/doc/3RDPARTY	Sat Sep  8 09:26:12 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1563 2018/09/08 09:02:50 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1564 2018/09/08 13:26:12 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -2051,3 +2051,20 @@ Responsible:	
 Location:	sys/dev/microcode/zyd
 Notes:
 
+Package:	libnv
+Version:	20180906
+Current Vers:	$(date)
+Maintainer:	christos
+Archive Site:
+Home Page:
+Mailing List:
+License:	BSD-like (2-clause)
+Responsible:	
+Location:	sys/external/bsd/libnv/dist
+Notes:
+To be used only for npf (library and headers are private)
+Copied from FreeBSD:
+/usr/src/sys/sys/{d,c,}nv.h
+/usr/src/lib/libnv/
+/usr/src/contrib/lib/libnv/
+/usr/src/share/man/man9/{d,c,}nv.9



CVS commit: src/doc

2018-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep  8 13:26:12 UTC 2018

Modified Files:
src/doc: 3RDPARTY

Log Message:
Add libnv info.


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

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



CVS import: sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:sys
Committed By:   christos
Date:   Sat Sep  8 13:22:52 UTC 2018

Update of /cvsroot/sys/external/bsd/libnv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv26049

Log Message:
Import libnv from FreeBSD; approved by core@

Status:

Vendor Tag: FREEBSD
Release Tags:   libnv-20180908

N sys/external/bsd/libnv/dist/cnvlist.c
N sys/external/bsd/libnv/dist/dnvlist.c
N sys/external/bsd/libnv/dist/nv_impl.h
N sys/external/bsd/libnv/dist/nvlist.c
N sys/external/bsd/libnv/dist/nvlist_impl.h
N sys/external/bsd/libnv/dist/nvpair.c
N sys/external/bsd/libnv/dist/nvpair_impl.h
N sys/external/bsd/libnv/dist/common_impl.h
N sys/external/bsd/libnv/dist/msgio.c
N sys/external/bsd/libnv/dist/msgio.h
N sys/external/bsd/libnv/dist/nv.h
N sys/external/bsd/libnv/dist/dnv.h
N sys/external/bsd/libnv/dist/cnv.h
N sys/external/bsd/libnv/dist/cnv.9
N sys/external/bsd/libnv/dist/dnv.9
N sys/external/bsd/libnv/dist/nv.9

No conflicts created by this import



CVS import: sys/external/bsd/libnv/dist

2018-09-08 Thread Christos Zoulas
Module Name:sys
Committed By:   christos
Date:   Sat Sep  8 13:22:52 UTC 2018

Update of /cvsroot/sys/external/bsd/libnv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv26049

Log Message:
Import libnv from FreeBSD; approved by core@

Status:

Vendor Tag: FREEBSD
Release Tags:   libnv-20180908

N sys/external/bsd/libnv/dist/cnvlist.c
N sys/external/bsd/libnv/dist/dnvlist.c
N sys/external/bsd/libnv/dist/nv_impl.h
N sys/external/bsd/libnv/dist/nvlist.c
N sys/external/bsd/libnv/dist/nvlist_impl.h
N sys/external/bsd/libnv/dist/nvpair.c
N sys/external/bsd/libnv/dist/nvpair_impl.h
N sys/external/bsd/libnv/dist/common_impl.h
N sys/external/bsd/libnv/dist/msgio.c
N sys/external/bsd/libnv/dist/msgio.h
N sys/external/bsd/libnv/dist/nv.h
N sys/external/bsd/libnv/dist/dnv.h
N sys/external/bsd/libnv/dist/cnv.h
N sys/external/bsd/libnv/dist/cnv.9
N sys/external/bsd/libnv/dist/dnv.9
N sys/external/bsd/libnv/dist/nv.9

No conflicts created by this import



CVS commit: src/sys/dev/usb

2018-09-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Sep  8 13:10:08 UTC 2018

Modified Files:
src/sys/dev/usb: if_smsc.c if_smscvar.h

Log Message:
Make smsc(4) MPSAFE. Patch from skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/usb/if_smsc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_smscvar.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/if_smsc.c
diff -u src/sys/dev/usb/if_smsc.c:1.37 src/sys/dev/usb/if_smsc.c:1.38
--- src/sys/dev/usb/if_smsc.c:1.37	Sun Aug 12 06:02:38 2018
+++ src/sys/dev/usb/if_smsc.c	Sat Sep  8 13:10:08 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_smsc.c,v 1.37 2018/08/12 06:02:38 rin Exp $	*/
+/*	$NetBSD: if_smsc.c,v 1.38 2018/09/08 13:10:08 mlelstv Exp $	*/
 
 /*	$OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.37 2018/08/12 06:02:38 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.38 2018/09/08 13:10:08 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -70,17 +70,15 @@ __KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 
 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 #include 
 #include 
-#include 
 #include 
-#include 
-
-#include 
-
 #include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -164,9 +162,12 @@ int		 smsc_detach(device_t, int);
 int		 smsc_activate(device_t, enum devact);
 
 int		 smsc_init(struct ifnet *);
+int		 smsc_init_locked(struct ifnet *);
 void		 smsc_start(struct ifnet *);
+void		 smsc_start_locked(struct ifnet *);
 int		 smsc_ioctl(struct ifnet *, u_long, void *);
 void		 smsc_stop(struct ifnet *, int);
+void		 smsc_stop_locked(struct ifnet *, int);
 
 void		 smsc_reset(struct smsc_softc *);
 struct mbuf	*smsc_newbuf(void);
@@ -174,6 +175,7 @@ struct mbuf	*smsc_newbuf(void);
 void		 smsc_tick(void *);
 void		 smsc_tick_task(void *);
 void		 smsc_miibus_statchg(struct ifnet *);
+void		 smsc_miibus_statchg_locked(struct ifnet *);
 int		 smsc_miibus_readreg(device_t, int, int);
 void		 smsc_miibus_writereg(device_t, int, int, int);
 int		 smsc_ifmedia_upd(struct ifnet *);
@@ -182,7 +184,9 @@ void		 smsc_lock_mii(struct smsc_softc *
 void		 smsc_unlock_mii(struct smsc_softc *);
 
 int		 smsc_tx_list_init(struct smsc_softc *);
+void		 smsc_tx_list_free(struct smsc_softc *);
 int		 smsc_rx_list_init(struct smsc_softc *);
+void		 smsc_rx_list_free(struct smsc_softc *);
 int		 smsc_encap(struct smsc_softc *, struct mbuf *, int);
 void		 smsc_rxeof(struct usbd_xfer *, void *, usbd_status);
 void		 smsc_txeof(struct usbd_xfer *, void *, usbd_status);
@@ -259,7 +263,7 @@ smsc_wait_for_bits(struct smsc_softc *sc
 int
 smsc_miibus_readreg(device_t dev, int phy, int reg)
 {
-	struct smsc_softc *sc = device_private(dev);
+	struct smsc_softc * const sc = device_private(dev);
 	uint32_t addr;
 	uint32_t val = 0;
 
@@ -286,7 +290,7 @@ done:
 void
 smsc_miibus_writereg(device_t dev, int phy, int reg, int val)
 {
-	struct smsc_softc *sc = device_private(dev);
+	struct smsc_softc * const sc = device_private(dev);
 	uint32_t addr;
 
 	if (sc->sc_phyno != phy)
@@ -312,15 +316,37 @@ smsc_miibus_writereg(device_t dev, int p
 void
 smsc_miibus_statchg(struct ifnet *ifp)
 {
-	struct smsc_softc *sc = ifp->if_softc;
-	struct mii_data *mii = >sc_mii;
+	if (ifp == NULL)
+		return;
+
+	struct smsc_softc * const sc = ifp->if_softc;
+
+	mutex_enter(>sc_lock);
+	if (sc->sc_dying) {
+		mutex_exit(>sc_lock);
+		return;
+	}
+	smsc_miibus_statchg_locked(ifp);
+
+	mutex_exit(>sc_lock);
+}
+
+
+void
+smsc_miibus_statchg_locked(struct ifnet *ifp)
+{
+	struct smsc_softc * const sc = ifp->if_softc;
+	struct mii_data * const mii = >sc_mii;
 	int err;
 	uint32_t flow;
 	uint32_t afc_cfg;
 
-	if (mii == NULL || ifp == NULL ||
-	(ifp->if_flags & IFF_RUNNING) == 0)
+	KASSERT(mutex_owned(>sc_lock));
+
+	if ((ifp->if_flags & IFF_RUNNING) == 0) {
+		smsc_dbg_printf(sc, "%s: not running\n", __func__);
 		return;
+	}
 
 	/* Use the MII status to determine link status */
 	sc->sc_flags &= ~SMSC_FLAG_LINK;
@@ -386,8 +412,8 @@ smsc_miibus_statchg(struct ifnet *ifp)
 int
 smsc_ifmedia_upd(struct ifnet *ifp)
 {
-	struct smsc_softc *sc = ifp->if_softc;
-	struct mii_data *mii = >sc_mii;
+	struct smsc_softc * const sc = ifp->if_softc;
+	struct mii_data * const mii = >sc_mii;
 	int err;
 
 	if (mii->mii_instance) {
@@ -403,13 +429,17 @@ smsc_ifmedia_upd(struct ifnet *ifp)
 void
 smsc_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
 {
-	struct smsc_softc *sc = ifp->if_softc;
-	struct mii_data *mii = >sc_mii;
+	struct smsc_softc * const sc = ifp->if_softc;
+	struct mii_data * const mii = >sc_mii;
+
+	/* SMSC_LOCK */
 
 	mii_pollstat(mii);
 
 	ifmr->ifm_active = mii->mii_media_active;
 	ifmr->ifm_status = mii->mii_media_status;
+
+	/* 

CVS commit: src/sys/dev/usb

2018-09-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Sep  8 13:10:08 UTC 2018

Modified Files:
src/sys/dev/usb: if_smsc.c if_smscvar.h

Log Message:
Make smsc(4) MPSAFE. Patch from skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/usb/if_smsc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_smscvar.h

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



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

2018-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Sep  8 12:40:17 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: db_disasm.c

Log Message:
Work around dumb KASSERT in vtopte(), the PTE area can now be above the
MAIN area. I guess the KASSERT should be removed because it doesn't make
a lot of sense.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/amd64/db_disasm.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/db_disasm.c
diff -u src/sys/arch/amd64/amd64/db_disasm.c:1.24 src/sys/arch/amd64/amd64/db_disasm.c:1.25
--- src/sys/arch/amd64/amd64/db_disasm.c:1.24	Sun Jan 21 16:51:14 2018
+++ src/sys/arch/amd64/amd64/db_disasm.c	Sat Sep  8 12:40:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.24 2018/01/21 16:51:14 christos Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.25 2018/09/08 12:40:17 maxv Exp $	*/
 
 /* 
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.24 2018/01/21 16:51:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.25 2018/09/08 12:40:17 maxv Exp $");
 
 #ifndef _KERNEL
 #include 
@@ -1207,7 +1207,11 @@ db_disasm(db_addr_t loc, bool altfmt)
 		pte = kvtopte((vaddr_t)loc);
 	else
 		pte = vtopte((vaddr_t)loc);
-	pde = vtopte((vaddr_t)pte);
+	if ((vaddr_t)pte >= VM_MIN_KERNEL_ADDRESS)
+		pde = kvtopte((vaddr_t)pte);
+	else
+		pde = vtopte((vaddr_t)pte);
+
 	if ((*pde & PG_V) == 0 || (*pte & PG_V) == 0) {
 		db_printf("invalid address\n");
 		return (loc);



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

2018-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Sep  8 12:40:17 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: db_disasm.c

Log Message:
Work around dumb KASSERT in vtopte(), the PTE area can now be above the
MAIN area. I guess the KASSERT should be removed because it doesn't make
a lot of sense.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/amd64/db_disasm.c

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



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

2018-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Sep  8 11:54:26 UTC 2018

Modified Files:
src/sys/arch/arm/pic: picvar.h

Log Message:
Increase the size of is_irq from 8- to 16-bits to allow for > 256 IRQs per pic.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/pic/picvar.h

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

Modified files:

Index: src/sys/arch/arm/pic/picvar.h
diff -u src/sys/arch/arm/pic/picvar.h:1.18 src/sys/arch/arm/pic/picvar.h:1.19
--- src/sys/arch/arm/pic/picvar.h:1.18	Mon Jul 16 10:13:34 2018
+++ src/sys/arch/arm/pic/picvar.h	Sat Sep  8 11:54:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: picvar.h,v 1.18 2018/07/16 10:13:34 jmcneill Exp $	*/
+/*	$NetBSD: picvar.h,v 1.19 2018/09/08 11:54:26 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -114,7 +114,7 @@ struct intrsource {
 	struct pic_softc *is_pic;		/* owning PIC */
 	uint8_t is_type;			/* IST_xxx */
 	uint8_t is_ipl;/* IPL_xxx */
-	uint8_t is_irq;/* local to pic */
+	uint16_t is_irq;			/* local to pic */
 	uint8_t is_iplidx;
 	bool is_mpsafe;
 	char is_source[16];



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

2018-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Sep  8 11:54:26 UTC 2018

Modified Files:
src/sys/arch/arm/pic: picvar.h

Log Message:
Increase the size of is_irq from 8- to 16-bits to allow for > 256 IRQs per pic.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/pic/picvar.h

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



CVS commit: src/doc

2018-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Sep  8 09:02:50 UTC 2018

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-8.2 out


To generate a diff of this commit:
cvs rdiff -u -r1.1562 -r1.1563 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.1562 src/doc/3RDPARTY:1.1563
--- src/doc/3RDPARTY:1.1562	Tue Sep  4 06:05:39 2018
+++ src/doc/3RDPARTY	Sat Sep  8 09:02:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1562 2018/09/04 06:05:39 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1563 2018/09/08 09:02:50 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -482,7 +482,7 @@ Before importing a new version of extern
 
 Package:	gdb
 Version:	8.0.1
-Current Vers:	8.1.1
+Current Vers:	8.2
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gdb/
 Home Page:	http://www.gnu.org/software/gdb/



CVS commit: src/doc

2018-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Sep  8 09:02:50 UTC 2018

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-8.2 out


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

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