CVS commit: src/sys/kern

2018-12-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Dec 10 07:24:49 UTC 2018

Modified Files:
src/sys/kern: subr_kleak.c

Log Message:
Improve error handling, doesn't matter a lot, but still.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/subr_kleak.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/kern/subr_kleak.c
diff -u src/sys/kern/subr_kleak.c:1.1 src/sys/kern/subr_kleak.c:1.2
--- src/sys/kern/subr_kleak.c:1.1	Sun Dec  2 21:00:13 2018
+++ src/sys/kern/subr_kleak.c	Mon Dec 10 07:24:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kleak.c,v 1.1 2018/12/02 21:00:13 maxv Exp $	*/
+/*	$NetBSD: subr_kleak.c,v 1.2 2018/12/10 07:24:49 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_kleak.c,v 1.1 2018/12/02 21:00:13 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kleak.c,v 1.2 2018/12/10 07:24:49 maxv Exp $");
 
 #include 
 #include 
@@ -244,17 +244,23 @@ kleak_init(void)
 static int
 kleak_rotate(void)
 {
+	int error = 0;
+
 	mutex_enter(&kleak_mtx);
-	kleak_index++;
+	if (kleak_index + 1 >= kleak_nrounds) {
+		error = ENOENT;
+	} else {
+		kleak_index++;
+	}
 	mutex_exit(&kleak_mtx);
 
+	if (error) {
+		return error;
+	}
+
 	/* XXX: Should be atomic. */
 	kleak_pattern_byte = kleak_pattern_list[kleak_index];
 
-	if (kleak_index >= kleak_nrounds) {
-		return ENOENT;
-	}
-
 	return 0;
 }
 



CVS commit: src/sys/dev/pci

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Dec 10 06:23:54 UTC 2018

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

Log Message:
call pci_intr_release() when pci_intr_establish_xname() fails; I got confused
by the opposite conditionals compared to other drivers

found by Masanobu SAITOH


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ichsmb.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/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.59 src/sys/dev/pci/ichsmb.c:1.60
--- src/sys/dev/pci/ichsmb.c:1.59	Sun Dec  9 19:21:17 2018
+++ src/sys/dev/pci/ichsmb.c	Mon Dec 10 06:23:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.59 2018/12/09 19:21:17 jdolecek Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.60 2018/12/10 06:23:54 jdolecek Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.59 2018/12/09 19:21:17 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.60 2018/12/10 06:23:54 jdolecek Exp $");
 
 #include 
 #include 
@@ -194,10 +194,12 @@ ichsmb_attach(device_t parent, device_t 
 			sc->sc_pihp[0], IPL_BIO, ichsmb_intr, sc,
 			device_xname(sc->sc_dev));
 			if (sc->sc_ih != NULL) {
-pci_intr_release(pa->pa_pc, sc->sc_pihp, 1);
 aprint_normal_dev(self, "interrupting at %s\n",
 intrstr);
 sc->sc_poll = 0;
+			} else {
+pci_intr_release(pa->pa_pc, sc->sc_pihp, 1);
+sc->sc_pihp = NULL;
 			}
 		}
 		if (sc->sc_poll)



CVS commit: src/external/cddl/osnet/usr.bin/ztest

2018-12-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon Dec 10 03:58:30 UTC 2018

Modified Files:
src/external/cddl/osnet/usr.bin/ztest: ztest.1

Log Message:
Describe how unaccounted changes are detected without Star Trek references, for
everyone in 2018.

Thanks to maya & gdt


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/usr.bin/ztest/ztest.1

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

Modified files:

Index: src/external/cddl/osnet/usr.bin/ztest/ztest.1
diff -u src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.3 src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.4
--- src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.3	Sat Dec  8 14:55:53 2018
+++ src/external/cddl/osnet/usr.bin/ztest/ztest.1	Mon Dec 10 03:58:30 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: ztest.1,v 1.3 2018/12/08 14:55:53 sevan Exp $
+.\" $NetBSD: ztest.1,v 1.4 2018/12/10 03:58:30 sevan Exp $
 .\"
 .\" Copyright (c) 2018 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"/
-.Dd December 8, 2018
+.Dd December 10, 2018
 .Dt ZTEST 1
 .Os
 .Sh NAME
@@ -75,6 +75,15 @@ To verify that the on-disk consistency i
 processes are killed at random with a SIGKILL signal, after which the parent
 process invokes a new child to run the test again on the same storage pool.
 .Pp
+Many of the tests record the transaction group number as part of their data.
+When reading old data, tests verify that the transaction group number is less
+than the current, open state, transaction group to ensure the consistency of
+tests and detect unaccounted changes.
+It is advised that any new tests added to
+.Nm
+should also perform the same check with transaction group numbers, if
+applicable.
+.Pp
 The main
 .Nm
 process uses an



CVS commit: src/sys/dev/i2c

2018-12-09 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Dec 10 00:31:45 UTC 2018

Modified Files:
src/sys/dev/i2c: i2c_exec.c i2cvar.h

Log Message:
Make i2c_acquire_bus() / i2c_release_bus() real symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/i2c_exec.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/i2c/i2cvar.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/i2c/i2c_exec.c
diff -u src/sys/dev/i2c/i2c_exec.c:1.10 src/sys/dev/i2c/i2c_exec.c:1.11
--- src/sys/dev/i2c/i2c_exec.c:1.10	Sat Mar  7 14:16:51 2015
+++ src/sys/dev/i2c/i2c_exec.c	Mon Dec 10 00:31:45 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i2c_exec.c,v 1.10 2015/03/07 14:16:51 jmcneill Exp $	*/
+/*	$NetBSD: i2c_exec.c,v 1.11 2018/12/10 00:31:45 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.10 2015/03/07 14:16:51 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.11 2018/12/10 00:31:45 thorpej Exp $");
 
 #include 
 #include 
@@ -54,6 +54,30 @@ static uint8_t	iic_smbus_pec(int, uint8_
 static int	i2cexec_modcmd(modcmd_t, void *);
 
 /*
+ * iic_acquire_bus:
+ *
+ *	Acquire the I2C bus for use by a client.
+ */
+int
+iic_acquire_bus(i2c_tag_t tag, int flags)
+{
+
+	return (*tag->ic_acquire_bus)(tag->ic_cookie, flags);
+}
+
+/*
+ * iic_release_bus:
+ *
+ *	Relese the I2C bus, allowing another client to use it.
+ */
+void
+iic_release_bus(i2c_tag_t tag, int flags)
+{
+
+	(*tag->ic_release_bus)(tag->ic_cookie, flags);
+}
+
+/*
  * iic_exec:
  *
  *	Simplified I2C client interface engine.

Index: src/sys/dev/i2c/i2cvar.h
diff -u src/sys/dev/i2c/i2cvar.h:1.17 src/sys/dev/i2c/i2cvar.h:1.18
--- src/sys/dev/i2c/i2cvar.h:1.17	Tue Jun 26 06:34:55 2018
+++ src/sys/dev/i2c/i2cvar.h	Mon Dec 10 00:31:45 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i2cvar.h,v 1.17 2018/06/26 06:34:55 thorpej Exp $	*/
+/*	$NetBSD: i2cvar.h,v 1.18 2018/12/10 00:31:45 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -208,11 +208,8 @@ bool	iic_use_direct_match(const struct i
  * Simplified API for clients of the i2c framework.  Definitions
  * in .
  */
