CVS commit: src/sys/dev/ic

2019-01-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  9 07:55:23 UTC 2019

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

Log Message:
No functional change.
- u_int{16,32}_t -> uint{16,32}_t
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/ic/gem.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/gem.c
diff -u src/sys/dev/ic/gem.c:1.111 src/sys/dev/ic/gem.c:1.112
--- src/sys/dev/ic/gem.c:1.111	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/gem.c	Wed Jan  9 07:55:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: gem.c,v 1.111 2018/09/03 16:29:31 riastradh Exp $ */
+/*	$NetBSD: gem.c,v 1.112 2019/01/09 07:55:23 msaitoh Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.111 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.112 2019/01/09 07:55:23 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -98,7 +98,7 @@ static int	gem_ringsize(int sz);
 static int	gem_meminit(struct gem_softc *);
 void		gem_mifinit(struct gem_softc *);
 static int	gem_bitwait(struct gem_softc *sc, bus_space_handle_t, int,
-		u_int32_t, u_int32_t);
+		uint32_t, uint32_t);
 void		gem_reset(struct gem_softc *);
 int		gem_reset_rx(struct gem_softc *sc);
 static void	gem_reset_rxdma(struct gem_softc *sc);
@@ -248,7 +248,7 @@ gem_attach(struct gem_softc *sc, const u
 	bus_space_handle_t h = sc->sc_h1;
 	struct ifmedia_entry *ifm;
 	int i, error, phyaddr;
-	u_int32_t v;
+	uint32_t v;
 	char *nullbuf;
 
 	/* Make sure the chip is stopped. */
@@ -647,10 +647,11 @@ gem_tick(void *arg)
 }
 
 static int