-#define	iic_acquire_bus(ic, flags)	\
-	(*(ic)->ic_acquire_bus)((ic)->ic_cookie, (flags))
-#define	iic_release_bus(ic, flags)	\
-	(*(ic)->ic_release_bus)((ic)->ic_cookie, (flags))
-
+int	iic_acquire_bus(i2c_tag_t, int);
+void	iic_release_bus(i2c_tag_t, int);
 int	iic_exec(i2c_tag_t, i2c_op_t, i2c_addr_t, const void *,
 	size_t, void *, size_t, int);
 



CVS commit: src/sys/dev/usb

2018-12-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Dec 10 00:29:47 UTC 2018

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

Log Message:
Remove incorrect printout of CH340/CH341 part.

CH341 and CH340 can't be differentiated by the chip's USB firmware version.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/uchcom.c

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

Modified files:

Index: src/sys/dev/usb/uchcom.c
diff -u src/sys/dev/usb/uchcom.c:1.19 src/sys/dev/usb/uchcom.c:1.20
--- src/sys/dev/usb/uchcom.c:1.19	Mon Dec 10 00:22:13 2018
+++ src/sys/dev/usb/uchcom.c	Mon Dec 10 00:29:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uchcom.c,v 1.19 2018/12/10 00:22:13 jakllsch Exp $	*/
+/*	$NetBSD: uchcom.c,v 1.20 2018/12/10 00:29:47 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.19 2018/12/10 00:22:13 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.20 2018/12/10 00:29:47 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -74,7 +74,6 @@ int	uchcomdebug = 0;
 #define	UCHCOM_IFACE_INDEX	0
 #define	UCHCOM_CONFIG_INDEX	0
 
-#define UCHCOM_REV_CH340	0x0250
 #define UCHCOM_INPUT_BUF_SIZE	8
 
 #define UCHCOM_REQ_GET_VERSION	0x5F
@@ -272,15 +271,6 @@ uchcom_attach(device_t parent, device_t 
 	if (set_config(sc))
 		goto failed;
 
-	switch (uaa->uaa_release) {
-	case UCHCOM_REV_CH340:
-		aprint_normal_dev(self, "CH340 detected\n");
-		break;
-	default:
-		aprint_normal_dev(self, "CH341 detected\n");
-		break;
-	}
-
 	if (find_ifaces(sc, &sc->sc_iface))
 		goto failed;
 



CVS commit: src/sys/dev/usb

2018-12-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Dec 10 00:22:14 UTC 2018

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

Log Message:
Don't accumulate RX data into packets on CH341.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/uchcom.c

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

Modified files:

Index: src/sys/dev/usb/uchcom.c
diff -u src/sys/dev/usb/uchcom.c:1.18 src/sys/dev/usb/uchcom.c:1.19
--- src/sys/dev/usb/uchcom.c:1.18	Mon Dec 10 00:03:11 2018
+++ src/sys/dev/usb/uchcom.c	Mon Dec 10 00:22:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uchcom.c,v 1.18 2018/12/10 00:03:11 jakllsch Exp $	*/
+/*	$NetBSD: uchcom.c,v 1.19 2018/12/10 00:22:13 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.18 2018/12/10 00:03:11 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.19 2018/12/10 00:22:13 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -98,6 +98,9 @@ int	uchcomdebug = 0;
 #define UCHCOM_VER_30		0x30
 
 #define UCHCOM_BASE_UNKNOWN	0
+
+#define UCHCOM_BPS_PRE_IMM	0x80	/* CH341: immediate RX forwarding */
+
 #define UCHCOM_BPS_MOD_BASE	2000
 #define UCHCOM_BPS_MOD_BASE_OFS	1100
 
@@ -706,7 +709,8 @@ set_dte_rate(struct uchcom_softc *sc, ui
 		return EINVAL;
 
 	if ((err = write_reg(sc,
-			 UCHCOM_REG_BPS_PRE, dv.dv_prescaler,
+			 UCHCOM_REG_BPS_PRE,
+			 dv.dv_prescaler | UCHCOM_BPS_PRE_IMM,
 			 UCHCOM_REG_BPS_DIV, dv.dv_div)) ||
 	(err = write_reg(sc,
 			 UCHCOM_REG_BPS_MOD, dv.dv_mod,



CVS commit: src/sys/dev/usb

2018-12-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Dec 10 00:03:11 UTC 2018

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

Log Message:
Note the instance of the driver in register access trace debug messages.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/uchcom.c

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

Modified files:

Index: src/sys/dev/usb/uchcom.c
diff -u src/sys/dev/usb/uchcom.c:1.17 src/sys/dev/usb/uchcom.c:1.18
--- src/sys/dev/usb/uchcom.c:1.17	Mon Dec 12 16:47:06 2016
+++ src/sys/dev/usb/uchcom.c	Mon Dec 10 00:03:11 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uchcom.c,v 1.17 2016/12/12 16:47:06 bouyer Exp $	*/
+/*	$NetBSD: uchcom.c,v 1.18 2018/12/10 00:03:11 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.17 2016/12/12 16:47:06 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.18 2018/12/10 00:03:11 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -491,7 +491,8 @@ static __inline usbd_status
 write_reg(struct uchcom_softc *sc,
 	  uint8_t reg1, uint8_t val1, uint8_t reg2, uint8_t val2)
 {
-	DPRINTF(("uchcom: write reg 0x%02X<-0x%02X, 0x%02X<-0x%02X\n",
+	DPRINTF(("%s: write reg 0x%02X<-0x%02X, 0x%02X<-0x%02X\n",
+		 device_xname(sc->sc_dev),
 		 (unsigned)reg1, (unsigned)val1,
 		 (unsigned)reg2, (unsigned)val2));
 	return generic_control_out(
@@ -513,7 +514,8 @@ read_reg(struct uchcom_softc *sc,
 	if (err)
 		return err;
 
-	DPRINTF(("uchcom: read reg 0x%02X->0x%02X, 0x%02X->0x%02X\n",
+	DPRINTF(("%s: read reg 0x%02X->0x%02X, 0x%02X->0x%02X\n",
+		 device_xname(sc->sc_dev),
 		 (unsigned)reg1, (unsigned)buf[0],
 		 (unsigned)reg2, (unsigned)buf[1]));
 



CVS commit: src/doc

2018-12-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Dec  9 23:18:41 UTC 2018

Modified Files:
src/doc: 3RDPARTY

Log Message:
New wpa_supplicant out.


To generate a diff of this commit:
cvs rdiff -u -r1.1574 -r1.1575 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.1574 src/doc/3RDPARTY:1.1575
--- src/doc/3RDPARTY:1.1574	Sat Dec  8 22:38:06 2018
+++ src/doc/3RDPARTY	Sun Dec  9 23:18:41 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1574 2018/12/08 22:38:06 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1575 2018/12/09 23:18:41 maya Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1431,7 +1431,7 @@ For the data files, do use external/publ
 
 Package:	wpa_supplicant/hostapd
 Version:	2.6
-Current Vers:	2.6
+Current Vers:	2.7
 Maintainer:	Jouni Malinen 
 Archive Site:	http://w1.fi/releases/
 Home Page:	http://w1.fi/wpa_supplicant/



CVS commit: src/sys/kern

2018-12-09 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Dec  9 23:05:02 UTC 2018

Modified Files:
src/sys/kern: sys_pset.c

Log Message:
Handle the case when a CPU is assigned to a set it is already a member of.
Previously this would trigger an assertion failure.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/sys_pset.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/kern/sys_pset.c
diff -u src/sys/kern/sys_pset.c:1.20 src/sys/kern/sys_pset.c:1.21
--- src/sys/kern/sys_pset.c:1.20	Mon Sep  3 16:29:35 2018
+++ src/sys/kern/sys_pset.c	Sun Dec  9 23:05:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pset.c,v 1.20 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: sys_pset.c,v 1.21 2018/12/09 23:05:02 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2008, Mindaugas Rasiukevicius 
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_pset.c,v 1.20 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pset.c,v 1.21 2018/12/09 23:05:02 mlelstv Exp $");
 
 #include 
 
@@ -352,6 +352,12 @@ sys_pset_assign(struct lwp *l, const str
 		/* FALLTHROUGH */
 	default:
 		/*
+		 * Just finish if old and new processor-sets are
+		 * the same.
+		 */
+		if (spc->spc_psid == psid)
+			break;
+		/*
 		 * Ensure at least one CPU stays in the default set,
 		 * and that specified CPU is not offline.
 		 */



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 21:39:48 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: aes.inc

Log Message:
add new file (Robert Swindells)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc:1.2	Wed Mar  7 11:05:44 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc	Sun Dec  9 16:39:48 2018
@@ -1,4 +1,6 @@
 .PATH.S: ${.PARSEDIR}
-#AES_SRCS = aesv8-armx.S aes_cbc.c
-#AESCPPFLAGS = -DAES_ASM
+#AES_SRCS = aesv8-armx.S aes_cbc.c vpaes-armv8.S
+#AESCPPFLAGS = -DAES_ASM -DVPAES_ASM
+AES_SRCS = aes_core.c aes_cbc.c vpaes-armv8.S
+AESCPPFLAGS = -DVPAES_ASM
 .include "../../aes.inc"



CVS commit: src/sys/uvm

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 20:45:37 UTC 2018

Modified Files:
src/sys/uvm: uvm_bio.c

Log Message:
for direct map case, avoid PGO_NOBLOCKALLOC when writing, it makes
genfs_getpages() return unallocated pages using the zero page and
PG_RDONLY; the old code relied on fault logic to get it allocated, which
the direct case can't rely on

instead just allocate the blocks right away; pass PGO_JOURNALLOCKED
so that code wouldn't try to take wapbl lock, this code path is called
with it already held

this should fix KASSERT() due to PG_RDONLY on write with wapbl

towards resolution of PR kern/53124


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/uvm/uvm_bio.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/uvm/uvm_bio.c
diff -u src/sys/uvm/uvm_bio.c:1.98 src/sys/uvm/uvm_bio.c:1.99
--- src/sys/uvm/uvm_bio.c:1.98	Tue Nov 20 20:07:19 2018
+++ src/sys/uvm/uvm_bio.c	Sun Dec  9 20:45:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_bio.c,v 1.98 2018/11/20 20:07:19 jdolecek Exp $	*/
+/*	$NetBSD: uvm_bio.c,v 1.99 2018/12/09 20:45:37 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.98 2018/11/20 20:07:19 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.99 2018/12/09 20:45:37 jdolecek Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_ubc.h"
@@ -814,8 +814,7 @@ ubc_alloc_direct(struct uvm_object *uobj
 {
 	voff_t pgoff;
 	int error;
-	int gpflags = flags | PGO_NOTIMESTAMP | PGO_SYNCIO | PGO_ALLPAGES
-	| PGO_NOBLOCKALLOC;
+	int gpflags = flags | PGO_NOTIMESTAMP | PGO_SYNCIO | PGO_ALLPAGES;
 	int access_type = VM_PROT_READ;
 	UVMHIST_FUNC("ubc_alloc_direct"); UVMHIST_CALLED(ubchist);
 
@@ -826,8 +825,15 @@ ubc_alloc_direct(struct uvm_object *uobj
 		KASSERT(!UVM_OBJ_NEEDS_WRITEFAULT(uobj));
 #endif
 
-		gpflags |= PGO_PASTEOF;
+		/*
+		 * Tell genfs_getpages() we already have the journal lock,
+		 * allow allocation past current EOF.
+		 */
+		gpflags |= PGO_JOURNALLOCKED | PGO_PASTEOF;
 		access_type |= VM_PROT_WRITE;
+	} else {
+		/* Don't need the empty blocks allocated, PG_RDONLY is okay */
+		gpflags |= PGO_NOBLOCKALLOC;
 	}
 
 	pgoff = (offset & PAGE_MASK);



CVS commit: src/sys/uvm

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 20:33:04 UTC 2018

Modified Files:
src/sys/uvm: uvm_pager.h

Log Message:
update comment - PGO_JOURNALLOCKED now supported for 'get' too


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/uvm/uvm_pager.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/uvm/uvm_pager.h
diff -u src/sys/uvm/uvm_pager.h:1.44 src/sys/uvm/uvm_pager.h:1.45
--- src/sys/uvm/uvm_pager.h:1.44	Fri Jan 13 04:43:16 2017
+++ src/sys/uvm/uvm_pager.h	Sun Dec  9 20:33:04 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pager.h,v 1.44 2017/01/13 04:43:16 christos Exp $	*/
+/*	$NetBSD: uvm_pager.h,v 1.45 2018/12/09 20:33:04 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -146,7 +146,7 @@ struct uvm_pagerops {
 /* if PGO_FREE is not set then the pages stay where they are. */
 
 #define PGO_ALLPAGES	0x010	/* flush whole object/get all pages */
-#define PGO_JOURNALLOCKED 0x020	/* journal is already locked [put] */
+#define PGO_JOURNALLOCKED 0x020	/* journal is already locked [get/put] */
 #define PGO_LOCKED	0x040	/* fault data structures are locked [get] */
 #define PGO_BUSYFAIL	0x080	/* fail if a page is busy [put] */
 #define PGO_OVERWRITE	0x200	/* pages will be overwritten before unlocked */



CVS commit: src/sys/miscfs/genfs

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 20:32:37 UTC 2018

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
support flag PGO_JOURNALLOCKED also for genfs_getpages()


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.72 src/sys/miscfs/genfs/genfs_io.c:1.73
--- src/sys/miscfs/genfs/genfs_io.c:1.72	Mon May 28 21:04:38 2018
+++ src/sys/miscfs/genfs/genfs_io.c	Sun Dec  9 20:32:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_io.c,v 1.72 2018/05/28 21:04:38 chs Exp $	*/
+/*	$NetBSD: genfs_io.c,v 1.73 2018/12/09 20:32:37 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.72 2018/05/28 21:04:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.73 2018/12/09 20:32:37 jdolecek Exp $");
 
 #include 
 #include 
@@ -128,6 +128,8 @@ genfs_getpages(void *v)
 	const bool memwrite = (ap->a_access_type & VM_PROT_WRITE) != 0;
 	const bool overwrite = (flags & PGO_OVERWRITE) != 0;
 	const bool blockalloc = memwrite && (flags & PGO_NOBLOCKALLOC) == 0;
+	const bool need_wapbl = (vp->v_mount->mnt_wapbl &&
+			(flags & PGO_JOURNALLOCKED) == 0);
 	const bool glocked = (flags & PGO_GLOCKHELD) != 0;
 	bool holds_wapbl = false;
 	struct mount *trans_mount = NULL;
@@ -313,7 +315,7 @@ startover:
 		 * XXX: This assumes that we come here only via
 		 * the mmio path
 		 */
-		if (blockalloc && vp->v_mount->mnt_wapbl) {
+		if (blockalloc && need_wapbl) {
 			error = WAPBL_BEGIN(trans_mount);
 			if (error)
 goto out_err_free;



CVS commit: src/lib/libc/stdlib

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 20:29:53 UTC 2018

Modified Files:
src/lib/libc/stdlib: getopt_long.3

Log Message:
fix grammar.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdlib/getopt_long.3

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

Modified files:

Index: src/lib/libc/stdlib/getopt_long.3
diff -u src/lib/libc/stdlib/getopt_long.3:1.19 src/lib/libc/stdlib/getopt_long.3:1.20
--- src/lib/libc/stdlib/getopt_long.3:1.19	Mon Jul  3 17:32:50 2017
+++ src/lib/libc/stdlib/getopt_long.3	Sun Dec  9 15:29:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getopt_long.3,v 1.19 2017/07/03 21:32:50 wiz Exp $
+.\"	$NetBSD: getopt_long.3,v 1.20 2018/12/09 20:29:53 christos Exp $
 .\"
 .\" Copyright (c) 1988, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)getopt.3	8.5 (Berkeley) 4/27/95
 .\"
-.Dd July 2, 2007
+.Dd December 9, 2018
 .Dt GETOPT_LONG 3
 .Os
 .Sh NAME
@@ -113,7 +113,7 @@ The
 field should be one of:
 .Bl -tag -width "optional_argument"
 .It Li no_argument
-no argument to the option is expect.
+no argument to the option is expected.
 .It Li required_argument
 an argument to the option is required.
 .It Li optional_argument



CVS commit: src/sys/dev

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 19:21:17 UTC 2018

Modified Files:
src/sys/dev/i2c: i2c.c
src/sys/dev/pci: ichsmb.c

Log Message:
try to detach on shutdown; for now the only practical reason is to test that
the driver detach paths work


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/i2c/i2c.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ichsmb.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/i2c/i2c.c
diff -u src/sys/dev/i2c/i2c.c:1.66 src/sys/dev/i2c/i2c.c:1.67
--- src/sys/dev/i2c/i2c.c:1.66	Tue Jun 26 06:34:55 2018
+++ src/sys/dev/i2c/i2c.c	Sun Dec  9 19:21:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i2c.c,v 1.66 2018/06/26 06:34:55 thorpej Exp $	*/
+/*	$NetBSD: i2c.c,v 1.67 2018/12/09 19:21:16 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.66 2018/06/26 06:34:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.67 2018/12/09 19:21:16 jdolecek Exp $");
 
 #include 
 #include 
@@ -844,8 +844,9 @@ iic_ioctl(dev_t dev, u_long cmd, void *d
 }
 
 
-CFATTACH_DECL2_NEW(iic, sizeof(struct iic_softc),
-iic_match, iic_attach, iic_detach, NULL, iic_rescan, iic_child_detach);
+CFATTACH_DECL3_NEW(iic, sizeof(struct iic_softc),
+iic_match, iic_attach, iic_detach, NULL, iic_rescan, iic_child_detach,
+DVF_DETACH_SHUTDOWN);
 
 MODULE(MODULE_CLASS_DRIVER, iic, "i2cexec,i2c_bitbang");
 

Index: src/sys/dev/pci/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.58 src/sys/dev/pci/ichsmb.c:1.59
--- src/sys/dev/pci/ichsmb.c:1.58	Sun Dec  9 19:16:10 2018
+++ src/sys/dev/pci/ichsmb.c	Sun Dec  9 19:21:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.58 2018/12/09 19:16:10 jdolecek Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.59 2018/12/09 19:21:17 jdolecek Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.58 2018/12/09 19:16:10 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.59 2018/12/09 19:21:17 jdolecek Exp $");
 
 #include 
 #include 
@@ -91,7 +91,7 @@ static int	ichsmb_intr(void *);
 
 CFATTACH_DECL3_NEW(ichsmb, sizeof(struct ichsmb_softc),
 ichsmb_match, ichsmb_attach, ichsmb_detach, NULL, ichsmb_rescan,
-ichsmb_chdet, 0);
+ichsmb_chdet, DVF_DETACH_SHUTDOWN);
 
 
 static int



CVS commit: src/sys/dev/pci

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 19:16:10 UTC 2018

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

Log Message:
convert to pci_intr_alloc() to possibly allow MSI/MSI-X; has no effect
on my system, where the device only supports INTx


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/ichsmb.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/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.57 src/sys/dev/pci/ichsmb.c:1.58
--- src/sys/dev/pci/ichsmb.c:1.57	Mon Apr  9 15:36:00 2018
+++ src/sys/dev/pci/ichsmb.c	Sun Dec  9 19:16:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.57 2018/04/09 15:36:00 msaitoh Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.58 2018/12/09 19:16:10 jdolecek Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.57 2018/04/09 15:36:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.58 2018/12/09 19:16:10 jdolecek Exp $");
 
 #include 
 #include 
@@ -60,6 +60,7 @@ struct ichsmb_softc {
 	pci_chipset_tag_t	sc_pc;
 	void *			sc_ih;
 	int			sc_poll;
+	pci_intr_handle_t	*sc_pihp;
 
 	struct i2c_controller	sc_i2c_tag;
 	kmutex_t 		sc_i2c_mutex;
@@ -154,7 +155,6 @@ ichsmb_attach(device_t parent, device_t 
 	struct ichsmb_softc *sc = device_private(self);
 	struct pci_attach_args *pa = aux;
 	pcireg_t conf;
-	pci_intr_handle_t ih;
 	const char *intrstr = NULL;
 	char intrbuf[PCI_INTRSTR_LEN];
 	int flags;
@@ -187,12 +187,14 @@ ichsmb_attach(device_t parent, device_t 
 		aprint_normal_dev(self, "interrupting at SMI\n");
 	} else {
 		/* Install interrupt handler */
-		if (pci_intr_map(pa, &ih) == 0) {
-			intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf,
-			sizeof(intrbuf));
-			sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, ih,
-			IPL_BIO, ichsmb_intr, sc, device_xname(sc->sc_dev));
+		if (pci_intr_alloc(pa, &sc->sc_pihp, NULL, 0) == 0) {
+			intrstr = pci_intr_string(pa->pa_pc, sc->sc_pihp[0],
+			intrbuf, sizeof(intrbuf));
+			sc->sc_ih = pci_intr_establish_xname(pa->pa_pc,
+			sc->sc_pihp[0], IPL_BIO, ichsmb_intr, sc,
+			device_xname(sc->sc_dev));
 			if (sc->sc_ih != NULL) {
+pci_intr_release(pa->pa_pc, sc->sc_pihp, 1);
 aprint_normal_dev(self, "interrupting at %s\n",
 intrstr);
 sc->sc_poll = 0;
@@ -251,8 +253,15 @@ ichsmb_detach(device_t self, int flags)
 
 	mutex_destroy(&sc->sc_i2c_mutex);
 
-	if (sc->sc_ih)
+	if (sc->sc_ih) {
 		pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
+		sc->sc_ih = NULL;
+	}
+
+	if (sc->sc_pihp) {
+		pci_intr_release(sc->sc_pc, sc->sc_pihp, 1);
+		sc->sc_pihp = NULL;
+	}
 
 	bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_size);
 



CVS commit: src/external/apache2/mDNSResponder

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 19:03:42 UTC 2018

Modified Files:
src/external/apache2/mDNSResponder: Makefile.inc

Log Message:
Don't hard-code the path


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/mDNSResponder/Makefile.inc

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

Modified files:

Index: src/external/apache2/mDNSResponder/Makefile.inc
diff -u src/external/apache2/mDNSResponder/Makefile.inc:1.2 src/external/apache2/mDNSResponder/Makefile.inc:1.3
--- src/external/apache2/mDNSResponder/Makefile.inc:1.2	Wed Sep 30 20:22:03 2009
+++ src/external/apache2/mDNSResponder/Makefile.inc	Sun Dec  9 14:03:42 2018
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.2 2009/10/01 00:22:03 tsarna Exp $
+# $NetBSD: Makefile.inc,v 1.3 2018/12/09 19:03:42 christos Exp $
 
 .include 
 
-DIST=	${NETBSDSRCDIR}/external/apache2/mDNSResponder/dist
+DIST:=	${.PARSEDIR}/dist
 
 # IPv6 support.
 .if ${MKINET6} == "no"



CVS commit: src/external/cddl/osnet/dist/cmd/zdb

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 18:01:01 UTC 2018

Modified Files:
src/external/cddl/osnet/dist/cmd/zdb: zdb.c

Log Message:
fix printf warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/dist/cmd/zdb/zdb.c

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

Modified files:

Index: src/external/cddl/osnet/dist/cmd/zdb/zdb.c
diff -u src/external/cddl/osnet/dist/cmd/zdb/zdb.c:1.7 src/external/cddl/osnet/dist/cmd/zdb/zdb.c:1.8
--- src/external/cddl/osnet/dist/cmd/zdb/zdb.c:1.7	Mon May 28 17:05:04 2018
+++ src/external/cddl/osnet/dist/cmd/zdb/zdb.c	Sun Dec  9 13:01:01 2018
@@ -1144,8 +1144,8 @@ dump_history(spa_t *spa)
 			(void) snprintf(internalstr,
 			sizeof (internalstr),
 			"[internal %s txg:%lld] %s",
-			zfs_history_event_names[ievent], txg,
-			intstr);
+			zfs_history_event_names[ievent], 
+			(u_longlong_t)txg, intstr);
 			cmd = internalstr;
 		}
 		tsec = time;
@@ -2048,7 +2048,7 @@ dump_uberblock(uberblock_t *ub, const ch
 {
 	time_t timestamp = ub->ub_timestamp;
 
-	(void) printf(header ? header : "");
+	(void) printf("%s", header);
 	(void) printf("\tmagic = %016llx\n", (u_longlong_t)ub->ub_magic);
 	(void) printf("\tversion = %llu\n", (u_longlong_t)ub->ub_version);
 	(void) printf("\ttxg = %llu\n", (u_longlong_t)ub->ub_txg);
@@ -2060,7 +2060,7 @@ dump_uberblock(uberblock_t *ub, const ch
 		snprintf_blkptr(blkbuf, sizeof (blkbuf), &ub->ub_rootbp);
 		(void) printf("\trootbp = %s\n", blkbuf);
 	}
-	(void) printf(footer ? footer : "");
+	(void) printf("%s", footer);
 }
 
 static void



CVS commit: src/sbin/newfs_udf

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 17:52:48 UTC 2018

Modified Files:
src/sbin/newfs_udf: udf_create.c

Log Message:
Address of packed member might not be aligned.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/newfs_udf/udf_create.c

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

Modified files:

Index: src/sbin/newfs_udf/udf_create.c
diff -u src/sbin/newfs_udf/udf_create.c:1.25 src/sbin/newfs_udf/udf_create.c:1.26
--- src/sbin/newfs_udf/udf_create.c:1.25	Tue Jun 16 19:18:55 2015
+++ src/sbin/newfs_udf/udf_create.c	Sun Dec  9 12:52:48 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_create.c,v 1.25 2015/06/16 23:18:55 christos Exp $ */
+/* $NetBSD: udf_create.c,v 1.26 2018/12/09 17:52:48 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -30,7 +30,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: udf_create.c,v 1.25 2015/06/16 23:18:55 christos Exp $");
+__RCSID("$NetBSD: udf_create.c,v 1.26 2018/12/09 17:52:48 christos Exp $");
 
 #include 
 #include 
@@ -1720,10 +1720,10 @@ udf_extattr_append_internal(union dscrpt
 	struct extfile_entry   *efe;
 	struct extattrhdr_desc *extattrhdr;
 	struct impl_extattr_entry *implext;
-	uint32_t impl_attr_loc, appl_attr_loc, l_ea, a_l, exthdr_len;
-	uint32_t *l_eap, l_ad;
+	uint32_t impl_attr_loc, appl_attr_loc, l_ea, l_ad, a_l;
 	uint16_t *spos;
 	uint8_t *bpos, *data;
+	void *l_eap;
 
 	if (udf_rw16(dscr->tag.id) == TAGID_FENTRY) {
 		fe= &dscr->fe;
@@ -1741,20 +1741,22 @@ udf_extattr_append_internal(union dscrpt
 
 	/* should have a header! */
 	extattrhdr = (struct extattrhdr_desc *) data;
-	l_ea = udf_rw32(*l_eap);
+	memcpy(&l_ea, l_eap, sizeof(l_ea));
+	l_ea = udf_rw32(l_ea);
 	if (l_ea == 0) {
+		uint32_t exthdr_len;
 		assert(l_ad == 0);
 		/* create empty extended attribute header */
-		exthdr_len = sizeof(struct extattrhdr_desc);
+		l_ea = sizeof(struct extattrhdr_desc);
+		exthdr_len = udf_rw32(l_ea);
 
 		udf_inittag(&extattrhdr->tag, TAGID_EXTATTR_HDR, /* loc */ 0);
-		extattrhdr->impl_attr_loc = udf_rw32(exthdr_len);
-		extattrhdr->appl_attr_loc = udf_rw32(exthdr_len);
+		extattrhdr->impl_attr_loc = exthdr_len;
+		extattrhdr->appl_attr_loc = exthdr_len;
 		extattrhdr->tag.desc_crc_len = udf_rw16(8);
 
 		/* record extended attribute header length */
-		l_ea = exthdr_len;
-		*l_eap = udf_rw32(l_ea);
+		memcpy(l_eap, &exthdr_len, sizeof(exthdr_len));
 	}
 
 	/* extract locations */
@@ -1787,7 +1789,7 @@ udf_extattr_append_internal(union dscrpt
 	assert(appl_attr_loc == l_ea);
 
 	/* append the attribute at the end of the current space */
-	bpos = data + udf_rw32(*l_eap);
+	bpos = data + l_ea;
 	a_l  = udf_rw32(extattr->a_l);
 
 	/* update impl. attribute locations */
@@ -1802,7 +1804,8 @@ udf_extattr_append_internal(union dscrpt
 	/* copy and advance */
 	memcpy(bpos, extattr, a_l);
 	l_ea += a_l;
-	*l_eap = udf_rw32(l_ea);
+	l_ea = udf_rw32(l_ea);
+	memcpy(l_eap, &l_ea, sizeof(l_ea));
 
 	/* do the `dance` again backwards */
 	if (context.dscrver != 2) {



CVS commit: src/bin/sh

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 17:33:38 UTC 2018

Modified Files:
src/bin/sh: parser.c

Log Message:
comment out unused.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/bin/sh/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/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.157 src/bin/sh/parser.c:1.158
--- src/bin/sh/parser.c:1.157	Mon Dec  3 01:41:30 2018
+++ src/bin/sh/parser.c	Sun Dec  9 12:33:38 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.157 2018/12/03 06:41:30 kre Exp $	*/
+/*	$NetBSD: parser.c,v 1.158 2018/12/09 17:33:38 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.157 2018/12/03 06:41:30 kre Exp $");
+__RCSID("$NetBSD: parser.c,v 1.158 2018/12/09 17:33:38 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -1230,6 +1230,7 @@ currentstate(VSS *stack)
 	return &stack->tokenstate[stack->cur];
 }
 
+#ifdef notdef
 static inline struct tokenstate *
 prevstate(VSS *stack)
 {
@@ -1239,6 +1240,7 @@ prevstate(VSS *stack)
 		return &stack->tokenstate[0];
 	return &stack->prev->tokenstate[LEVELS_PER_BLOCK - 1];
 }
+#endif
 
 static inline VSS *
 bump_state_level(VSS *stack)
@@ -1307,9 +1309,11 @@ cleanup_state_stack(VSS *stack)
  */
 #define	ISDBLQUOTE()	(currentstate(stack)->ts_quoted & QS)
 #define	SETDBLQUOTE()	(currentstate(stack)->ts_quoted = QS | DQ)
+#ifdef notdef
 #define	CLRDBLQUOTE()	(currentstate(stack)->ts_quoted =		\
 			stack->cur != 0 || stack->prev ?		\
 prevstate(stack)->ts_quoted & QF : 0)
+#endif
 
 /*
  * This set are just to avoid excess typing and line lengths...



CVS commit: src/sys/dev/ic

2018-12-09 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Dec  9 16:00:40 UTC 2018

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

Log Message:
sparc64 doesn't have a scalar bus_space_handle_t, so cope with this.
Also, add a comment about why we're using the dummy / nil space handle
in the first place.


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/sys/dev/ic/com.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/com.c
diff -u src/sys/dev/ic/com.c:1.352 src/sys/dev/ic/com.c:1.353
--- src/sys/dev/ic/com.c:1.352	Sat Dec  8 21:14:37 2018
+++ src/sys/dev/ic/com.c	Sun Dec  9 16:00:40 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.352 2018/12/08 21:14:37 thorpej Exp $ */
+/* $NetBSD: com.c,v 1.353 2018/12/09 16:00:40 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.352 2018/12/08 21:14:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.353 2018/12/09 16:00:40 thorpej Exp $");
 
 #include "opt_com.h"
 #include "opt_ddb.h"
@@ -2508,7 +2508,16 @@ comcnattach(bus_space_tag_t iot, bus_add
 {
 	struct com_regs	regs;
 
-	com_init_regs(®s, iot, (bus_space_handle_t)0/*XXX*/, iobase);
+	/*XXX*/
+	bus_space_handle_t dummy_bsh;
+	memset(&dummy_bsh, 0, sizeof(dummy_bsh));
+
+	/*
+	 * dummy_bsh required because com_init_regs() wants it.  A
+	 * real bus_space_handle will be filled in by cominit() later.
+	 * XXXJRT Detangle this mess eventually, plz.
+	 */
+	com_init_regs(®s, iot, dummy_bsh/*XXX*/, iobase);
 
 	return comcnattach1(®s, rate, frequency, type, cflag);
 }



CVS commit: src

2018-12-09 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sun Dec  9 15:08:06 UTC 2018

Modified Files:
src/distrib/sets/lists/comp: ad.aarch64
src/sys/arch/aarch64/include: Makefile

Log Message:
Install aarch64/sljit_machdep.h.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/lists/comp/ad.aarch64
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/include/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.aarch64
diff -u src/distrib/sets/lists/comp/ad.aarch64:1.24 src/distrib/sets/lists/comp/ad.aarch64:1.25
--- src/distrib/sets/lists/comp/ad.aarch64:1.24	Tue Aug 14 14:48:01 2018
+++ src/distrib/sets/lists/comp/ad.aarch64	Sun Dec  9 15:08:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.24 2018/08/14 14:48:01 rjs Exp $
+# $NetBSD: ad.aarch64,v 1.25 2018/12/09 15:08:05 alnsn Exp $
 ./usr/include/aarch64comp-c-include
 ./usr/include/aarch64/ansi.h			comp-c-include
 ./usr/include/aarch64/aout_machdep.h		comp-c-include
@@ -42,6 +42,7 @@
 ./usr/include/aarch64/rwlock.h			comp-c-include
 ./usr/include/aarch64/setjmp.h			comp-c-include
 ./usr/include/aarch64/signal.h			comp-c-include
+./usr/include/aarch64/sljit_machdep.h		comp-c-include
 ./usr/include/aarch64/sysarch.h			comp-c-include
 ./usr/include/aarch64/trap.h			comp-obsolete		obsolete
 ./usr/include/aarch64/types.h			comp-c-include

Index: src/sys/arch/aarch64/include/Makefile
diff -u src/sys/arch/aarch64/include/Makefile:1.2 src/sys/arch/aarch64/include/Makefile:1.3
--- src/sys/arch/aarch64/include/Makefile:1.2	Sun Apr  1 04:35:03 2018
+++ src/sys/arch/aarch64/include/Makefile	Sun Dec  9 15:08:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/04/01 04:35:03 ryo Exp $
+# $NetBSD: Makefile,v 1.3 2018/12/09 15:08:05 alnsn Exp $
 
 INCSDIR= /usr/include/aarch64
 
@@ -16,7 +16,7 @@ INCS=	ansi.h aout_machdep.h armreg.h asm
 	param.h pcb.h pmap.h \
 	proc.h profile.h pte.h ptrace.h \
 	reg.h rwlock.h \
-	setjmp.h signal.h sysarch.h \
+	setjmp.h signal.h sljit_machdep.h sysarch.h \
 	types.h \
 	vmparam.h \
 	wchar_limits.h



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

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 11:52:11 UTC 2018

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
remove 'NOT WORKING' for ena(4) - while it was not yet confirmed working
on x86, it already is confirmed working on aarm64 so chances are high
it will work for x86 too


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/amd64/conf/ALL

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

Modified files:

Index: src/sys/arch/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.108 src/sys/arch/amd64/conf/ALL:1.109
--- src/sys/arch/amd64/conf/ALL:1.108	Sat Nov 24 18:23:29 2018
+++ src/sys/arch/amd64/conf/ALL	Sun Dec  9 11:52:11 2018
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.108 2018/11/24 18:23:29 bouyer Exp $
+# $NetBSD: ALL,v 1.109 2018/12/09 11:52:11 jdolecek Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.108 $"
+#ident		"ALL-$Revision: 1.109 $"
 
 maxusers	64		# estimated number of users
 
@@ -952,7 +952,7 @@ bnx*	at pci? dev ? function ?	# Broadcom
 bwi*	at pci? dev ? function ?	# Broadcom BCM43xx wireless
 cas*	at pci? dev ? function ?	# Sun Cassini/Cassini+ Ethernet
 dge*	at pci? dev ? function ?	# Intel 82597 10GbE LR
-ena*	at pci? dev ? function ?	# NOT WORKING - Amazon Elastic Network Adapter
+ena*	at pci? dev ? function ?	# Amazon Elastic Network Adapter
 ep*	at pci? dev ? function ?	# 3Com 3c59x
 epic*	at pci? dev ? function ?	# SMC EPIC/100 Ethernet
 esh*	at pci? dev ? function ?	# Essential HIPPI card



CVS commit: src/sys/dev/pci/cxgb

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 11:49:07 UTC 2018

Modified Files:
src/sys/dev/pci/cxgb: cxgb_main.c

Log Message:
use pci_intr_establish_xname()

XXX due to 2008-01-17 '10 gigabit Chelsio cards now compile and work, although
XXX not very well yet' commit this looks like having worked in past, but since
XXX ~2010 received only mechanical updates, and currently it's unreferenced
XXX and uncompilable - does it make sense to keep the driver around?


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/cxgb/cxgb_main.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/cxgb/cxgb_main.c
diff -u src/sys/dev/pci/cxgb/cxgb_main.c:1.6 src/sys/dev/pci/cxgb/cxgb_main.c:1.7
--- src/sys/dev/pci/cxgb/cxgb_main.c:1.6	Mon Sep  3 16:29:32 2018
+++ src/sys/dev/pci/cxgb/cxgb_main.c	Sun Dec  9 11:49:06 2018
@@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE.
 ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cxgb_main.c,v 1.6 2018/09/03 16:29:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cxgb_main.c,v 1.7 2018/12/09 11:49:06 jdolecek Exp $");
 
 #include 
 #include 
@@ -640,8 +640,8 @@ cxgb_setup_msix(adapter_t *sc, int msix_
 printf("cxgb_setup_msix(%d): pci_intr_map() failed\n", __LINE__);
 return (EINVAL);
 }
-sc->intr_cookie = pci_intr_establish(sc->pa.pa_pc, sc->intr_handle,
-IPL_NET, cxgb_async_intr, sc);
+sc->intr_cookie = pci_intr_establish_xname(sc->pa.pa_pc, sc->intr_handle,
+IPL_NET, cxgb_async_intr, sc, device_xname(sc->dev));
 if (sc->intr_cookie == NULL)
 {
 printf("cxgb_setup_msix(%d): pci_intr_establish() failed\n", __LINE__);
@@ -1124,9 +1124,9 @@ cxgb_up(struct adapter *sc)
 goto out;
 }
 device_printf(sc->dev, "allocated intr_handle=%d\n", sc->intr_handle);
-sc->intr_cookie = pci_intr_establish(sc->pa.pa_pc,
+sc->intr_cookie = pci_intr_establish_xname(sc->pa.pa_pc,
 sc->intr_handle, IPL_NET,
-sc->cxgb_intr, sc);
+sc->cxgb_intr, sc, device_xname(sc->dev));
 if (sc->intr_cookie == NULL)
 {
 device_printf(sc->dev, "Cannot establish interrupt\n");



CVS commit: src/sys/dev/pci/bktr

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 11:22:35 UTC 2018

Modified Files:
src/sys/dev/pci/bktr: bktr_os.c

Log Message:
use pci_intr_establish_xname()


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/bktr/bktr_os.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/bktr/bktr_os.c
diff -u src/sys/dev/pci/bktr/bktr_os.c:1.67 src/sys/dev/pci/bktr/bktr_os.c:1.68
--- src/sys/dev/pci/bktr/bktr_os.c:1.67	Thu Jul 14 10:19:06 2016
+++ src/sys/dev/pci/bktr/bktr_os.c	Sun Dec  9 11:22:35 2018
@@ -1,6 +1,6 @@
 /* $SourceForge: bktr_os.c,v 1.5 2003/03/11 23:11:25 thomasklausner Exp $ */
 
-/*	$NetBSD: bktr_os.c,v 1.67 2016/07/14 10:19:06 msaitoh Exp $	*/
+/*	$NetBSD: bktr_os.c,v 1.68 2018/12/09 11:22:35 jdolecek Exp $	*/
 /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp$ */
 
 /*
@@ -51,7 +51,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.67 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.68 2018/12/09 11:22:35 jdolecek Exp $");
 
 #ifdef __FreeBSD__
 #include "bktr.h"
@@ -1506,8 +1506,8 @@ bktr_attach(device_t parent, device_t se
 		return;
 	}
 	intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, sizeof(intrbuf));
-	bktr->ih = pci_intr_establish(pa->pa_pc, ih, IPL_VIDEO,
-  bktr_intr, bktr);
+	bktr->ih = pci_intr_establish_xname(pa->pa_pc, ih, IPL_VIDEO,
+			  bktr_intr, bktr, device_xname(bktr->bktr_dev));
 	if (bktr->ih == NULL) {
 		aprint_error("%s: couldn't establish interrupt",
 		   bktr_name(bktr));



CVS commit: src/sys/dev/pci

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 11:14:02 UTC 2018

Modified Files:
src/sys/dev/pci: aac_pci.c adv_pci.c adw_pci.c ahc_pci.c ahd_pci.c
amr.c arcmsr.c artsata.c atppc_puc.c auacer.c auixp.c auvia.c
azalia.c btvmei.c cac_pci.c ciss_pci.c cmpci.c coram.c cs4280.c
cs4281.c cxdtv.c cy_pci.c cz.c dpt_pci.c eap.c emuxki.c esa.c esm.c
eso.c fms.c gcscaudio.c icp_pci.c if_age.c if_alc.c if_ale.c
if_an_pci.c if_athn_pci.c if_atw_pci.c if_bce.c if_bwfm_pci.c
if_bwi_pci.c if_cas.c if_de.c if_dge.c if_ep_pci.c if_epic_pci.c
if_esh_pci.c if_et.c if_ex_pci.c if_fpa.c if_fxp_pci.c if_gem_pci.c
if_hme_pci.c if_ipw.c if_iwi.c if_jme.c if_kse.c if_le_pci.c
if_lii.c if_lmc.c if_malo_pci.c if_mtd_pci.c if_ne_pci.c if_nfe.c
if_ntwoc_pci.c if_ral_pci.c if_rtk_pci.c if_rtw_pci.c if_rtwn.c
if_sf_pci.c if_ste.c if_stge.c if_ti.c if_tl.c if_tlp_pci.c
if_txp.c if_vge.c if_vr.c if_vte.c if_wi_pci.c if_wpi.c if_xge.c
iha_pci.c iop_pci.c isp_pci.c jmide.c mfi_pci.c mlx_pci.c mly.c
neo.c njs_pci.c oboe.c pcscp.c pdcsata.c rtsx_pci.c satalink.c
siop_pci_common.c sv.c svwsata.c tga.c trm.c twa.c twe.c ubsec.c
universe_pci.c viaide.c voodoofb.c voyager.c yds.c

Log Message:
use pci_intr_establish_xname() everywhere


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/aac_pci.c src/sys/dev/pci/trm.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/adv_pci.c \
src/sys/dev/pci/iop_pci.c src/sys/dev/pci/pdcsata.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/adw_pci.c \
src/sys/dev/pci/artsata.c src/sys/dev/pci/if_alc.c \
src/sys/dev/pci/if_cas.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/ahc_pci.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/ahd_pci.c \
src/sys/dev/pci/if_hme_pci.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/amr.c src/sys/dev/pci/cz.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/arcmsr.c \
src/sys/dev/pci/if_ne_pci.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/atppc_puc.c \
src/sys/dev/pci/coram.c src/sys/dev/pci/cxdtv.c \
src/sys/dev/pci/gcscaudio.c src/sys/dev/pci/if_bwi_pci.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/auacer.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/auixp.c src/sys/dev/pci/fms.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/auvia.c
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pci/azalia.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/btvmei.c \
src/sys/dev/pci/if_ntwoc_pci.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/cac_pci.c \
src/sys/dev/pci/if_an_pci.c src/sys/dev/pci/if_jme.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ciss_pci.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/cmpci.c src/sys/dev/pci/if_txp.c \
src/sys/dev/pci/neo.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/cs4280.c src/sys/dev/pci/if_ipw.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/cs4281.c \
src/sys/dev/pci/if_le_pci.c src/sys/dev/pci/sv.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/cy_pci.c src/sys/dev/pci/if_ale.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/dpt_pci.c \
src/sys/dev/pci/if_atw_pci.c src/sys/dev/pci/if_xge.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/eap.c
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/emuxki.c src/sys/dev/pci/if_nfe.c \
src/sys/dev/pci/if_stge.c src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/esa.c src/sys/dev/pci/if_fpa.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/esm.c src/sys/dev/pci/yds.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/eso.c src/sys/dev/pci/if_lmc.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/icp_pci.c \
src/sys/dev/pci/if_rtw_pci.c src/sys/dev/pci/svwsata.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_athn_pci.c \
src/sys/dev/pci/njs_pci.c src/sys/dev/pci/universe_pci.c \
src/sys/dev/pci/voyager.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_bce.c \
src/sys/dev/pci/if_gem_pci.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/if_bwfm_pci.c
cvs rdiff -u -r1.155 -r1.156 src/sys/dev/pci/if_de.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_dge.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/pci/if_ep_pci.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_epic_pci.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_esh_pci.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_et.c src/sys/dev/pci/if_rtwn.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/if_ex_pci.c
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/pci/if_fxp_pci.c
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/pci/if_iwi.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/if_kse.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/if_lii.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/if_malo_pci.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_mtd_pci.c \
src/sys/dev/pci/if_vte.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_ral_pci.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/if_rtk_pci.c
cvs rdiff -u -r1.21 -r1.22 src/

CVS commit: src/sys/dev/acpi

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 11:12:58 UTC 2018

Modified Files:
src/sys/dev/acpi: tpm_acpi.c

Log Message:
make compile on 64-bit archs after acpi_mem ar_length was changed
from uint32_t to bus_size_t in rev. 1.77 of acpivar.h


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/tpm_acpi.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/acpi/tpm_acpi.c
diff -u src/sys/dev/acpi/tpm_acpi.c:1.6 src/sys/dev/acpi/tpm_acpi.c:1.7
--- src/sys/dev/acpi/tpm_acpi.c:1.6	Thu Feb 22 01:50:26 2018
+++ src/sys/dev/acpi/tpm_acpi.c	Sun Dec  9 11:12:58 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tpm_acpi.c,v 1.6 2018/02/22 01:50:26 christos Exp $ */
+/* $NetBSD: tpm_acpi.c,v 1.7 2018/12/09 11:12:58 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.6 2018/02/22 01:50:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.7 2018/12/09 11:12:58 jdolecek Exp $");
 
 #include 
 #include 
@@ -156,8 +156,8 @@ tpm_acpi_attach(device_t parent, device_
 
 		if (mem->ar_length != TPM_SIZE) {
 			aprint_error_dev(sc->sc_dev,
-			"wrong size mem %u != %u\n",
-			mem->ar_length, TPM_SIZE);
+			"wrong size mem %"PRIu64" != %u\n",
+			(uint64_t)mem->ar_length, TPM_SIZE);
 			goto out;
 		}
 



CVS commit: src/sys/dev/pci

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 10:38:54 UTC 2018

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

Log Message:
put back the intr establish to ath_pci_resume() to avoid possibility of
functionality change, but add XXX comment that it shouldn't be necessary


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_ath_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/dev/pci/if_ath_pci.c
diff -u src/sys/dev/pci/if_ath_pci.c:1.49 src/sys/dev/pci/if_ath_pci.c:1.50
--- src/sys/dev/pci/if_ath_pci.c:1.49	Sun Dec  9 10:06:56 2018
+++ src/sys/dev/pci/if_ath_pci.c	Sun Dec  9 10:38:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ath_pci.c,v 1.49 2018/12/09 10:06:56 jdolecek Exp $	*/
+/*	$NetBSD: if_ath_pci.c,v 1.50 2018/12/09 10:38:53 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.49 2018/12/09 10:06:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.50 2018/12/09 10:38:53 jdolecek Exp $");
 
 /*
  * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
@@ -137,6 +137,13 @@ ath_pci_resume(device_t self, const pmf_
 {
 	struct ath_pci_softc *sc = device_private(self);
 
+	/* XXX re-establishing interrupt shouldn't be needed */
+	sc->sc_ih = pci_intr_establish_xname(sc->sc_pc, sc->sc_pih, IPL_NET,
+	ath_intr, &sc->sc_sc, device_xname(self));
+	if (sc->sc_ih == NULL) {
+		aprint_error_dev(self, "couldn't map interrupt\n");
+		return false;
+	}
 	return ath_resume(&sc->sc_sc);
 }
 



CVS commit: src/sys/dev/pci

2018-12-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  9 10:06:56 UTC 2018

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

Log Message:
use pci_intr_establish_xname()

upon code inspection, remove intr re-establish from ath_pci_resume() -
not needed to re-establish interrupt there, no other driver does this,
and very likely it would actually fail nowadays


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/if_ath_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/dev/pci/if_ath_pci.c
diff -u src/sys/dev/pci/if_ath_pci.c:1.48 src/sys/dev/pci/if_ath_pci.c:1.49
--- src/sys/dev/pci/if_ath_pci.c:1.48	Sat Mar 29 19:28:24 2014
+++ src/sys/dev/pci/if_ath_pci.c	Sun Dec  9 10:06:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ath_pci.c,v 1.48 2014/03/29 19:28:24 christos Exp $	*/
+/*	$NetBSD: if_ath_pci.c,v 1.49 2018/12/09 10:06:56 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.48 2014/03/29 19:28:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.49 2018/12/09 10:06:56 jdolecek Exp $");
 
 /*
  * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
@@ -137,12 +137,6 @@ ath_pci_resume(device_t self, const pmf_
 {
 	struct ath_pci_softc *sc = device_private(self);
 
-	sc->sc_ih = pci_intr_establish(sc->sc_pc, sc->sc_pih, IPL_NET, ath_intr,
-	&sc->sc_sc);
-	if (sc->sc_ih == NULL) {
-		aprint_error_dev(self, "couldn't map interrupt\n");
-		return false;
-	}
 	return ath_resume(&sc->sc_sc);
 }
 
@@ -197,7 +191,8 @@ ath_pci_attach(device_t parent, device_t
 	}
 
 	intrstr = pci_intr_string(pc, psc->sc_pih, intrbuf, sizeof(intrbuf));
-	psc->sc_ih = pci_intr_establish(pc, psc->sc_pih, IPL_NET, ath_intr, sc);
+	psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pih, IPL_NET,
+	ath_intr, sc, device_xname(self));
 	if (psc->sc_ih == NULL) {
 		aprint_error("couldn't map interrupt\n");
 		goto bad1;