-gem_bitwait(struct gem_softc *sc, bus_space_handle_t h, int r, u_int32_t clr, u_int32_t set)
+gem_bitwait(struct gem_softc *sc, bus_space_handle_t h, int r, uint32_t clr,
+uint32_t set)
 {
 	int i;
-	u_int32_t reg;
+	uint32_t reg;
 
 	for (i = TRIES; i--; DELAY(100)) {
 		reg = bus_space_read_4(sc->sc_bustag, h, r);
@@ -832,7 +833,7 @@ gem_rx_common(struct gem_softc *sc)
 {
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
-	u_int32_t v;
+	uint32_t v;
 
 	/* Encode Receive Descriptor ring size: four possible values */
 	v = gem_ringsize(GEM_NRXDESC /*XXX*/);
@@ -901,7 +902,7 @@ gem_disable_rx(struct gem_softc *sc)
 {
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
-	u_int32_t cfg;
+	uint32_t cfg;
 
 	/* Flip the enable bit */
 	cfg = bus_space_read_4(t, h, GEM_MAC_RX_CONFIG);
@@ -920,7 +921,7 @@ gem_disable_tx(struct gem_softc *sc)
 {
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
-	u_int32_t cfg;
+	uint32_t cfg;
 
 	/* Flip the enable bit */
 	cfg = bus_space_read_4(t, h, GEM_MAC_TX_CONFIG);
@@ -1120,7 +1121,7 @@ gem_init(struct ifnet *ifp)
 	bus_space_handle_t h = sc->sc_h1;
 	int rc = 0, s;
 	u_int max_frame_size;
-	u_int32_t v;
+	uint32_t v;
 
 	s = splnet();
 
@@ -1242,7 +1243,7 @@ gem_init_regs(struct gem_softc *sc)
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
 	const u_char *laddr = CLLADDR(ifp->if_sadl);
-	u_int32_t v;
+	uint32_t v;
 
 	/* These regs are not cleared on reset */
 	if (!sc->sc_inited) {
@@ -1639,7 +1640,7 @@ gem_tint(struct gem_softc *sc)
 	struct gem_txsoft *txs;
 	int txlast;
 	int progress = 0;
-	u_int32_t v;
+	uint32_t v;
 
 	DPRINTF(sc, ("%s: gem_tint\n", device_xname(sc->sc_dev)));
 
@@ -1761,8 +1762,8 @@ gem_rint(struct gem_softc *sc)
 	bus_space_handle_t h = sc->sc_h1;
 	struct gem_rxsoft *rxs;
 	struct mbuf *m;
-	u_int64_t rxstat;
-	u_int32_t rxcomp;
+	uint64_t rxstat;
+	uint32_t rxcomp;
 	int i, len, progress = 0;
 
 	DPRINTF(sc, ("%s: gem_rint\n", device_xname(sc->sc_dev)));
@@ -2049,7 +2050,7 @@ int
 gem_eint(struct gem_softc *sc, u_int status)
 {
 	char bits[128];
-	u_int32_t r, v;
+	uint32_t r, v;
 
 	if ((status & GEM_INTR_MIF) != 0) {
 		printf("%s: XXXlink status changed\n", device_xname(sc->sc_dev));
@@ -2091,7 +2092,7 @@ gem_pint(struct gem_softc *sc)
 	struct ifnet *ifp = >sc_ethercom.ec_if;
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
-	u_int32_t v, v2;
+	uint32_t v, v2;
 
 	/*
 	 * Clear the PCS interrupt from GEM_STATUS.  The PCS register is
@@ -2170,7 +2171,7 @@ gem_intr(void *v)
 	struct ifnet *ifp = >sc_ethercom.ec_if;
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
-	u_int32_t status;
+	uint32_t status;
 	int r = 0;
 #ifdef GEM_DEBUG
 	char bits[128];
@@ -2263,9 +2264,9 @@ gem_rx_watchdog(void *arg)
 	struct ifnet *ifp = >sc_ethercom.ec_if;
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t h = sc->sc_h1;
-	u_int32_t rx_fifo_wr_ptr;
-	u_int32_t rx_fifo_rd_ptr;
-	u_int32_t state;
+	uint32_t rx_fifo_wr_ptr;
+	uint32_t rx_fifo_rd_ptr;
+	uint32_t state;
 
 	if ((ifp->if_flags & IFF_RUNNING) == 0) {
 		aprint_error_dev(sc->sc_dev, "receiver not running\n");
@@ -2367,7 +2368,7 @@ gem_mii_readreg(device_t self, int phy, 
 	

CVS commit: src/sys/arch/evbarm

2019-01-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  9 07:49:23 UTC 2019

Modified Files:
src/sys/arch/evbarm/iq31244: iq31244_pci.c
src/sys/arch/evbarm/ixdp425: ixdp425_pci.c
src/sys/arch/evbarm/npwr_fc: npwr_fc_pci.c

Log Message:
 Fix compile error for *_pci_intr_establish().


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/iq31244/iq31244_pci.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/ixdp425/ixdp425_pci.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/npwr_fc/npwr_fc_pci.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/evbarm/iq31244/iq31244_pci.c
diff -u src/sys/arch/evbarm/iq31244/iq31244_pci.c:1.6 src/sys/arch/evbarm/iq31244/iq31244_pci.c:1.7
--- src/sys/arch/evbarm/iq31244/iq31244_pci.c:1.6	Sat Mar 29 19:28:27 2014
+++ src/sys/arch/evbarm/iq31244/iq31244_pci.c	Wed Jan  9 07:49:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq31244_pci.c,v 1.6 2014/03/29 19:28:27 christos Exp $	*/
+/*	$NetBSD: iq31244_pci.c,v 1.7 2019/01/09 07:49:22 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iq31244_pci.c,v 1.6 2014/03/29 19:28:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iq31244_pci.c,v 1.7 2019/01/09 07:49:22 msaitoh Exp $");
 
 #include 
 #include 
@@ -63,7 +63,7 @@ int	iq80321_pci_intr_map(const struct pc
 const char *iq80321_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
 const struct evcnt *iq80321_pci_intr_evcnt(void *, pci_intr_handle_t);
 void	*iq80321_pci_intr_establish(void *, pci_intr_handle_t,
-	int, int (*func)(void *), void *);
+int, int (*func)(void *), void *, const char *);
 void	iq80321_pci_intr_disestablish(void *, void *);
 
 void
@@ -146,7 +146,7 @@ iq80321_pci_intr_evcnt(void *v, pci_intr
 
 void *
 iq80321_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
-int (*func)(void *), void *arg)
+int (*func)(void *), void *arg, const char *xname)
 {
 
 	return (i80321_intr_establish(ih, ipl, func, arg));

Index: src/sys/arch/evbarm/ixdp425/ixdp425_pci.c
diff -u src/sys/arch/evbarm/ixdp425/ixdp425_pci.c:1.12 src/sys/arch/evbarm/ixdp425/ixdp425_pci.c:1.13
--- src/sys/arch/evbarm/ixdp425/ixdp425_pci.c:1.12	Tue Oct 23 08:38:18 2018
+++ src/sys/arch/evbarm/ixdp425/ixdp425_pci.c	Wed Jan  9 07:49:22 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: ixdp425_pci.c,v 1.12 2018/10/23 08:38:18 jmcneill Exp $ */
+/*  $NetBSD: ixdp425_pci.c,v 1.13 2019/01/09 07:49:22 msaitoh Exp $ */
 #define PCI_DEBUG
 /*
  * Copyright (c) 2003
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixdp425_pci.c,v 1.12 2018/10/23 08:38:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixdp425_pci.c,v 1.13 2019/01/09 07:49:22 msaitoh Exp $");
 
 /*
  * IXDP425 PCI interrupt support.
@@ -55,7 +55,7 @@ static int ixdp425_pci_intr_map(const st
 static const char *ixdp425_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
 static const struct evcnt *ixdp425_pci_intr_evcnt(void *, pci_intr_handle_t);
 static void *ixdp425_pci_intr_establish(void *, pci_intr_handle_t, int,
-	int (*func)(void *), void *);
+int (*func)(void *), void *, const char *);
 static void ixdp425_pci_intr_disestablish(void *, void *);
 
 void
@@ -229,7 +229,7 @@ ixdp425_pci_intr_evcnt(void *v, pci_intr
 
 static void *
 ixdp425_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
-int (*func)(void *), void *arg)
+int (*func)(void *), void *arg, const char *xname)
 {
 #ifdef PCI_DEBUG
 	printf("ixdp425_pci_intr_establish(v=%p, irq=%d, ipl=%d, func=%p, arg=%p)\n",

Index: src/sys/arch/evbarm/npwr_fc/npwr_fc_pci.c
diff -u src/sys/arch/evbarm/npwr_fc/npwr_fc_pci.c:1.4 src/sys/arch/evbarm/npwr_fc/npwr_fc_pci.c:1.5
--- src/sys/arch/evbarm/npwr_fc/npwr_fc_pci.c:1.4	Sat Mar 29 19:28:28 2014
+++ src/sys/arch/evbarm/npwr_fc/npwr_fc_pci.c	Wed Jan  9 07:49:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: npwr_fc_pci.c,v 1.4 2014/03/29 19:28:28 christos Exp $	*/
+/*	$NetBSD: npwr_fc_pci.c,v 1.5 2019/01/09 07:49:22 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npwr_fc_pci.c,v 1.4 2014/03/29 19:28:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npwr_fc_pci.c,v 1.5 2019/01/09 07:49:22 msaitoh Exp $");
 
 #include 
 #include 
@@ -63,7 +63,7 @@ int	iq80321_pci_intr_map(const struct pc
 const char *iq80321_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
 const struct evcnt *iq80321_pci_intr_evcnt(void *, pci_intr_handle_t);
 void	*iq80321_pci_intr_establish(void *, pci_intr_handle_t,
-	int, int (*func)(void *), void *);
+int, int (*func)(void *), void *, const char *);
 void	iq80321_pci_intr_disestablish(void *, void *);
 
 void
@@ -162,7 +162,7 @@ iq80321_pci_intr_evcnt(void *v, pci_intr
 
 void *
 iq80321_pci_intr_establish(void *v, 

CVS commit: src/share/man/man9

2019-01-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jan  9 04:02:26 UTC 2019

Added Files:
src/share/man/man9: crashme.9

Log Message:
document crashme(9) functionality.

XXX: install me


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/man/man9/crashme.9

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

Added files:

Index: src/share/man/man9/crashme.9
diff -u /dev/null src/share/man/man9/crashme.9:1.1
--- /dev/null	Wed Jan  9 04:02:26 2019
+++ src/share/man/man9/crashme.9	Wed Jan  9 04:02:26 2019
@@ -0,0 +1,104 @@
+.\" $NetBSD: crashme.9,v 1.1 2019/01/09 04:02:26 mrg Exp $
+.\"
+.\" Copyright (c) 2019 Matthew R. Green
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\"derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd January 7, 2019
+.Dt CRASHME 9
+.Os
+.Sh NAME
+.Nm crashme ,
+.Nm crashme_add ,
+.Nm crashme_remove
+.Nd in-kernel testing of crash handling
+.Sh SYNOPSIS
+.In sys/crashme.h
+.Ft int
+.Fn crashme_add "crashme_node *cn"
+.Ft int
+.Fn crashme_remove "crashme_node *cn"
+.Sh DESCRIPTION
+The
+.Nm
+functions provide access to dynamically add and remove crashme nodes.
+These nodes are simply named callbacks that are expected to cause the
+system to crash.
+.Pp
+The crashme functionality is only available in kernels with the
+.Xr options 4
+.Dv DEBUG
+option set.
+.Pp
+Each crashme node is maintained in a crashme_node structure which
+has the following public members:
+.Bd -literal
+typedef int (*crashme_fn)(int);
+
+typedef struct crashme_node {
+	const char	*cn_name;
+	const char	*cn_longname;
+	crashme_fn	 cn_fn;
+} crashme_node;
+.Ed
+.Pp
+The
+caller must fill in the
+.Fa cn_name ,
+.Fa cn_longname ,
+and
+.Fa cn_fn
+members.
+.Pp
+The
+.Ar flags
+parameter is passed from sysctl.
+The return value is 0 upon success or non zero for failure.
+.Sh SYSCTL SUPPORT
+The following
+.Xr sysctl 8
+variables are provided by the
+.Nm
+subsystem:
+.Bl -tag -width "123456" -offset indent
+.It Ic debug.crashme_enable
+Must be set to 1 for any
+.Nm
+node to be executed.
+.It Ic debug.crashme.panic
+Basic panic node.
+.It Ic debug.crashme.null_deref
+Derefence NULL node.
+.Sh SEE ALSO
+.Xr options 4 ,
+.Xr panic 9
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Nx 9.0 .
+.Sh AUTHORS
+.An Matthew R. Green .



CVS commit: src/sys

2019-01-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jan  9 04:01:20 UTC 2019

Modified Files:
src/sys/kern: files.kern
Added Files:
src/sys/kern: kern_crashme.c
src/sys/sys: crashme.h

Log Message:
crashme: a framework to test kernel faults.

so far, only a basic panic() and null deref nodes are added.
with options DEBUG, one can now use:

   # sysctl -w kern.crashme_enable=1

   # sysctl -w kern.crashme.panic=1
   # sysctl -w kern.crashme.null_deref=1

to trigger a crash.  crashme_enable must be set to 1 before any
of the nodes will be writeable.

supports dynamic additional/removal of crashme nodes.

(obsoletes kern.panic_now, which will be removed later.)


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/kern/files.kern
cvs rdiff -u -r0 -r1.1 src/sys/kern/kern_crashme.c
cvs rdiff -u -r0 -r1.1 src/sys/sys/crashme.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/files.kern
diff -u src/sys/kern/files.kern:1.29 src/sys/kern/files.kern:1.30
--- src/sys/kern/files.kern:1.29	Mon Dec 24 16:58:54 2018
+++ src/sys/kern/files.kern	Wed Jan  9 04:01:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.kern,v 1.29 2018/12/24 16:58:54 thorpej Exp $
+#	$NetBSD: files.kern,v 1.30 2019/01/09 04:01:20 mrg Exp $
 
 #
 # kernel sources
@@ -77,6 +77,7 @@ file	kern/kern_rwlock.c		kern
 file	kern/kern_rwlock_obj.c		kern
 file	kern/kern_scdebug.c		kern
 file	kern/kern_sdt.c			kdtrace_hooks
+file	kern/kern_crashme.c		debug
 file	kern/kern_sig.c			kern
 file	kern/kern_sleepq.c		kern
 file	kern/kern_softint.c		kern

Added files:

Index: src/sys/kern/kern_crashme.c
diff -u /dev/null src/sys/kern/kern_crashme.c:1.1
--- /dev/null	Wed Jan  9 04:01:20 2019
+++ src/sys/kern/kern_crashme.c	Wed Jan  9 04:01:20 2019
@@ -0,0 +1,236 @@
+/*	$NetBSD: kern_crashme.c,v 1.1 2019/01/09 04:01:20 mrg Exp $	*/
+
+/*
+ * Copyright (c) 2018, 2019 Matthew R. Green
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * kern_crashme.c:  special debugging routines only enabled in DEBUG
+ * enabled kernels, designed for debugging kernel crashes.
+ *
+ * supports crashme sysctl nodes, to test various ways the system can
+ * panic or crash.  you can add and remove nodes.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DPRINTF(fmt, ...) \
+	printf("%s:%d: " fmt "\n", __func__, __LINE__, ## __VA_ARGS__)
+
+static int crashme_sysctl_forwarder(SYSCTLFN_PROTO);
+
+static int crashme_panic(int);
+static int crashme_null_deref(int);
+
+#define CMNODE(name, lname, func)	\
+{	\
+	.cn_name = name,		\
+	.cn_longname = lname,		\
+	.cn_fn = func,			\
+}
+
+static crashme_node nodes[] = {
+CMNODE("panic", "plain old panic", crashme_panic),
+CMNODE("null_deref", "null dereference", crashme_null_deref),
+};
+static crashme_node *first_node;
+static kmutex_t crashme_lock;
+static const struct sysctlnode *crashme_root = NULL;
+static bool crashme_enable = 0;
+
+/*
+ * add a crashme node dynamically.  return -1 on failure, 0 on success.
+ */
+int
+crashme_add(crashme_node *ncn)
+{
+	int rv = -1;
+	crashme_node *cn;
+	crashme_node *last = NULL;
+
+	if (crashme_root == NULL)
+		return -1;
+
+	mutex_enter(_lock);
+	for (cn = first_node; cn; last = cn, cn = cn->cn_next) {
+		if (strcmp(cn->cn_name, ncn->cn_name) == 0)
+			break;
+	}
+	if (!cn) {
+		ncn->cn_next = NULL;
+
+		rv = sysctl_createv(NULL, 0,
+_root, >cn_sysctl,
+CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
+

CVS commit: src/sys/arch/ews4800mips/stand/common

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  9 03:28:31 UTC 2019

Modified Files:
src/sys/arch/ews4800mips/stand/common: bootfs.c disk.c mem.c prompt.c
ustarfs.c

Log Message:
use  instead of  for everything.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ews4800mips/stand/common/bootfs.c \
src/sys/arch/ews4800mips/stand/common/prompt.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ews4800mips/stand/common/disk.c \
src/sys/arch/ews4800mips/stand/common/ustarfs.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ews4800mips/stand/common/mem.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/ews4800mips/stand/common/bootfs.c
diff -u src/sys/arch/ews4800mips/stand/common/bootfs.c:1.4 src/sys/arch/ews4800mips/stand/common/bootfs.c:1.5
--- src/sys/arch/ews4800mips/stand/common/bootfs.c:1.4	Mon Apr 28 16:23:18 2008
+++ src/sys/arch/ews4800mips/stand/common/bootfs.c	Tue Jan  8 22:28:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootfs.c,v 1.4 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: bootfs.c,v 1.5 2019/01/09 03:28:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
Index: src/sys/arch/ews4800mips/stand/common/prompt.c
diff -u src/sys/arch/ews4800mips/stand/common/prompt.c:1.4 src/sys/arch/ews4800mips/stand/common/prompt.c:1.5
--- src/sys/arch/ews4800mips/stand/common/prompt.c:1.4	Mon Apr 28 16:23:19 2008
+++ src/sys/arch/ews4800mips/stand/common/prompt.c	Tue Jan  8 22:28:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: prompt.c,v 1.4 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: prompt.c,v 1.5 2019/01/09 03:28:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 
 #include "cmd.h"

Index: src/sys/arch/ews4800mips/stand/common/disk.c
diff -u src/sys/arch/ews4800mips/stand/common/disk.c:1.8 src/sys/arch/ews4800mips/stand/common/disk.c:1.9
--- src/sys/arch/ews4800mips/stand/common/disk.c:1.8	Wed Mar 26 13:56:18 2014
+++ src/sys/arch/ews4800mips/stand/common/disk.c	Tue Jan  8 22:28:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.c,v 1.8 2014/03/26 17:56:18 christos Exp $	*/
+/*	$NetBSD: disk.c,v 1.9 2019/01/09 03:28:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
Index: src/sys/arch/ews4800mips/stand/common/ustarfs.c
diff -u src/sys/arch/ews4800mips/stand/common/ustarfs.c:1.8 src/sys/arch/ews4800mips/stand/common/ustarfs.c:1.9
--- src/sys/arch/ews4800mips/stand/common/ustarfs.c:1.8	Wed Feb  4 10:22:13 2009
+++ src/sys/arch/ews4800mips/stand/common/ustarfs.c	Tue Jan  8 22:28:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ustarfs.c,v 1.8 2009/02/04 15:22:13 tsutsui Exp $	*/
+/*	$NetBSD: ustarfs.c,v 1.9 2019/01/09 03:28:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/ews4800mips/stand/common/mem.c
diff -u src/sys/arch/ews4800mips/stand/common/mem.c:1.5 src/sys/arch/ews4800mips/stand/common/mem.c:1.6
--- src/sys/arch/ews4800mips/stand/common/mem.c:1.5	Mon Apr 28 16:23:19 2008
+++ src/sys/arch/ews4800mips/stand/common/mem.c	Tue Jan  8 22:28:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mem.c,v 1.5 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: mem.c,v 1.6 2019/01/09 03:28:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 
 #include "local.h"



CVS commit: src/external/mpl/bind/include

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 22:19:28 UTC 2019

Modified Files:
src/external/mpl/bind/include: config.h

Log Message:
PR/53845: Anthony Mallet: "bad cookie" in authoritative DNS server since bind
9.12 import. AES_CC needs to always be enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/mpl/bind/include/config.h

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

Modified files:

Index: src/external/mpl/bind/include/config.h
diff -u src/external/mpl/bind/include/config.h:1.1 src/external/mpl/bind/include/config.h:1.2
--- src/external/mpl/bind/include/config.h:1.1	Sun Aug 12 09:02:42 2018
+++ src/external/mpl/bind/include/config.h	Tue Jan  8 17:19:28 2019
@@ -150,11 +150,8 @@ int sigwait(const unsigned int *set, int
 /* Define if building universal (internal helper macro) */
 /* #undef AC_APPLE_UNIVERSAL_BUILD */
 
-#ifndef __NetBSD__
-/* defined by the build process */
 /* Use AES for Client Cookie generation */
 #define AES_CC 1
-#endif
 
 /* define if ATF unit tests are to be built. */
 /* #undef ATF_TEST */



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

2019-01-08 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  8 20:08:28 UTC 2019

Modified Files:
src/sys/arch/sh3/include: proc.h

Log Message:
remove  include, nothing from it is actually used here


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sh3/include/proc.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/sh3/include/proc.h
diff -u src/sys/arch/sh3/include/proc.h:1.17 src/sys/arch/sh3/include/proc.h:1.18
--- src/sys/arch/sh3/include/proc.h:1.17	Sun Jul  8 20:14:11 2012
+++ src/sys/arch/sh3/include/proc.h	Tue Jan  8 20:08:28 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.17 2012/07/08 20:14:11 dsl Exp $	*/
+/*	$NetBSD: proc.h,v 1.18 2019/01/08 20:08:28 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -39,8 +39,6 @@
  * Machine-dependent part of the proc structure for sh3.
  */
 
-#include 
-
 /* Kernel stack PTE */
 struct md_upte {
 	uint32_t addr;



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

2019-01-08 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  8 19:59:24 UTC 2019

Modified Files:
src/sys/arch/xen/include: xen_shm.h

Log Message:
remove explicit  include, code including this already includes



To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/include/xen_shm.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/xen/include/xen_shm.h
diff -u src/sys/arch/xen/include/xen_shm.h:1.9 src/sys/arch/xen/include/xen_shm.h:1.10
--- src/sys/arch/xen/include/xen_shm.h:1.9	Mon Oct 19 18:41:10 2009
+++ src/sys/arch/xen/include/xen_shm.h	Tue Jan  8 19:59:24 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: xen_shm.h,v 1.9 2009/10/19 18:41:10 bouyer Exp $  */
+/*  $NetBSD: xen_shm.h,v 1.10 2019/01/08 19:59:24 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -26,7 +26,6 @@
  */
 
 #include "opt_xen.h"
-#include 
 
 #define XENSHM_MAX_PAGES_PER_REQUEST (MAXPHYS >> PAGE_SHIFT)
 



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

2019-01-08 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  8 19:53:40 UTC 2019

Modified Files:
src/sys/arch/sparc64/include: bootinfo.h

Log Message:
remove explicit  include, code including this already includes



To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/include/bootinfo.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/sparc64/include/bootinfo.h
diff -u src/sys/arch/sparc64/include/bootinfo.h:1.8 src/sys/arch/sparc64/include/bootinfo.h:1.9
--- src/sys/arch/sparc64/include/bootinfo.h:1.8	Fri Sep 15 13:25:34 2017
+++ src/sys/arch/sparc64/include/bootinfo.h	Tue Jan  8 19:53:40 2019
@@ -1,4 +1,4 @@
-/*   $NetBSD: bootinfo.h,v 1.8 2017/09/15 13:25:34 martin Exp $*/
+/*   $NetBSD: bootinfo.h,v 1.9 2019/01/08 19:53:40 jdolecek Exp $*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -29,7 +29,6 @@
 #ifndef _BOOTINFO_H_
 #define _BOOTINFO_H_
 
-#include 
 #include 
 
 /*



CVS commit: src/sys/arch

2019-01-08 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  8 19:41:10 UTC 2019

Modified Files:
src/sys/arch/amiga/dev: bzivsc.c bzsc.c bztzsc.c cbiisc.c cbsc.c flsc.c
src/sys/arch/arm/gemini: gemini_lpchc.c gemini_wdt.c obio_lpchc.c
obio_wdt.c
src/sys/arch/arm/omap: obio_wdt.c omap_wdt.c
src/sys/arch/bebox/stand/boot: sd.c wd.c
src/sys/arch/cobalt/stand/boot: wd.c
src/sys/arch/mac68k/dev: adb_direct.c
src/sys/arch/mac68k/nubus: nubus.c
src/sys/arch/mac68k/obio: esp.c
src/sys/arch/mips/cavium/dev: octeon_rnm.c
src/sys/arch/prep/stand/boot: sd.c

Log Message:
no need to include  if  already included


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amiga/dev/bzivsc.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amiga/dev/bzsc.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amiga/dev/bztzsc.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/dev/cbiisc.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/dev/cbsc.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amiga/dev/flsc.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/gemini/gemini_lpchc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/gemini/gemini_wdt.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/gemini/obio_lpchc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/gemini/obio_wdt.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/omap/obio_wdt.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/omap/omap_wdt.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/bebox/stand/boot/sd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/bebox/stand/boot/wd.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cobalt/stand/boot/wd.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/mac68k/dev/adb_direct.c
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/mac68k/nubus/nubus.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mac68k/obio/esp.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/dev/octeon_rnm.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/prep/stand/boot/sd.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/amiga/dev/bzivsc.c
diff -u src/sys/arch/amiga/dev/bzivsc.c:1.32 src/sys/arch/amiga/dev/bzivsc.c:1.33
--- src/sys/arch/amiga/dev/bzivsc.c:1.32	Mon Sep  3 16:29:22 2018
+++ src/sys/arch/amiga/dev/bzivsc.c	Tue Jan  8 19:41:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bzivsc.c,v 1.32 2018/09/03 16:29:22 riastradh Exp $ */
+/*	$NetBSD: bzivsc.c,v 1.33 2019/01/08 19:41:09 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -36,7 +36,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.32 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.33 2019/01/08 19:41:09 jdolecek Exp $");
 
 #include 
 #include 
@@ -55,7 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1
 #include 
 
 #include 
-#include 
 
 #include 
 #include 

Index: src/sys/arch/amiga/dev/bzsc.c
diff -u src/sys/arch/amiga/dev/bzsc.c:1.49 src/sys/arch/amiga/dev/bzsc.c:1.50
--- src/sys/arch/amiga/dev/bzsc.c:1.49	Mon Sep  3 16:29:22 2018
+++ src/sys/arch/amiga/dev/bzsc.c	Tue Jan  8 19:41:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bzsc.c,v 1.49 2018/09/03 16:29:22 riastradh Exp $ */
+/*	$NetBSD: bzsc.c,v 1.50 2019/01/08 19:41:09 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -41,7 +41,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.49 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.50 2019/01/08 19:41:09 jdolecek Exp $");
 
 /*
  * Initial amiga Blizzard 1230-II driver by Daniel Widenfalk.  Conversion to
@@ -65,7 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.4
 #include 
 
 #include 
-#include 
 
 #include 
 #include 

Index: src/sys/arch/amiga/dev/bztzsc.c
diff -u src/sys/arch/amiga/dev/bztzsc.c:1.37 src/sys/arch/amiga/dev/bztzsc.c:1.38
--- src/sys/arch/amiga/dev/bztzsc.c:1.37	Mon Sep  3 16:29:22 2018
+++ src/sys/arch/amiga/dev/bztzsc.c	Tue Jan  8 19:41:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bztzsc.c,v 1.37 2018/09/03 16:29:22 riastradh Exp $ */
+/*	$NetBSD: bztzsc.c,v 1.38 2019/01/08 19:41:09 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -42,7 +42,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.37 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.38 2019/01/08 19:41:09 jdolecek Exp $");
 
 #include 
 #include 
@@ -61,7 +61,6 @@ __KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1
 #include 
 
 #include 
-#include 
 
 #include 
 #include 

Index: src/sys/arch/amiga/dev/cbiisc.c
diff -u src/sys/arch/amiga/dev/cbiisc.c:1.33 src/sys/arch/amiga/dev/cbiisc.c:1.34
--- src/sys/arch/amiga/dev/cbiisc.c:1.33	Mon Sep  3 16:29:22 2018
+++ src/sys/arch/amiga/dev/cbiisc.c	Tue Jan  8 19:41:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cbiisc.c,v 1.33 2018/09/03 16:29:22 riastradh Exp $ */
+/*	$NetBSD: cbiisc.c,v 1.34 2019/01/08 19:41:09 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -36,7 +36,7 @@
 #endif
 
 #include 

CVS commit: src/sys/arch/mmeye/stand/boot

2019-01-08 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  8 19:36:57 UTC 2019

Modified Files:
src/sys/arch/mmeye/stand/boot: wd.c

Log Message:
no need for 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mmeye/stand/boot/wd.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/mmeye/stand/boot/wd.c
diff -u src/sys/arch/mmeye/stand/boot/wd.c:1.4 src/sys/arch/mmeye/stand/boot/wd.c:1.5
--- src/sys/arch/mmeye/stand/boot/wd.c:1.4	Fri Jan  2 19:42:06 2015
+++ src/sys/arch/mmeye/stand/boot/wd.c	Tue Jan  8 19:36:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.4 2015/01/02 19:42:06 christos Exp $	*/
+/*	$NetBSD: wd.c,v 1.5 2019/01/08 19:36:57 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,8 +36,6 @@
 #include 
 #include 
 
-#include 
-
 #include "boot.h"
 #include "wdvar.h"
 



CVS commit: src/doc

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 19:17:10 UTC 2019

Modified Files:
src/doc: 3RDPARTY

Log Message:
update groff (Steffen Nurpmeso)


To generate a diff of this commit:
cvs rdiff -u -r1.1590 -r1.1591 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.1590 src/doc/3RDPARTY:1.1591
--- src/doc/3RDPARTY:1.1590	Tue Jan  8 13:40:53 2019
+++ src/doc/3RDPARTY	Tue Jan  8 14:17:10 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1590 2019/01/08 18:40:53 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1591 2019/01/08 19:17:10 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -2009,7 +2009,7 @@ in src/usr.bin/grep, replacing FreeGrep
 
 Package:	groff
 Version:	1.19.2 (last GPLv2+ version)
-Current Vers:	1.22.3
+Current Vers:	1.22.4
 Maintainer:	Werner Lemberg/FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/groff/
 Home Page:	http://www.gnu.org/software/groff/



CVS commit: src/sys/arch/cobalt/stand/boot

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 19:15:54 UTC 2019

Modified Files:
src/sys/arch/cobalt/stand/boot: wdc.c

Log Message:
no need for 


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cobalt/stand/boot/wdc.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/cobalt/stand/boot/wdc.c
diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.15 src/sys/arch/cobalt/stand/boot/wdc.c:1.16
--- src/sys/arch/cobalt/stand/boot/wdc.c:1.15	Tue Jan  8 12:13:03 2019
+++ src/sys/arch/cobalt/stand/boot/wdc.c	Tue Jan  8 14:15:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.15 2019/01/08 17:13:03 christos Exp $	*/
+/*	$NetBSD: wdc.c,v 1.16 2019/01/08 19:15:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
 
 #include 
 #include 
-#include 
 
 #include "boot.h"
 #include "wdvar.h"



CVS commit: src/sys/arch/bebox/stand/boot

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 19:15:27 UTC 2019

Modified Files:
src/sys/arch/bebox/stand/boot: wdc.c

Log Message:
no need for 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/bebox/stand/boot/wdc.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/bebox/stand/boot/wdc.c
diff -u src/sys/arch/bebox/stand/boot/wdc.c:1.3 src/sys/arch/bebox/stand/boot/wdc.c:1.4
--- src/sys/arch/bebox/stand/boot/wdc.c:1.3	Tue Jan  8 12:13:21 2019
+++ src/sys/arch/bebox/stand/boot/wdc.c	Tue Jan  8 14:15:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.3 2019/01/08 17:13:21 christos Exp $	*/
+/*	$NetBSD: wdc.c,v 1.4 2019/01/08 19:15:27 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
 
 #include 
 #include 
-#include 
 
 #include "boot.h"
 #include "wdvar.h"



CVS commit: src/sys/arch/ews4800mips/stand/common

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 19:14:51 UTC 2019

Modified Files:
src/sys/arch/ews4800mips/stand/common: bfs_subr.c

Log Message:
no need for 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ews4800mips/stand/common/bfs_subr.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/ews4800mips/stand/common/bfs_subr.c
diff -u src/sys/arch/ews4800mips/stand/common/bfs_subr.c:1.4 src/sys/arch/ews4800mips/stand/common/bfs_subr.c:1.5
--- src/sys/arch/ews4800mips/stand/common/bfs_subr.c:1.4	Tue Jan  8 12:14:14 2019
+++ src/sys/arch/ews4800mips/stand/common/bfs_subr.c	Tue Jan  8 14:14:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bfs_subr.c,v 1.4 2019/01/08 17:14:14 christos Exp $	*/
+/*	$NetBSD: bfs_subr.c,v 1.5 2019/01/08 19:14:51 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: bfs_subr.c,v 1.4 2019/01/08 17:14:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bfs_subr.c,v 1.5 2019/01/08 19:14:51 christos Exp $");
 #ifdef _STANDALONE
 #include 
 #include 
@@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: bfs_subr.c,v
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/hppa/stand/common

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 19:14:08 UTC 2019

Modified Files:
src/sys/arch/hppa/stand/common: pdc.c

Log Message:
no need for 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/stand/common/pdc.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/hppa/stand/common/pdc.c
diff -u src/sys/arch/hppa/stand/common/pdc.c:1.3 src/sys/arch/hppa/stand/common/pdc.c:1.4
--- src/sys/arch/hppa/stand/common/pdc.c:1.3	Tue Jan  8 12:14:52 2019
+++ src/sys/arch/hppa/stand/common/pdc.c	Tue Jan  8 14:14:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.c,v 1.3 2019/01/08 17:14:52 christos Exp $	*/
+/*	$NetBSD: pdc.c,v 1.4 2019/01/08 19:14:08 christos Exp $	*/
 
 /*	$OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $	*/
 
@@ -71,7 +71,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "dev_hppa.h"



CVS commit: src/sys/arch/mmeye/stand/boot

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 19:12:41 UTC 2019

Modified Files:
src/sys/arch/mmeye/stand/boot: wdc.c

Log Message:
no need for machine/param.h


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mmeye/stand/boot/wdc.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/mmeye/stand/boot/wdc.c
diff -u src/sys/arch/mmeye/stand/boot/wdc.c:1.3 src/sys/arch/mmeye/stand/boot/wdc.c:1.4
--- src/sys/arch/mmeye/stand/boot/wdc.c:1.3	Tue Jan  8 12:15:31 2019
+++ src/sys/arch/mmeye/stand/boot/wdc.c	Tue Jan  8 14:12:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.3 2019/01/08 17:15:31 christos Exp $	*/
+/*	$NetBSD: wdc.c,v 1.4 2019/01/08 19:12:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
 
 #include 
 #include 
-#include 
 
 #include "boot.h"
 #include "wdvar.h"



CVS commit: src/doc

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 18:40:53 UTC 2019

Modified Files:
src/doc: 3RDPARTY

Log Message:
- put all the GPLv3 software together
- put all the Last GPLv2 version software at the end.
Perhaps it is better to use separate files (per license) at this point?


To generate a diff of this commit:
cvs rdiff -u -r1.1589 -r1.1590 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.1589 src/doc/3RDPARTY:1.1590
--- src/doc/3RDPARTY:1.1589	Mon Jan  7 10:44:47 2019
+++ src/doc/3RDPARTY	Tue Jan  8 13:40:53 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1589 2019/01/07 15:44:47 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1590 2019/01/08 18:40:53 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -184,18 +184,6 @@ Todo[3]: net/base64.c is imported from b
 Todo[4]: Re-entrant functions of net/*
 Todo[5]: Reconcile the doc directory.
 
-Package:	binutils
-Version:	2.31.1
-Current Vers:	2.31.1
-Maintainer:	FSF
-Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
-Home Page:	http://www.gnu.org/software/binutils/
-Mailing List:	bug-gnu-ut...@gnu.org
-Responsible:	thorpej, mrg
-License:	GPLv3, LGPLv3, GPLv2, LGPLv2, BSD
-Location:	external/gpl3/binutils/dist
-Notes:
-
 Package:	bozohttpd
 Version:	20170201
 Current Vers:	20170201
@@ -373,31 +361,6 @@ I neglected to add RCSIDs in the last im
 which nouveau2netbsd adds them).  For the next import, remember to add
 them!
 
-Package:	gmake
-Version:	3.81 (Last GPlv2+ version)
-Current Vers:	4.2
-Maintainer:	FSF
-Archive Site:	ftp://ftp.gnu.org/gnu/make/
-Home Page:	http://www.gnu.org/software/make/
-Mailing List:	bug-m...@gnu.org
-Responsible:	
-License:	GPLv2+ (3.81), GPLv3+ (3.82 and later)
-Location:	external/gpl2/gmake
-Notes:
-
-Package:	diffutils
-Version:	2.8.1 (Last GPLv2+ version)
-Current Vers:	3.6
-Maintainer:	FSF
-Archive Site:	ftp://ftp.gnu.org/gnu/diffutils/
-Home Page:	http://www.gnu.org/software/diffutils/
-Mailing List:	bug-diffut...@gnu.org
-Responsible:	
-License:	GPLv2+ (2.8.1), GPLv3+ (2.9 and later)
-Location:	external/gpl2/diffutils
-Notes:
-Use external/gpl2/diffutils/diffutils2netbsd for preparing the source tree
-for the import.
 
 Package:	ekermit
 Version:	1.7
@@ -496,6 +459,32 @@ When updating GDB, it is imperative to t
 	- Support for our kernel's remote serial debugging protocol
 	  ("options KGDB") works correctly.
 
+Package:	binutils
+Version:	2.31.1
+Current Vers:	2.31.1
+Maintainer:	FSF
+Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
+Home Page:	http://www.gnu.org/software/binutils/
+Mailing List:	bug-gnu-ut...@gnu.org
+Responsible:	thorpej, mrg
+License:	GPLv3, LGPLv3, GPLv2, LGPLv2, BSD
+Location:	external/gpl3/binutils/dist
+Notes:
+
+Package:	autoconf 
+Version:	2.69
+Current Vers:	2.69
+Maintainer:	FSF
+Archive Site:	ftp://ftp.gnu.org/gnu/autoconf/
+Home Page:	http://www.gnu.org/software/autoconf/
+Mailing List:	bug-autoc...@gnu.org
+Responsible:	christos
+License:	GPLv3+
+Location:	external/gpl3/autoconf
+Notes:
+This is only used to re-generate the configure files in tools/compat.
+It is not part of the regular build.
+
 Package:	gdtoa
 Version:	2016-02-19
 Current Vers:	$(date)
@@ -511,55 +500,6 @@ Test suite integrated at this time, but 
 No hexadecimal floating-point string conversion for VAX FP yet.
 Only double-precision addressed at this time.
 
-Package:	gettext
-Version:	0.16.1 (Last GPLv2+ version)
-Current Vers:	0.19.8
-Maintainer:	FSF
-Archive Site:	ftp://ftp.gnu.org/gnu/gettext/
-Home Page:	http://www.gnu.org/software/gettext/
-Mailing List:	bug-gnu-ut...@gnu.org
-Responsible:	christos
-License:	GPLv2+ (0.16.1), GPLv3+ (0.17 and later)
-Location:	external/gpl2/gettext
-Notes:
-GNU gettext is used for userland tools like msgfmt(1) only.  For libintl,
-we use BSD-licensed implementation from Citrus project (see entry for
-"Citrus XPG4DL").  We hope to replace userland tools with BSD-licensed one.
-
-Package:	grep
-Version:	2.5.1a (last GPLv2+ version)
-Current Vers:	3.1
-Maintainer:	FSF
-Archive Site:	ftp://ftp.gnu.org/gnu/grep/
-Home Page:	http://www.gnu.org/software/grep/
-Mailing List:	bug-gnu-ut...@gnu.org
-Responsible:	simonb
-License:	GPLv2+ (2.5.1a), GPLv3+ (2.5.3 and later)
-Location:	external/gpl2/grep
-Notes:
-Use external/gpl2/grep/grep2netbsd for preparing the source tree
-for the import.
-On 2 Jan 2004, a non-GNU grep (FreeGrep, https://github.com/howardjp/freegrep;
-see also http://www.monkey.org/openbsd/archive/tech/0306/msg00129.html)
-was imported into src/usr.bin/grep;
-on 16 Feb 2011, the BSD grep implementation from FreeBSD was imported
-in src/usr.bin/grep, replacing FreeGrep
-(http://mail-index.NetBSD.org/source-changes/2011/02/16/msg018643.html).
-
-Package:	groff
-Version:	1.19.2 (last GPLv2+ version)
-Current Vers:	1.22.3

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

2019-01-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan  8 18:04:00 UTC 2019

Modified Files:
src/sys/arch/arm/nvidia: tegra_xusb.c

Log Message:
Make TEGRA124_XUSB_BIN_STATIC and TEGRA210_XUSB_BIN_STATIC compile again.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_xusb.c

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

Modified files:

Index: src/sys/arch/arm/nvidia/tegra_xusb.c
diff -u src/sys/arch/arm/nvidia/tegra_xusb.c:1.16 src/sys/arch/arm/nvidia/tegra_xusb.c:1.17
--- src/sys/arch/arm/nvidia/tegra_xusb.c:1.16	Fri Dec 14 18:17:36 2018
+++ src/sys/arch/arm/nvidia/tegra_xusb.c	Tue Jan  8 18:04:00 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_xusb.c,v 1.16 2018/12/14 18:17:36 skrll Exp $ */
+/* $NetBSD: tegra_xusb.c,v 1.17 2019/01/08 18:04:00 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2016 Jonathan A. Kollasch
@@ -30,7 +30,7 @@
 #include "opt_tegra.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.16 2018/12/14 18:17:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.17 2019/01/08 18:04:00 jakllsch Exp $");
 
 #include 
 #include 
@@ -701,7 +701,6 @@ free:
 	return err;
 }
 
-#if !defined(TEGRA124_XUSB_BIN_STATIC)
 static void
 fw_dma_free(struct tegra_xusb_softc * const psc, struct fw_dma * const p)
 {
@@ -713,7 +712,6 @@ fw_dma_free(struct tegra_xusb_softc * co
 	bus_dmamem_unmap(dmat, p->addr, p->size);
 	bus_dmamem_free(dmat, p->segs, p->nsegs);
 }
-#endif
 
 #define FWHEADER_BOOT_CODETAG 8
 #define FWHEADER_BOOT_CODESIZE 12
@@ -735,7 +733,7 @@ tegra_xusb_open_fw(struct tegra_xusb_sof
 	case XUSB_T124:
 #if defined(TEGRA124_XUSB_BIN_STATIC)
 		firmware_size = (uintptr_t)&_binary_tegra124_xusb_bin_size;
-		fw_static = _binary_tegra124_xusb_bin_start;
+		fw_static = __UNCONST(_binary_tegra124_xusb_bin_start);
 #else
 		fw_path = "nvidia/tegra124";
 #endif
@@ -743,7 +741,7 @@ tegra_xusb_open_fw(struct tegra_xusb_sof
 	case XUSB_T210:
 #if defined(TEGRA210_XUSB_BIN_STATIC)
 		firmware_size = (uintptr_t)&_binary_tegra210_xusb_bin_size;
-		fw_static = _binary_tegra210_xusb_bin_start;
+		fw_static = __UNCONST(_binary_tegra210_xusb_bin_start);
 #else
 		fw_path = "nvidia/tegra210";
 #endif



CVS commit: src/include

2019-01-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jan  8 17:35:42 UTC 2019

Modified Files:
src/include: signal.h

Log Message:
Provide global variables with C linkage, otherwise they will create
conflicts for C++ modules use.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/include/signal.h

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

Modified files:

Index: src/include/signal.h
diff -u src/include/signal.h:1.56 src/include/signal.h:1.57
--- src/include/signal.h:1.56	Tue May  9 11:14:16 2017
+++ src/include/signal.h	Tue Jan  8 17:35:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.56 2017/05/09 11:14:16 kre Exp $	*/
+/*	$NetBSD: signal.h,v 1.57 2019/01/08 17:35:42 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -44,6 +44,7 @@
 
 #include 
 
+__BEGIN_DECLS
 #if defined(_NETBSD_SOURCE)
 extern const char *const *sys_signame __RENAME(__sys_signame14);
 #ifndef __SYS_SIGLIST_DECLARED
@@ -54,7 +55,6 @@ extern const char *const *sys_siglist __
 extern const int sys_nsig __RENAME(__sys_nsig14);
 #endif
 
-__BEGIN_DECLS
 int	raise(int);
 
 #if defined(_NETBSD_SOURCE)



CVS commit: src/sys/arch/mmeye/stand/boot

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 17:15:31 UTC 2019

Modified Files:
src/sys/arch/mmeye/stand/boot: wdc.c

Log Message:
Include  for DEV_BSIZE/DEV_BSHIFT


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mmeye/stand/boot/wdc.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/mmeye/stand/boot/wdc.c
diff -u src/sys/arch/mmeye/stand/boot/wdc.c:1.2 src/sys/arch/mmeye/stand/boot/wdc.c:1.3
--- src/sys/arch/mmeye/stand/boot/wdc.c:1.2	Sat Jul 11 06:32:46 2015
+++ src/sys/arch/mmeye/stand/boot/wdc.c	Tue Jan  8 12:15:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.2 2015/07/11 10:32:46 kamil Exp $	*/
+/*	$NetBSD: wdc.c,v 1.3 2019/01/08 17:15:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -29,6 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/hppa/stand/common

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 17:14:52 UTC 2019

Modified Files:
src/sys/arch/hppa/stand/common: pdc.c

Log Message:
Include  for DEV_BSIZE/DEV_BSHIFT


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/common/pdc.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/hppa/stand/common/pdc.c
diff -u src/sys/arch/hppa/stand/common/pdc.c:1.2 src/sys/arch/hppa/stand/common/pdc.c:1.3
--- src/sys/arch/hppa/stand/common/pdc.c:1.2	Wed Sep  5 03:32:45 2018
+++ src/sys/arch/hppa/stand/common/pdc.c	Tue Jan  8 12:14:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.c,v 1.2 2018/09/05 07:32:45 riastradh Exp $	*/
+/*	$NetBSD: pdc.c,v 1.3 2019/01/08 17:14:52 christos Exp $	*/
 
 /*	$OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $	*/
 
@@ -61,6 +61,7 @@
  *	Utah $Hdr: pdc.c 1.8 92/03/14$
  */
 
+#include 
 #include 
 #include "libsa.h"
 #include 



CVS commit: src/sys/arch/ews4800mips/stand/common

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 17:14:14 UTC 2019

Modified Files:
src/sys/arch/ews4800mips/stand/common: bfs_subr.c

Log Message:
Include  for DEV_BSIZE/DEV_BSHIFT


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ews4800mips/stand/common/bfs_subr.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/ews4800mips/stand/common/bfs_subr.c
diff -u src/sys/arch/ews4800mips/stand/common/bfs_subr.c:1.3 src/sys/arch/ews4800mips/stand/common/bfs_subr.c:1.4
--- src/sys/arch/ews4800mips/stand/common/bfs_subr.c:1.3	Mon Apr 28 16:23:18 2008
+++ src/sys/arch/ews4800mips/stand/common/bfs_subr.c	Tue Jan  8 12:14:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bfs_subr.c,v 1.3 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: bfs_subr.c,v 1.4 2019/01/08 17:14:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -31,13 +31,14 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: bfs_subr.c,v 1.3 2008/04/28 20:23:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bfs_subr.c,v 1.4 2019/01/08 17:14:14 christos Exp $");
 #ifdef _STANDALONE
 #include 
 #include 
 #include "local.h"
 #endif
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/bebox/stand/boot

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 17:13:21 UTC 2019

Modified Files:
src/sys/arch/bebox/stand/boot: wdc.c

Log Message:
Include  for DEV_BSIZE/DEV_BSHIFT


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/bebox/stand/boot/wdc.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/bebox/stand/boot/wdc.c
diff -u src/sys/arch/bebox/stand/boot/wdc.c:1.2 src/sys/arch/bebox/stand/boot/wdc.c:1.3
--- src/sys/arch/bebox/stand/boot/wdc.c:1.2	Sat Jul 11 06:32:45 2015
+++ src/sys/arch/bebox/stand/boot/wdc.c	Tue Jan  8 12:13:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.2 2015/07/11 10:32:45 kamil Exp $	*/
+/*	$NetBSD: wdc.c,v 1.3 2019/01/08 17:13:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -29,6 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/cobalt/stand/boot

2019-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  8 17:13:04 UTC 2019

Modified Files:
src/sys/arch/cobalt/stand/boot: wdc.c

Log Message:
Someone should merge all the wdc copies.
Include  for DEV_BSIZE/DEV_BSHIFT


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/cobalt/stand/boot/wdc.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/cobalt/stand/boot/wdc.c
diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.14 src/sys/arch/cobalt/stand/boot/wdc.c:1.15
--- src/sys/arch/cobalt/stand/boot/wdc.c:1.14	Thu Apr  3 14:49:52 2014
+++ src/sys/arch/cobalt/stand/boot/wdc.c	Tue Jan  8 12:13:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.14 2014/04/03 18:49:52 joerg Exp $	*/
+/*	$NetBSD: wdc.c,v 1.15 2019/01/08 17:13:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -29,6 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/dev/nvmm/x86

2019-01-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jan  8 14:43:18 UTC 2019

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c

Log Message:
Optimize: don't keep a full copy of the guest state, rather take only what
is needed. This avoids expensive memcpy's.

Also flush the V_TPR as part of the CR-state, because there is CR8 in it.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/nvmm/x86/nvmm_x86_svm.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/nvmm/x86/nvmm_x86_svm.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.12 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.13
--- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.12	Mon Jan  7 14:08:02 2019
+++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c	Tue Jan  8 14:43:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_svm.c,v 1.12 2019/01/07 14:08:02 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86_svm.c,v 1.13 2019/01/08 14:43:18 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.12 2019/01/07 14:08:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.13 2019/01/08 14:43:18 maxv Exp $");
 
 #include 
 #include 
@@ -499,9 +499,6 @@ static const size_t svm_conf_sizes[NVMM_
 };
 
 struct svm_cpudata {
-	/* x64-specific */
-	struct nvmm_x64_state state;
-
 	/* General */
 	bool shared_asid;
 	bool tlb_want_flush;
@@ -519,7 +516,7 @@ struct svm_cpudata {
 	paddr_t msrbm_pa;
 
 	/* Host state */
-	uint64_t xcr0;
+	uint64_t hxcr0;
 	uint64_t star;
 	uint64_t lstar;
 	uint64_t cstar;
@@ -533,6 +530,9 @@ struct svm_cpudata {
 	bool nmi_window_exit;
 
 	/* Guest state */
+	uint64_t gxcr0;
+	uint64_t gprs[NVMM_X64_NGPR];
+	uint64_t drs[NVMM_X64_NDR];
 	uint64_t tsc_offset;
 	struct xsave_header gfpu __aligned(16);
 };
@@ -564,7 +564,8 @@ svm_vmcb_cache_update(struct vmcb *vmcb,
 	}
 	if (flags & NVMM_X64_STATE_CRS) {
 		vmcb->ctrl.vmcb_clean &=
-		~(VMCB_CTRL_VMCB_CLEAN_CR | VMCB_CTRL_VMCB_CLEAN_CR2);
+		~(VMCB_CTRL_VMCB_CLEAN_CR | VMCB_CTRL_VMCB_CLEAN_CR2 |
+		  VMCB_CTRL_VMCB_CLEAN_TPR);
 	}
 	if (flags & NVMM_X64_STATE_DRS) {
 		vmcb->ctrl.vmcb_clean &= ~VMCB_CTRL_VMCB_CLEAN_DR;
@@ -755,12 +756,11 @@ static void
 svm_inkernel_handle_cpuid(struct nvmm_cpu *vcpu, uint64_t eax, uint64_t ecx)
 {
 	struct svm_cpudata *cpudata = vcpu->cpudata;
-	struct nvmm_x64_state *state = >state;
 
 	switch (eax) {
 	case 0x0001: /* APIC number in RBX. The rest is tunable. */
-		state->gprs[NVMM_X64_GPR_RBX] &= ~CPUID_LOCAL_APIC_ID;
-		state->gprs[NVMM_X64_GPR_RBX] |= __SHIFTIN(vcpu->cpuid,
+		cpudata->gprs[NVMM_X64_GPR_RBX] &= ~CPUID_LOCAL_APIC_ID;
+		cpudata->gprs[NVMM_X64_GPR_RBX] |= __SHIFTIN(vcpu->cpuid,
 		CPUID_LOCAL_APIC_ID);
 		break;
 	case 0x000D: /* FPU description. Not tunable. */
@@ -768,22 +768,22 @@ svm_inkernel_handle_cpuid(struct nvmm_cp
 			break;
 		}
 		cpudata->vmcb->state.rax = svm_xcr0_mask & 0x;
-		if (state->crs[NVMM_X64_CR_XCR0] & XCR0_SSE) {
-			state->gprs[NVMM_X64_GPR_RBX] = sizeof(struct fxsave);
+		if (cpudata->gxcr0 & XCR0_SSE) {
+			cpudata->gprs[NVMM_X64_GPR_RBX] = sizeof(struct fxsave);
 		} else {
-			state->gprs[NVMM_X64_GPR_RBX] = sizeof(struct save87);
+			cpudata->gprs[NVMM_X64_GPR_RBX] = sizeof(struct save87);
 		}
-		state->gprs[NVMM_X64_GPR_RBX] += 64; /* XSAVE header */
-		state->gprs[NVMM_X64_GPR_RCX] = sizeof(struct fxsave);
-		state->gprs[NVMM_X64_GPR_RDX] = svm_xcr0_mask >> 32;
+		cpudata->gprs[NVMM_X64_GPR_RBX] += 64; /* XSAVE header */
+		cpudata->gprs[NVMM_X64_GPR_RCX] = sizeof(struct fxsave);
+		cpudata->gprs[NVMM_X64_GPR_RDX] = svm_xcr0_mask >> 32;
 		break;
 	case 0x4000:
-		memcpy(>gprs[NVMM_X64_GPR_RBX], "___ ", 4);
-		memcpy(>gprs[NVMM_X64_GPR_RCX], "NVMM", 4);
-		memcpy(>gprs[NVMM_X64_GPR_RDX], " ___", 4);
+		memcpy(>gprs[NVMM_X64_GPR_RBX], "___ ", 4);
+		memcpy(>gprs[NVMM_X64_GPR_RCX], "NVMM", 4);
+		memcpy(>gprs[NVMM_X64_GPR_RDX], " ___", 4);
 		break;
 	case 0x8001: /* No SVM in ECX. The rest is tunable. */
-		state->gprs[NVMM_X64_GPR_RCX] &= ~CPUID_SVM;
+		cpudata->gprs[NVMM_X64_GPR_RCX] &= ~CPUID_SVM;
 		break;
 	default:
 		break;
@@ -796,20 +796,19 @@ svm_exit_cpuid(struct nvmm_machine *mach
 {
 	struct svm_machdata *machdata = mach->machdata;
 	struct svm_cpudata *cpudata = vcpu->cpudata;
-	struct nvmm_x64_state *state = >state;
 	struct nvmm_x86_conf_cpuid *cpuid;
 	uint64_t eax, ecx;
 	u_int descs[4];
 	size_t i;
 
 	eax = cpudata->vmcb->state.rax;
-	ecx = state->gprs[NVMM_X64_GPR_RCX];
+	ecx = cpudata->gprs[NVMM_X64_GPR_RCX];
 	x86_cpuid2(eax, ecx, descs);
 
 	cpudata->vmcb->state.rax = descs[0];
-	state->gprs[NVMM_X64_GPR_RBX] = descs[1];
-	state->gprs[NVMM_X64_GPR_RCX] = descs[2];
-	state->gprs[NVMM_X64_GPR_RDX] = descs[3];
+	cpudata->gprs[NVMM_X64_GPR_RBX] = descs[1];
+	cpudata->gprs[NVMM_X64_GPR_RCX] = descs[2];
+	cpudata->gprs[NVMM_X64_GPR_RDX] = descs[3];
 

CVS commit: src/usr.sbin/npf/npfctl

2019-01-08 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan  8 11:36:10 UTC 2019

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Actually, according to the grammar the square brackets in the "tcp
flags" are not literal, so use .Op to show that /mask is optional.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/usr.sbin/npf/npfctl/npf.conf.5

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/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.82 src/usr.sbin/npf/npfctl/npf.conf.5:1.83
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.82	Tue Jan  8 11:28:01 2019
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Tue Jan  8 11:36:10 2019
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.82 2019/01/08 11:28:01 uwe Exp $
+.\"$NetBSD: npf.conf.5,v 1.83 2019/01/08 11:36:10 uwe Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -223,7 +223,7 @@ The
 keyword can be used to match the packets against specific TCP flags,
 according to the following syntax:
 .Pp
-.D1 Ic proto Cm tcp flags Ar match Ns Li [/ Ns Ar mask Ns Li \&]
+.D1 Ic proto Cm tcp flags Ar match Ns Op Li / Ns Ar mask
 .Pp
 Where
 .Ar match



CVS commit: src/usr.sbin/npf/npfctl

2019-01-08 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan  8 11:28:01 UTC 2019

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Restore macro with effect.  Fix the real problem that prevented it to
have the effect.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/usr.sbin/npf/npfctl/npf.conf.5

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/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.81 src/usr.sbin/npf/npfctl/npf.conf.5:1.82
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.81	Tue Jan  8 10:25:26 2019
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Tue Jan  8 11:28:01 2019
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.81 2019/01/08 10:25:26 wiz Exp $
+.\"$NetBSD: npf.conf.5,v 1.82 2019/01/08 11:28:01 uwe Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -223,7 +223,7 @@ The
 keyword can be used to match the packets against specific TCP flags,
 according to the following syntax:
 .Pp
-.Dl Ic proto Cm tcp flags Ar match Ns Li [/ Ns Ar mask Ns ]
+.D1 Ic proto Cm tcp flags Ar match Ns Li [/ Ns Ar mask Ns Li \&]
 .Pp
 Where
 .Ar match



CVS commit: src/usr.sbin/npf/npfctl

2019-01-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jan  8 10:25:26 UTC 2019

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
New sentence, new line. Punctuation fixes. Remove macros without effect.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/usr.sbin/npf/npfctl/npf.conf.5

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/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.80 src/usr.sbin/npf/npfctl/npf.conf.5:1.81
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.80	Tue Jan  8 01:19:16 2019
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Tue Jan  8 10:25:26 2019
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.80 2019/01/08 01:19:16 gutteridge Exp $
+.\"$NetBSD: npf.conf.5,v 1.81 2019/01/08 10:25:26 wiz Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -89,7 +89,7 @@ The following is an example of table def
 .Dl table  type hash dynamic
 .Pp
 Currently, tables support three data storage types:
-.Cm hash,
+.Cm hash ,
 .Cm tree ,
 or
 .Cm cdb .
@@ -133,11 +133,14 @@ Three functions exist, to extract addres
 list type and IP address type:
 .Bl -tag -width "Fn ifaddrs interface" -offset indent
 .It Fn inet4 interface
-Static list.  IPv4 addresses.
+Static list.
+IPv4 addresses.
 .It Fn inet6 interface
-Static list.  IPv6 addresses.
+Static list.
+IPv6 addresses.
 .It Fn ifaddrs interface
-Dynamic list.  Both IPv4 and IPv6.
+Dynamic list.
+Both IPv4 and IPv6.
 The
 .Cm family
 keyword of a filtering rule can be used in combination to explicitly select
@@ -164,7 +167,7 @@ on wm0, and
 .Li $var2
 is the dynamic list of all the IPv4 and IPv6 addresses configured on wm0.
 The first three rules are equivalent, because with the
-.Li Ic block Ar "..." Cm on Li < Ns Ar interface Ns Li >
+.Ic block Ar "..." Cm on Li < Ns Ar interface Ns Li >
 syntax, NPF expects a direct reference to an interface, and therefore does
 not consider the extraction functions.
 The fourth and fifth rules are equivalent, for the same reason.
@@ -220,7 +223,7 @@ The
 keyword can be used to match the packets against specific TCP flags,
 according to the following syntax:
 .Pp
-.Dl Ic proto Cm tcp flags Ar match Ns Li [/ Ns Ar mask Ns Li ]
+.Dl Ic proto Cm tcp flags Ar match Ns Li [/ Ns Ar mask Ns ]
 .Pp
 Where
 .Ar match



CVS commit: src/sys/dev/pcmcia

2019-01-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jan  8 08:52:46 UTC 2019

Modified Files:
src/sys/dev/pcmcia: if_xi.c

Log Message:
u_int{8,16,32}_t -> uint{8,16,32}_t. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/pcmcia/if_xi.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/pcmcia/if_xi.c
diff -u src/sys/dev/pcmcia/if_xi.c:1.83 src/sys/dev/pcmcia/if_xi.c:1.84
--- src/sys/dev/pcmcia/if_xi.c:1.83	Mon Sep  3 16:29:33 2018
+++ src/sys/dev/pcmcia/if_xi.c	Tue Jan  8 08:52:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_xi.c,v 1.83 2018/09/03 16:29:33 riastradh Exp $ */
+/*	$NetBSD: if_xi.c,v 1.84 2019/01/08 08:52:46 msaitoh Exp $ */
 /*	OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp 	*/
 
 /*
@@ -55,7 +55,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.83 2018/09/03 16:29:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.84 2019/01/08 08:52:46 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -140,7 +140,7 @@ STATIC int xi_ioctl(struct ifnet *, u_lo
 STATIC int xi_mdi_read(device_t, int, int);
 STATIC void xi_mdi_write(device_t, int, int, int);
 STATIC int xi_mediachange(struct ifnet *);
-STATIC u_int16_t xi_get(struct xi_softc *);
+STATIC uint16_t xi_get(struct xi_softc *);
 STATIC void xi_reset(struct xi_softc *);
 STATIC void xi_set_address(struct xi_softc *);
 STATIC void xi_start(struct ifnet *);
@@ -149,7 +149,7 @@ STATIC void xi_stop(struct xi_softc *);
 STATIC void xi_watchdog(struct ifnet *);
 
 void
-xi_attach(struct xi_softc *sc, u_int8_t *myea)
+xi_attach(struct xi_softc *sc, uint8_t *myea)
 {
 	struct ifnet *ifp = >sc_ethercom.ec_if;
 
@@ -269,8 +269,8 @@ xi_intr(void *arg)
 {
 	struct xi_softc *sc = arg;
 	struct ifnet *ifp = >sc_ethercom.ec_if;
-	u_int8_t esr, rsr, isr, rx_status;
-	u_int16_t tx_status, recvcount = 0, tempint;
+	uint8_t esr, rsr, isr, rx_status;
+	uint16_t tx_status, recvcount = 0, tempint;
 
 	DPRINTF(XID_CONFIG, ("xi_intr()\n"));
 
@@ -385,13 +385,13 @@ end:
 /*
  * Pull a packet from the card into an mbuf chain.
  */
-STATIC u_int16_t
+STATIC uint16_t
 xi_get(struct xi_softc *sc)
 {
 	struct ifnet *ifp = >sc_ethercom.ec_if;
 	struct mbuf *top, **mp, *m;
-	u_int16_t pktlen, len, recvcount = 0;
-	u_int8_t *data;
+	uint16_t pktlen, len, recvcount = 0;
+	uint8_t *data;
 
 	DPRINTF(XID_CONFIG, ("xi_get()\n"));
 
@@ -447,11 +447,11 @@ xi_get(struct xi_softc *sc)
 			m->m_data = newdata;
 		}
 		len = uimin(pktlen, len);
-		data = mtod(m, u_int8_t *);
+		data = mtod(m, uint8_t *);
 		if (len > 1) {
 		len &= ~1;
 			bus_space_read_multi_2(sc->sc_bst, sc->sc_bsh, EDP,
-			(u_int16_t *)data, len>>1);
+			(uint16_t *)data, len>>1);
 		} else
 			*data = bus_space_read_1(sc->sc_bst, sc->sc_bsh, EDP);
 		m->m_len = len;
@@ -504,7 +504,7 @@ xi_mdi_pulse(struct xi_softc *sc, int da
 {
 	bus_space_tag_t bst = sc->sc_bst;
 	bus_space_handle_t bsh = sc->sc_bsh;
-	u_int8_t bit = data ? MDIO_HIGH : MDIO_LOW;
+	uint8_t bit = data ? MDIO_HIGH : MDIO_LOW;
 
 	/* First latch the data bit MDIO with clock bit MDC low...*/
 	bus_space_write_1(bst, bsh, GP2, bit | MDC_LOW);
@@ -522,7 +522,7 @@ xi_mdi_probe(struct xi_softc *sc)
 {
 	bus_space_tag_t bst = sc->sc_bst;
 	bus_space_handle_t bsh = sc->sc_bsh;
-	u_int8_t x;
+	uint8_t x;
 
 	/* Pull clock bit MDCK low... */
 	bus_space_write_1(bst, bsh, GP2, MDC_LOW);
@@ -537,11 +537,11 @@ xi_mdi_probe(struct xi_softc *sc)
 }
 
 /* Pulse out a sequence of data bits. */
-static INLINE void xi_mdi_pulse_bits(struct xi_softc *, u_int32_t, int);
+static INLINE void xi_mdi_pulse_bits(struct xi_softc *, uint32_t, int);
 static INLINE void
-xi_mdi_pulse_bits(struct xi_softc *sc, u_int32_t data, int len)
+xi_mdi_pulse_bits(struct xi_softc *sc, uint32_t data, int len)
 {
-	u_int32_t mask;
+	uint32_t mask;
 
 	for (mask = 1 << (len - 1); mask; mask >>= 1)
 		xi_mdi_pulse(sc, data & mask);
@@ -553,8 +553,8 @@ xi_mdi_read(device_t self, int phy, int 
 {
 	struct xi_softc *sc = device_private(self);
 	int i;
-	u_int32_t mask;
-	u_int32_t data = 0;
+	uint32_t mask;
+	uint32_t data = 0;
 
 	PAGE(sc, 2);
 	for (i = 0; i < 32; i++)	/* Synchronize. */
@@ -745,7 +745,7 @@ xi_start(struct ifnet *ifp)
 	bus_space_handle_t bsh = sc->sc_bsh;
 	unsigned int s, len, pad = 0;
 	struct mbuf *m0, *m;
-	u_int16_t space;
+	uint16_t space;
 
 	DPRINTF(XID_CONFIG, ("xi_start()\n"));
 
@@ -776,7 +776,7 @@ xi_start(struct ifnet *ifp)
 
 	PAGE(sc, 0);
 
-	bus_space_write_2(bst, bsh, TRS, (u_int16_t)len + pad + 2);
+	bus_space_write_2(bst, bsh, TRS, (uint16_t)len + pad + 2);
 	space = bus_space_read_2(bst, bsh, TSO) & 0x7fff;
 	if (len + pad + 2 > space) {
 		DPRINTF(XID_FIFO,
@@ -795,15 +795,15 @@ xi_start(struct ifnet *ifp)
 	 */
 	s = splhigh();
 
-	bus_space_write_2(bst, bsh, EDP, (u_int16_t)len + pad);
+	bus_space_write_2(bst, bsh, EDP, (uint16_t)len + pad);
 	for (m = m0; 

CVS commit: src/sys/dev/pcmcia

2019-01-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jan  8 08:47:21 UTC 2019

Modified Files:
src/sys/dev/pcmcia: if_awi_pcmcia.c if_malo_pcmcia.c if_ray.c
if_tr_pcmcia.c if_wi_pcmcia.c

Log Message:
 Whitespace fix.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pcmcia/if_awi_pcmcia.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pcmcia/if_malo_pcmcia.c
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pcmcia/if_ray.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pcmcia/if_tr_pcmcia.c
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pcmcia/if_wi_pcmcia.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/pcmcia/if_awi_pcmcia.c
diff -u src/sys/dev/pcmcia/if_awi_pcmcia.c:1.46 src/sys/dev/pcmcia/if_awi_pcmcia.c:1.47
--- src/sys/dev/pcmcia/if_awi_pcmcia.c:1.46	Thu Jul 14 04:19:27 2016
+++ src/sys/dev/pcmcia/if_awi_pcmcia.c	Tue Jan  8 08:47:21 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_awi_pcmcia.c,v 1.46 2016/07/14 04:19:27 msaitoh Exp $ */
+/* $NetBSD: if_awi_pcmcia.c,v 1.47 2019/01/08 08:47:21 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1999, 2004 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_awi_pcmcia.c,v 1.46 2016/07/14 04:19:27 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_awi_pcmcia.c,v 1.47 2019/01/08 08:47:21 msaitoh Exp $");
 
 #include 
 #include 
@@ -206,8 +206,8 @@ awi_pcmcia_attach(device_t parent, devic
 		am79c930_chip_init(>sc_chip, 0);
 
 	error = awi_pcmcia_enable(sc);
-if (error)
-goto fail;
+	if (error)
+		goto fail;
 	sc->sc_enabled = 1;
 
 	awi_read_bytes(sc, AWI_BANNER, sc->sc_banner, AWI_BANNER_LEN);

Index: src/sys/dev/pcmcia/if_malo_pcmcia.c
diff -u src/sys/dev/pcmcia/if_malo_pcmcia.c:1.19 src/sys/dev/pcmcia/if_malo_pcmcia.c:1.20
--- src/sys/dev/pcmcia/if_malo_pcmcia.c:1.19	Thu Nov 15 10:56:29 2018
+++ src/sys/dev/pcmcia/if_malo_pcmcia.c	Tue Jan  8 08:47:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_malo_pcmcia.c,v 1.19 2018/11/15 10:56:29 maxv Exp $	*/
+/*	$NetBSD: if_malo_pcmcia.c,v 1.20 2019/01/08 08:47:21 msaitoh Exp $	*/
 /*  $OpenBSD: if_malo.c,v 1.65 2009/03/29 21:53:53 sthen Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.19 2018/11/15 10:56:29 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.20 2019/01/08 08:47:21 msaitoh Exp $");
 
 #ifdef _MODULE
 #include 
@@ -173,7 +173,7 @@ malo_pcmcia_attach(device_t parent, devi
 	sc->sc_dev = self;
 	psc->sc_pf = pa->pf;
 
-error = pcmcia_function_configure(pa->pf, malo_pcmcia_validate_config);
+	error = pcmcia_function_configure(pa->pf, malo_pcmcia_validate_config);
 	if (error) {
 		aprint_error_dev(self, "configure failed, error=%d\n", error);
 		return;
@@ -916,7 +916,7 @@ cmalo_fw_load_main(struct malo_softc *sc
 		for (i = 0; i < bsize / 2; i++)
 			MALO_WRITE_2(sc, MALO_REG_CMD_WRITE, htole16(uc[i]));
 		MALO_WRITE_1(sc, MALO_REG_HOST_STATUS, MALO_VAL_CMD_DL_OVER);
-MALO_WRITE_2(sc, MALO_REG_CARD_INTR_CAUSE,
+		MALO_WRITE_2(sc, MALO_REG_CARD_INTR_CAUSE,
 		MALO_VAL_CMD_DL_OVER);
 
 		/* poll for an acknowledgement */

Index: src/sys/dev/pcmcia/if_ray.c
diff -u src/sys/dev/pcmcia/if_ray.c:1.90 src/sys/dev/pcmcia/if_ray.c:1.91
--- src/sys/dev/pcmcia/if_ray.c:1.90	Tue Jun 26 06:48:01 2018
+++ src/sys/dev/pcmcia/if_ray.c	Tue Jan  8 08:47:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ray.c,v 1.90 2018/06/26 06:48:01 msaitoh Exp $	*/
+/*	$NetBSD: if_ray.c,v 1.91 2019/01/08 08:47:21 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2000 Christian E. Hopps
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.90 2018/06/26 06:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.91 2019/01/08 08:47:21 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -635,7 +635,7 @@ ray_detach(device_t self, int flags)
 	RAY_DPRINTF(("%s: detach\n", device_xname(sc->sc_dev)));
 
 	if (!sc->sc_attached)
-return (0);
+		return (0);
 
 	pmf_device_deregister(self);
 

Index: src/sys/dev/pcmcia/if_tr_pcmcia.c
diff -u src/sys/dev/pcmcia/if_tr_pcmcia.c:1.27 src/sys/dev/pcmcia/if_tr_pcmcia.c:1.28
--- src/sys/dev/pcmcia/if_tr_pcmcia.c:1.27	Sun Nov 27 00:21:43 2016
+++ src/sys/dev/pcmcia/if_tr_pcmcia.c	Tue Jan  8 08:47:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tr_pcmcia.c,v 1.27 2016/11/27 00:21:43 maya Exp $	*/
+/*	$NetBSD: if_tr_pcmcia.c,v 1.28 2019/01/08 08:47:21 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tr_pcmcia.c,v 1.27 2016/11/27 00:21:43 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tr_pcmcia.c,v 1.28 2019/01/08 08:47:21 msaitoh Exp $");
 
 #include 
 #include 
@@ -149,22 +149,22 @@ tr_pcmcia_attach(device_t parent, device
 		aprint_error_dev(self, "can't allocate sram space\n");
 		goto fail3;
 	}
-if 

CVS commit: src/usr.bin/systat

2019-01-08 Thread Tom Ivar Helbekkmo
Module Name:src
Committed By:   tih
Date:   Tue Jan  8 08:22:20 UTC 2019

Modified Files:
src/usr.bin/systat: vmstat.c

Log Message:
Remove a format character from a non-format string.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/systat/vmstat.c

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

Modified files:

Index: src/usr.bin/systat/vmstat.c
diff -u src/usr.bin/systat/vmstat.c:1.83 src/usr.bin/systat/vmstat.c:1.84
--- src/usr.bin/systat/vmstat.c:1.83	Wed Dec 26 01:47:37 2018
+++ src/usr.bin/systat/vmstat.c	Tue Jan  8 08:22:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmstat.c,v 1.83 2018/12/26 01:47:37 sevan Exp $	*/
+/*	$NetBSD: vmstat.c,v 1.84 2019/01/08 08:22:20 tih Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1989, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 1/12/94";
 #endif
-__RCSID("$NetBSD: vmstat.c,v 1.83 2018/12/26 01:47:37 sevan Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.84 2019/01/08 08:22:20 tih Exp $");
 #endif /* not lint */
 
 /*
@@ -365,7 +365,7 @@ labelvmstat(void)
 		mvprintw(DISKROW, DISKCOL + 1 * DISKCOLWIDTH, "%*s", DISKCOLWIDTH, "seeks");
 		mvprintw(DISKROW, DISKCOL + 2 * DISKCOLWIDTH, "%*s", DISKCOLWIDTH, "xfers");
 		mvprintw(DISKROW, DISKCOL + 3 * DISKCOLWIDTH, "%*s", DISKCOLWIDTH, "bytes");
-		mvprintw(DISKROW, DISKCOL + 4 * DISKCOLWIDTH, "%*s", DISKCOLWIDTH, "%%busy");
+		mvprintw(DISKROW, DISKCOL + 4 * DISKCOLWIDTH, "%*s", DISKCOLWIDTH, "%busy");
 	}
 
 	/* Middle column */



CVS commit: src/sys/dev/pci

2019-01-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jan  8 08:10:10 UTC 2019

Modified Files:
src/sys/dev/pci: if_bnx.c

Log Message:
 Fix a bug that bnx_miibus_read_reg() returns wrong value when
BNX_PHY_INT_MODE_AUTO_POLLING_FLAG is set. This bug doesn't cause a real
problem because BNX_PHY_INT_MODE_AUTO_POLLING_FLAG is not set.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/if_bnx.c

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

Modified files:

Index: src/sys/dev/pci/if_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.66 src/sys/dev/pci/if_bnx.c:1.67
--- src/sys/dev/pci/if_bnx.c:1.66	Tue Jan  8 06:55:50 2019
+++ src/sys/dev/pci/if_bnx.c	Tue Jan  8 08:10:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.66 2019/01/08 06:55:50 msaitoh Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.67 2019/01/08 08:10:10 msaitoh Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.66 2019/01/08 06:55:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.67 2019/01/08 08:10:10 msaitoh Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -1019,7 +1019,7 @@ int
 bnx_miibus_read_reg(device_t dev, int phy, int reg)
 {
 	struct bnx_softc	*sc = device_private(dev);
-	uint32_t		val;
+	uint32_t		val, data;
 	int			i;
 
 	/* Make sure we are accessing the correct PHY address. */
@@ -1040,35 +1040,35 @@ bnx_miibus_read_reg(device_t dev, int ph
 	}
 
 	if (sc->bnx_phy_flags & BNX_PHY_INT_MODE_AUTO_POLLING_FLAG) {
-		val = REG_RD(sc, BNX_EMAC_MDIO_MODE);
-		val &= ~BNX_EMAC_MDIO_MODE_AUTO_POLL;
+		data = REG_RD(sc, BNX_EMAC_MDIO_MODE);
+		data &= ~BNX_EMAC_MDIO_MODE_AUTO_POLL;
 
-		REG_WR(sc, BNX_EMAC_MDIO_MODE, val);
+		REG_WR(sc, BNX_EMAC_MDIO_MODE, data);
 		REG_RD(sc, BNX_EMAC_MDIO_MODE);
 
 		DELAY(40);
 	}
 
-	val = BNX_MIPHY(phy) | BNX_MIREG(reg) |
+	data = BNX_MIPHY(phy) | BNX_MIREG(reg) |
 	BNX_EMAC_MDIO_COMM_COMMAND_READ | BNX_EMAC_MDIO_COMM_DISEXT |
 	BNX_EMAC_MDIO_COMM_START_BUSY;
-	REG_WR(sc, BNX_EMAC_MDIO_COMM, val);
+	REG_WR(sc, BNX_EMAC_MDIO_COMM, data);
 
 	for (i = 0; i < BNX_PHY_TIMEOUT; i++) {
 		DELAY(10);
 
-		val = REG_RD(sc, BNX_EMAC_MDIO_COMM);
-		if (!(val & BNX_EMAC_MDIO_COMM_START_BUSY)) {
+		data = REG_RD(sc, BNX_EMAC_MDIO_COMM);
+		if (!(data & BNX_EMAC_MDIO_COMM_START_BUSY)) {
 			DELAY(5);
 
-			val = REG_RD(sc, BNX_EMAC_MDIO_COMM);
-			val &= BNX_EMAC_MDIO_COMM_DATA;
+			data = REG_RD(sc, BNX_EMAC_MDIO_COMM);
+			data &= BNX_EMAC_MDIO_COMM_DATA;
 
 			break;
 		}
 	}
 
-	if (val & BNX_EMAC_MDIO_COMM_START_BUSY) {
+	if (data & BNX_EMAC_MDIO_COMM_START_BUSY) {
 		BNX_PRINTF(sc, "%s(%d): Error: PHY read timeout! phy = %d, "
 		"reg = 0x%04X\n", __FILE__, __LINE__, phy, reg);
 		val = 0x0;
@@ -1080,10 +1080,10 @@ bnx_miibus_read_reg(device_t dev, int ph
 	(uint16_t) reg & 0x, (uint16_t) val & 0x);
 
 	if (sc->bnx_phy_flags & BNX_PHY_INT_MODE_AUTO_POLLING_FLAG) {
-		val = REG_RD(sc, BNX_EMAC_MDIO_MODE);
-		val |= BNX_EMAC_MDIO_MODE_AUTO_POLL;
+		data = REG_RD(sc, BNX_EMAC_MDIO_MODE);
+		data |= BNX_EMAC_MDIO_MODE_AUTO_POLL;
 
-		REG_WR(sc, BNX_EMAC_MDIO_MODE, val);
+		REG_WR(sc, BNX_EMAC_MDIO_MODE, data);
 		REG_RD(sc, BNX_EMAC_MDIO_MODE);
 
 		DELAY(40);