CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:59:24 UTC 2019

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

Log Message:
Fix previous.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/if_axen.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/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.29 src/sys/dev/usb/if_axen.c:1.30
--- src/sys/dev/usb/if_axen.c:1.29	Wed Feb  6 07:56:14 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 07:59:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.30 2019/02/06 07:59:24 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.30 2019/02/06 07:59:24 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1047,7 +1047,7 @@ axen_rxeof(struct usbd_xfer *xfer, void 
 	hdr_offset = (uint16_t)(rx_hdr >> 16);
 	pkt_count  = (uint16_t)(rx_hdr & 0x);
 
-	if (total_len > sc->axen_bufsz) {
+	if (total_len > sc->axen_rx_bufsz) {
 		aprint_error_dev(sc->axen_dev, "rxeof: too large transfer\n");
 		goto done;
 	}



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:59:24 UTC 2019

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

Log Message:
Fix previous.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/if_axen.c

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



CVS commit: src/usr.bin/ftp

2019-02-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb  6 07:56:42 UTC 2019

Modified Files:
src/usr.bin/ftp: cmds.c

Log Message:
Try to avoid a (bogus) fatal warning from clang.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/usr.bin/ftp/cmds.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/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.139 src/usr.bin/ftp/cmds.c:1.140
--- src/usr.bin/ftp/cmds.c:1.139	Mon Feb  4 04:09:13 2019
+++ src/usr.bin/ftp/cmds.c	Wed Feb  6 07:56:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.139 2019/02/04 04:09:13 mrg Exp $	*/
+/*	$NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.139 2019/02/04 04:09:13 mrg Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -1781,6 +1781,11 @@ justquit(void)
 {
 
 	quit(0, NULL);
+	/*
+	 * quit is not __dead, but for our invocation it never will return,
+	 * but some compilers are not smart enough to find this out.
+	 */
+	exit(0);
 }
 
 /*



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:56:14 UTC 2019

Modified Files:
src/sys/dev/usb: if_axen.c if_axenreg.h

Log Message:
Support TSOv4 (They call it LSOv1).
The adapter does not support TSOv6 (aka LSOv2).


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_axenreg.h

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

Modified files:

Index: src/sys/dev/usb/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.28 src/sys/dev/usb/if_axen.c:1.29
--- src/sys/dev/usb/if_axen.c:1.28	Wed Feb  6 07:48:33 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 07:56:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -50,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 
 
 #include 
 
+#include 		/* XXX for netinet/ip.h */
+#include 		/* XXX for IP_MAXPACKET */
+
 #include 
 #include 
 
@@ -718,16 +721,20 @@ axen_attach(device_t parent, device_t se
 	/* decide on what our bufsize will be */
 	switch (sc->axen_udev->ud_speed) {
 	case USB_SPEED_SUPER:
-		sc->axen_bufsz = AXEN_BUFSZ_SS * 1024;
+		sc->axen_rx_bufsz = AXEN_BUFSZ_SS * 1024;
 		break;
 	case USB_SPEED_HIGH:
-		sc->axen_bufsz = AXEN_BUFSZ_HS * 1024;
+		sc->axen_rx_bufsz = AXEN_BUFSZ_HS * 1024;
 		break;
 	default:
-		sc->axen_bufsz = AXEN_BUFSZ_LS * 1024;
+		sc->axen_rx_bufsz = AXEN_BUFSZ_LS * 1024;
 		break;
 	}
 
+	sc->axen_tx_bufsz = IP_MAXPACKET +
+	ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN +
+	sizeof(struct axen_sframe_hdr);
+
 	/* Find endpoints. */
 	for (i = 0; i < id->bNumEndpoints; i++) {
 		ed = usbd_interface2endpoint_descriptor(sc->axen_iface, i);
@@ -791,7 +798,10 @@ axen_attach(device_t parent, device_t se
 	IFQ_SET_READY(>if_snd);
 
 	sc->axen_ec.ec_capabilities = ETHERCAP_VLAN_MTU;
-	ifp->if_capabilities |= IFCAP_CSUM_IPv4_Rx | IFCAP_CSUM_IPv4_Tx |
+
+	/* Adapter does not support TSOv6 (They call it LSOv2). */
+	ifp->if_capabilities |= IFCAP_TSOv4 |
+	IFCAP_CSUM_IPv4_Rx  | IFCAP_CSUM_IPv4_Tx  |
 	IFCAP_CSUM_TCPv4_Rx | IFCAP_CSUM_TCPv4_Tx |
 	IFCAP_CSUM_UDPv4_Rx | IFCAP_CSUM_UDPv4_Tx |
 	IFCAP_CSUM_TCPv6_Rx | IFCAP_CSUM_TCPv6_Tx |
@@ -943,7 +953,7 @@ axen_rx_list_init(struct axen_softc *sc)
 		c->axen_idx = i;
 		if (c->axen_xfer == NULL) {
 			int err = usbd_create_xfer(sc->axen_ep[AXEN_ENDPT_RX],
-			sc->axen_bufsz, 0, 0, >axen_xfer);
+			sc->axen_rx_bufsz, 0, 0, >axen_xfer);
 			if (err)
 return err;
 			c->axen_buf = usbd_get_buffer(c->axen_xfer);
@@ -969,7 +979,7 @@ axen_tx_list_init(struct axen_softc *sc)
 		c->axen_idx = i;
 		if (c->axen_xfer == NULL) {
 			int err = usbd_create_xfer(sc->axen_ep[AXEN_ENDPT_TX],
-			sc->axen_bufsz, USBD_FORCE_SHORT_XFER, 0,
+			sc->axen_tx_bufsz, USBD_FORCE_SHORT_XFER, 0,
 			>axen_xfer);
 			if (err)
 return err;
@@ -1124,7 +1134,7 @@ nextpkt:
 
 done:
 	/* Setup new transfer. */
-	usbd_setup_xfer(xfer, c, c->axen_buf, sc->axen_bufsz,
+	usbd_setup_xfer(xfer, c, c->axen_buf, sc->axen_rx_bufsz,
 	USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axen_rxeof);
 	usbd_transfer(xfer);
 
@@ -1291,6 +1301,7 @@ axen_encap(struct axen_softc *sc, struct
 	}
 
 	length = m->m_pkthdr.len + sizeof(hdr);
+	KASSERT(length <= sc->axen_tx_bufsz);
 
 	hdr.plen = htole32(m->m_pkthdr.len);
 
@@ -1437,7 +1448,7 @@ axen_init(struct ifnet *ifp)
 	for (i = 0; i < AXEN_RX_LIST_CNT; i++) {
 		c = >axen_cdata.axen_rx_chain[i];
 
-		usbd_setup_xfer(c->axen_xfer, c, c->axen_buf, sc->axen_bufsz,
+		usbd_setup_xfer(c->axen_xfer, c, c->axen_buf, sc->axen_rx_bufsz,
 		USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axen_rxeof);
 		usbd_transfer(c->axen_xfer);
 	}

Index: src/sys/dev/usb/if_axenreg.h
diff -u src/sys/dev/usb/if_axenreg.h:1.7 src/sys/dev/usb/if_axenreg.h:1.8
--- src/sys/dev/usb/if_axenreg.h:1.7	Wed Feb  6 07:28:34 2019
+++ src/sys/dev/usb/if_axenreg.h	Wed Feb  6 07:56:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axenreg.h,v 1.7 2019/02/06 07:28:34 rin Exp $	*/
+/*	$NetBSD: if_axenreg.h,v 1.8 2019/02/06 07:56:14 rin Exp $	*/
 /*	$OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $	*/
 
 /*
@@ -295,7 +295,8 @@ struct axen_softc {
 
 	int			axen_phyno;
 	struct timeval		axen_rx_notice;
-	u_int			axen_bufsz;
+	u_int			axen_rx_bufsz;
+	u_int			axen_tx_bufsz;
 	int			axen_rev;
 
 #define sc_if	axen_ec.ec_if



CVS commit: src/usr.bin/ftp

2019-02-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb  6 07:56:42 UTC 2019

Modified Files:
src/usr.bin/ftp: cmds.c

Log Message:
Try to avoid a (bogus) fatal warning from clang.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/usr.bin/ftp/cmds.c

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



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:56:14 UTC 2019

Modified Files:
src/sys/dev/usb: if_axen.c if_axenreg.h

Log Message:
Support TSOv4 (They call it LSOv1).
The adapter does not support TSOv6 (aka LSOv2).


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_axenreg.h

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



CVS commit: src

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:51:20 UTC 2019

Modified Files:
src/distrib/rs6000/ramdisk: Makefile
src/sys/arch/rs6000/conf: INSTALL

Log Message:
bump image size by 1/8th of an MB.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/rs6000/ramdisk/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/rs6000/conf/INSTALL

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



CVS commit: src

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:51:20 UTC 2019

Modified Files:
src/distrib/rs6000/ramdisk: Makefile
src/sys/arch/rs6000/conf: INSTALL

Log Message:
bump image size by 1/8th of an MB.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/rs6000/ramdisk/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/rs6000/conf/INSTALL

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

Modified files:

Index: src/distrib/rs6000/ramdisk/Makefile
diff -u src/distrib/rs6000/ramdisk/Makefile:1.8 src/distrib/rs6000/ramdisk/Makefile:1.9
--- src/distrib/rs6000/ramdisk/Makefile:1.8	Tue Jan 24 18:04:04 2017
+++ src/distrib/rs6000/ramdisk/Makefile	Wed Feb  6 07:51:20 2019
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.8 2017/01/24 18:04:04 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2019/02/06 07:51:20 mrg Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2048k
+IMAGESIZE=	2176k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1

Index: src/sys/arch/rs6000/conf/INSTALL
diff -u src/sys/arch/rs6000/conf/INSTALL:1.2 src/sys/arch/rs6000/conf/INSTALL:1.3
--- src/sys/arch/rs6000/conf/INSTALL:1.2	Fri Aug  8 16:56:32 2014
+++ src/sys/arch/rs6000/conf/INSTALL	Wed Feb  6 07:51:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL,v 1.2 2014/08/08 16:56:32 joerg Exp $
+#	$NetBSD: INSTALL,v 1.3 2019/02/06 07:51:20 mrg Exp $
 
 include "arch/rs6000/conf/GENERIC"
 
@@ -8,6 +8,6 @@ makeoptions	COPTS="-Os" # Reduce size.
 
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# Force root on ram-disk
-options 	MEMORY_DISK_ROOT_SIZE=4096	# 2mb
+options 	MEMORY_DISK_ROOT_SIZE=4352	# 2.125 mb
 options 	MEMORY_DISK_SERVER=0		# don't need for install
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:48:33 UTC 2019

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

Log Message:
Fix padding for a full length USB packet in TX:
- Update boundary length for SS mode, taken from OpenBSD.
- Make sure everything passed to the adapter is little endian.
- Specify padding bits in a similar manner to Linux.

XXX I wonder whether this is really necessary...


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/if_axen.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/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.27 src/sys/dev/usb/if_axen.c:1.28
--- src/sys/dev/usb/if_axen.c:1.27	Wed Feb  6 07:35:46 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 07:48:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1277,23 +1277,32 @@ axen_encap(struct axen_softc *sc, struct
 
 	c = >axen_cdata.axen_tx_chain[idx];
 
-	boundary = (sc->axen_udev->ud_speed == USB_SPEED_HIGH) ? 512 : 64;
-
-	hdr.plen = htole32(m->m_pkthdr.len);
-	hdr.gso = 0; /* disable segmentation offloading */
+	/* XXX Is this need? */
+	switch (sc->axen_udev->ud_speed) {
+	case USB_SPEED_SUPER:
+		boundary = 4096;
+		break;
+	case USB_SPEED_HIGH:
+		boundary = 512;
+		break;
+	default:
+		boundary = 64;
+		break;
+	}
 
-	memcpy(c->axen_buf, , sizeof(hdr));
-	length = sizeof(hdr);
+	length = m->m_pkthdr.len + sizeof(hdr);
 
-	m_copydata(m, 0, m->m_pkthdr.len, c->axen_buf + length);
-	length += m->m_pkthdr.len;
+	hdr.plen = htole32(m->m_pkthdr.len);
 
+	hdr.gso = 0; /* disable segmentation offloading */
 	if ((length % boundary) == 0) {
-		hdr.plen = 0x0;
-		hdr.gso |= 0x80008000;  /* enable padding */
-		memcpy(c->axen_buf + length, , sizeof(hdr));
-		length += sizeof(hdr);
+		DPRINTF(("%s: boundary hit\n", device_xname(sc->axen_dev)));
+		hdr.gso |= 0x80008000;	/* XXX enable padding */
 	}
+	hdr.gso = htole32(hdr.gso);
+
+	memcpy(c->axen_buf, , sizeof(hdr));
+	m_copydata(m, 0, m->m_pkthdr.len, c->axen_buf + sizeof(hdr));
 
 	usbd_setup_xfer(c->axen_xfer, c, c->axen_buf, length,
 	USBD_FORCE_SHORT_XFER, 1, axen_txeof);



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:48:33 UTC 2019

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

Log Message:
Fix padding for a full length USB packet in TX:
- Update boundary length for SS mode, taken from OpenBSD.
- Make sure everything passed to the adapter is little endian.
- Specify padding bits in a similar manner to Linux.

XXX I wonder whether this is really necessary...


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/if_axen.c

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



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:35:47 UTC 2019

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

Log Message:
Cosmetic changes; no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_axen.c

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



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:35:47 UTC 2019

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

Log Message:
Cosmetic changes; no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_axen.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/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.26 src/sys/dev/usb/if_axen.c:1.27
--- src/sys/dev/usb/if_axen.c:1.26	Wed Feb  6 07:31:38 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 07:35:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1527,6 +1527,7 @@ static void
 axen_stop(struct ifnet *ifp, int disable)
 {
 	struct axen_softc *sc = ifp->if_softc;
+	struct axen_chain *c;
 	usbd_status err;
 	int i;
 	uint16_t rxmode, wval;
@@ -1575,17 +1576,19 @@ axen_stop(struct ifnet *ifp, int disable
 
 	/* Free RX resources. */
 	for (i = 0; i < AXEN_RX_LIST_CNT; i++) {
-		if (sc->axen_cdata.axen_rx_chain[i].axen_xfer != NULL) {
-			usbd_destroy_xfer(sc->axen_cdata.axen_rx_chain[i].axen_xfer);
-			sc->axen_cdata.axen_rx_chain[i].axen_xfer = NULL;
+		c = >axen_cdata.axen_rx_chain[i];
+		if (c->axen_xfer != NULL) {
+			usbd_destroy_xfer(c->axen_xfer);
+			c->axen_xfer = NULL;
 		}
 	}
 
 	/* Free TX resources. */
 	for (i = 0; i < AXEN_TX_LIST_CNT; i++) {
-		if (sc->axen_cdata.axen_tx_chain[i].axen_xfer != NULL) {
-			usbd_destroy_xfer(sc->axen_cdata.axen_tx_chain[i].axen_xfer);
-			sc->axen_cdata.axen_tx_chain[i].axen_xfer = NULL;
+		c = >axen_cdata.axen_tx_chain[i];
+		if (c->axen_xfer != NULL) {
+			usbd_destroy_xfer(c->axen_xfer);
+			c->axen_xfer = NULL;
 		}
 	}
 



CVS commit: src/distrib/common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:33:09 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
- clean the .tmp kernel targets as well


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/common/Makefile.mdset

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

Modified files:

Index: src/distrib/common/Makefile.mdset
diff -u src/distrib/common/Makefile.mdset:1.42 src/distrib/common/Makefile.mdset:1.43
--- src/distrib/common/Makefile.mdset:1.42	Tue Jan 16 09:59:37 2018
+++ src/distrib/common/Makefile.mdset	Wed Feb  6 07:33:08 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.42 2018/01/16 09:59:37 maya Exp $
+#	$NetBSD: Makefile.mdset,v 1.43 2019/02/06 07:33:08 mrg Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -125,8 +125,7 @@ _POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_P
 _POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_POST}
 .endif
 
-
-CLEANFILES+=	${_KERNEL.${_K}.${_F}}
+CLEANFILES+=	${_KERNEL.${_K}.${_F}} ${_KERNEL.${_K}.${_F}}.tmp
 
 .if defined(MDSET_NOIMAGE.${_FILENAME})
 ${_I}=



CVS commit: src/distrib/common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:33:09 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
- clean the .tmp kernel targets as well


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/common/Makefile.mdset

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



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

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:32:50 UTC 2019

Modified Files:
src/sys/arch/powerpc/oea: cpu_subr.c oea_machdep.c

Log Message:
- add or adjust fallthru comments


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/powerpc/oea/oea_machdep.c

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



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

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:32:50 UTC 2019

Modified Files:
src/sys/arch/powerpc/oea: cpu_subr.c oea_machdep.c

Log Message:
- add or adjust fallthru comments


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/powerpc/oea/oea_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.98 src/sys/arch/powerpc/oea/cpu_subr.c:1.99
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.98	Sun Jan  6 11:20:53 2019
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Wed Feb  6 07:32:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.99 2019/02/06 07:32:50 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.99 2019/02/06 07:32:50 mrg Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_ppccache.h"
@@ -1133,6 +1133,7 @@ cpu_get_dfs(void)
 	case MPC7448:
 		if (mfspr(SPR_HID1) & HID1_DFS4)
 			return 4;
+		/* FALLTHROUGH */
 	case MPC7447A:
 		if (mfspr(SPR_HID1) & HID1_DFS2)
 			return 2;
@@ -1155,6 +1156,7 @@ cpu_set_dfs(int div)
 	switch (vers) {
 	case MPC7448:
 		dfs_mask |= HID1_DFS4;
+		/* FALLTHROUGH */
 	case MPC7447A:
 		dfs_mask |= HID1_DFS2;
 		break;

Index: src/sys/arch/powerpc/oea/oea_machdep.c
diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.75 src/sys/arch/powerpc/oea/oea_machdep.c:1.76
--- src/sys/arch/powerpc/oea/oea_machdep.c:1.75	Sun Jul 15 05:16:44 2018
+++ src/sys/arch/powerpc/oea/oea_machdep.c	Wed Feb  6 07:32:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: oea_machdep.c,v 1.75 2018/07/15 05:16:44 maxv Exp $	*/
+/*	$NetBSD: oea_machdep.c,v 1.76 2019/02/06 07:32:50 mrg Exp $	*/
 
 /*
  * Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.75 2018/07/15 05:16:44 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.76 2019/02/06 07:32:50 mrg Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -260,15 +260,14 @@ oea_init(void (*handler)(void))
 #if defined(DDB) || defined(KGDB)
 		case EXC_RUNMODETRC:
 #ifdef PPC_OEA601
-			if (cpuvers != MPC601) {
+			if (cpuvers != MPC601)
 #endif
+			{
 size = (size_t)trapsize;
 memcpy((void *)exc, trapcode, size);
 break;
-#ifdef PPC_OEA601
 			}
 			/* FALLTHROUGH */
-#endif
 		case EXC_PGM:
 		case EXC_TRC:
 		case EXC_BPT:



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:31:39 UTC 2019

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

Log Message:
Drop AXEN_MEDIUM_ALWAYS_ONE (from Linux), which reduces drop erros in RX.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/if_axen.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/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.25 src/sys/dev/usb/if_axen.c:1.26
--- src/sys/dev/usb/if_axen.c:1.25	Wed Feb  6 07:28:01 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 07:31:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -269,9 +269,8 @@ axen_miibus_statchg(struct ifnet *ifp)
 	if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX)
 		val |= AXEN_MEDIUM_FDX;
 
-	val |= (AXEN_MEDIUM_RECV_EN | AXEN_MEDIUM_ALWAYS_ONE);
-	val |= (AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN);
-
+	val |= AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN |
+	AXEN_MEDIUM_RECV_EN;
 	switch (IFM_SUBTYPE(mii->mii_media_active)) {
 	case IFM_1000_T:
 		val |= AXEN_MEDIUM_GIGA | AXEN_MEDIUM_EN_125MHZ;
@@ -586,9 +585,9 @@ axen_ax88179_init(struct axen_softc *sc)
 	DPRINTF(("axen: Monitor mode = 0x%02x\n", val));
 
 	/* set medium type */
-	ctl = AXEN_MEDIUM_GIGA | AXEN_MEDIUM_FDX | AXEN_MEDIUM_ALWAYS_ONE |
-	  AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN;
-	ctl |= AXEN_MEDIUM_RECV_EN;
+	ctl = AXEN_MEDIUM_GIGA | AXEN_MEDIUM_FDX | AXEN_MEDIUM_EN_125MHZ |
+	AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN |
+	AXEN_MEDIUM_RECV_EN;
 	wval = htole16(ctl);
 	DPRINTF(("axen: set to medium mode: 0x%04x\n", ctl));
 	axen_cmd(sc, AXEN_CMD_MAC_WRITE2, 2, AXEN_MEDIUM_STATUS, );



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:31:39 UTC 2019

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

Log Message:
Drop AXEN_MEDIUM_ALWAYS_ONE (from Linux), which reduces drop erros in RX.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/if_axen.c

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



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:28:34 UTC 2019

Modified Files:
src/sys/dev/usb: if_axenreg.h

Log Message:
Remove unused variable in axen_softc.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_axenreg.h

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

Modified files:

Index: src/sys/dev/usb/if_axenreg.h
diff -u src/sys/dev/usb/if_axenreg.h:1.6 src/sys/dev/usb/if_axenreg.h:1.7
--- src/sys/dev/usb/if_axenreg.h:1.6	Thu Jan 31 15:27:57 2019
+++ src/sys/dev/usb/if_axenreg.h	Wed Feb  6 07:28:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axenreg.h,v 1.6 2019/01/31 15:27:57 rin Exp $	*/
+/*	$NetBSD: if_axenreg.h,v 1.7 2019/02/06 07:28:34 rin Exp $	*/
 /*	$OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $	*/
 
 /*
@@ -293,7 +293,6 @@ struct axen_softc {
 
 	int			axen_link;
 
-	uint8_t			axen_ipgs[3];
 	int			axen_phyno;
 	struct timeval		axen_rx_notice;
 	u_int			axen_bufsz;



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:28:34 UTC 2019

Modified Files:
src/sys/dev/usb: if_axenreg.h

Log Message:
Remove unused variable in axen_softc.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_axenreg.h

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



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:28:01 UTC 2019

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

Log Message:
Remove useless memset.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/if_axen.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/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.24 src/sys/dev/usb/if_axen.c:1.25
--- src/sys/dev/usb/if_axen.c:1.24	Thu Jan 31 15:27:57 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 07:28:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.24 2019/01/31 15:27:57 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.24 2019/01/31 15:27:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1124,9 +1124,6 @@ nextpkt:
 	} while( pkt_count > 0);
 
 done:
-	/* clear buffer for next transaction */
-	memset(c->axen_buf, 0, sc->axen_bufsz);
-
 	/* Setup new transfer. */
 	usbd_setup_xfer(xfer, c, c->axen_buf, sc->axen_bufsz,
 	USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axen_rxeof);



CVS commit: src/sys/dev/usb

2019-02-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  6 07:28:01 UTC 2019

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

Log Message:
Remove useless memset.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/if_axen.c

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



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 07:20:13 UTC 2019

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

Log Message:
 I21[01]'s RAL size is not 15 but 16(== 82575's value). Same as other OSes.


To generate a diff of this commit:
cvs rdiff -u -r1.623 -r1.624 src/sys/dev/pci/if_wm.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_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.623 src/sys/dev/pci/if_wm.c:1.624
--- src/sys/dev/pci/if_wm.c:1.623	Thu Jan 31 15:30:23 2019
+++ src/sys/dev/pci/if_wm.c	Wed Feb  6 07:20:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.623 2019/01/31 15:30:23 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.623 2019/01/31 15:30:23 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3641,6 +3641,8 @@ wm_rar_count(struct wm_softc *sc)
 		size = WM_RAL_TABSIZE_PCH_LPT;
 		break;
 	case WM_T_82575:
+	case WM_T_I210:
+	case WM_T_I211:
 		size = WM_RAL_TABSIZE_82575;
 		break;
 	case WM_T_82576:



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 07:20:13 UTC 2019

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

Log Message:
 I21[01]'s RAL size is not 15 but 16(== 82575's value). Same as other OSes.


To generate a diff of this commit:
cvs rdiff -u -r1.623 -r1.624 src/sys/dev/pci/if_wm.c

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



CVS commit: src/sys/arch/aarch64

2019-02-05 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Feb  6 05:33:41 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/include: pmap.h

Log Message:
improve pmap_remove
- don't lock/unlock per page in pmap_remove()
- speedup pte lookup for continuous addresses
- bring out pool_cache_put(&_pmap_pv_pool, pv) from lock/unlock section


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/include/pmap.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/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.34 src/sys/arch/aarch64/aarch64/pmap.c:1.35
--- src/sys/arch/aarch64/aarch64/pmap.c:1.34	Fri Dec 21 08:01:01 2018
+++ src/sys/arch/aarch64/aarch64/pmap.c	Wed Feb  6 05:33:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.34 2018/12/21 08:01:01 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.35 2019/02/06 05:33:41 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.34 2018/12/21 08:01:01 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35 2019/02/06 05:33:41 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -187,12 +187,15 @@ struct pv_entry {
 	paddr_t pv_pa;		/* debug */
 	pt_entry_t *pv_ptep;	/* for fast pte lookup */
 };
+#define pv_next	pv_link.tqe_next
+
+#define L3INDEXMASK	(L3_SIZE * Ln_ENTRIES - 1)
 
 static pt_entry_t *_pmap_pte_lookup_l3(struct pmap *, vaddr_t);
 static pt_entry_t *_pmap_pte_lookup_bs(struct pmap *, vaddr_t, vsize_t *);
 static pt_entry_t _pmap_pte_adjust_prot(pt_entry_t, vm_prot_t, vm_prot_t, bool);
 static pt_entry_t _pmap_pte_adjust_cacheflags(pt_entry_t, u_int);
-static void _pmap_remove(struct pmap *, vaddr_t, bool);
+static void _pmap_remove(struct pmap *, vaddr_t, vaddr_t, bool, struct pv_entry **);
 static int _pmap_enter(struct pmap *, vaddr_t, paddr_t, vm_prot_t, u_int, bool);
 
 static struct pmap kernel_pmap;
@@ -614,7 +617,7 @@ pmap_extract_coherency(struct pmap *pm, 
 bool
 pmap_extract(struct pmap *pm, vaddr_t va, paddr_t *pap)
 {
-	static pt_entry_t *ptep;
+	static pt_entry_t *ptep, pte;
 	paddr_t pa;
 	vsize_t blocksize = 0;
 	extern char __kernel_text[];
@@ -630,7 +633,10 @@ pmap_extract(struct pmap *pm, vaddr_t va
 		ptep = _pmap_pte_lookup_bs(pm, va, );
 		if (ptep == NULL)
 			return false;
-		pa = lxpde_pa(*ptep) + (va & (blocksize - 1));
+		pte = *ptep;
+		if (!lxpde_valid(pte))
+			return false;
+		pa = lxpde_pa(pte) + (va & (blocksize - 1));
 	}
 
 	if (pap != NULL)
@@ -676,46 +682,30 @@ _pmap_pte_lookup_bs(struct pmap *pm, vad
 	blocksize = L0_SIZE;
 	l0 = pm->pm_l0table;
 	idx = l0pde_index(va);
-	pde = l0[idx];
-	if (!l0pde_valid(pde)) {
-		ptep = NULL;
+	ptep = [idx];
+	pde = *ptep;
+	if (!l0pde_valid(pde))
 		goto done;
-	}
 
 	blocksize = L1_SIZE;
 	l1 = (pd_entry_t *)AARCH64_PA_TO_KVA(l0pde_pa(pde));
 	idx = l1pde_index(va);
-	pde = l1[idx];
-	if (!l1pde_valid(pde)) {
-		ptep = NULL;
-		goto done;
-	}
-	if (l1pde_is_block(pde)) {
-		ptep = [idx];
+	ptep = [idx];
+	pde = *ptep;
+	if (!l1pde_valid(pde) || l1pde_is_block(pde))
 		goto done;
-	}
 
 	blocksize = L2_SIZE;
 	l2 = (pd_entry_t *)AARCH64_PA_TO_KVA(l1pde_pa(pde));
 	idx = l2pde_index(va);
-	pde = l2[idx];
-	if (!l2pde_valid(pde)) {
-		ptep = NULL;
-		goto done;
-	}
-	if (l2pde_is_block(pde)) {
-		ptep = [idx];
+	ptep = [idx];
+	pde = *ptep;
+	if (!l2pde_valid(pde) || l2pde_is_block(pde))
 		goto done;
-	}
 
 	blocksize = L3_SIZE;
 	l3 = (pd_entry_t *)AARCH64_PA_TO_KVA(l2pde_pa(pde));
 	idx = l3pte_index(va);
-	pde = l3[idx];
-	if (!l3pte_valid(pde)) {
-		ptep = NULL;
-		goto done;
-	}
 	ptep = [idx];
 
  done:
@@ -740,21 +730,27 @@ _pmap_pte_lookup_l3(struct pmap *pm, vad
 void
 pmap_icache_sync_range(pmap_t pm, vaddr_t sva, vaddr_t eva)
 {
-	pt_entry_t *ptep, pte;
+	pt_entry_t *ptep = NULL, pte;
 	vaddr_t va;
 	vsize_t blocksize = 0;
 
 	pm_lock(pm);
 
-	for (va = sva; va < eva; va += blocksize) {
-		ptep = _pmap_pte_lookup_bs(pm, va, );
-		if (blocksize == 0)
-			break;
-		if (ptep != NULL) {
+	for (va = sva; va < eva; va = (va + blocksize) & ~(blocksize - 1)) {
+		/* va is belong to the same L3 table as before? */
+		if ((blocksize == L3_SIZE) && ((va & L3INDEXMASK) != 0)) {
+			ptep++;
+		} else {
+			ptep = _pmap_pte_lookup_bs(pm, va, );
+			if (ptep == NULL)
+break;
+		}
+
+		pte = *ptep;
+		if (lxpde_valid(pte)) {
 			vaddr_t eob = (va + blocksize) & ~(blocksize - 1);
 			vsize_t len = ulmin(eva, eob - va);
 
-			pte = *ptep;
 			if (l3pte_writable(pte)) {
 cpu_icache_sync_range(va, len);
 			} else {
@@ -771,7 +767,6 @@ pmap_icache_sync_range(pmap_t pm, vaddr_
 atomic_swap_64(ptep, opte);
 AARCH64_TLBI_BY_ASID_VA(pm->pm_asid, va, true);
 			}
-			va &= ~(blocksize - 1);
 		}
 	}
 
@@ -826,7 +821,7 @@ 

CVS commit: src/common/lib/libc/arch/aarch64/atomic

2019-02-05 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Feb  6 05:33:14 UTC 2019

Modified Files:
src/common/lib/libc/arch/aarch64/atomic: atomic_op_asm.h

Log Message:
fix atomic_sub_*(). it was (delta - *ptr), should be (*ptr - delta).
changing shared macro doesn't effect other atomic_ops because
(*ptr [+|^] delta) and (delta [+|^] *ptr) have same result.

atomic_sub_*() haven't used because non standard API?


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h

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

Modified files:

Index: src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h
diff -u src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h:1.1 src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h:1.2
--- src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h:1.1	Sun Aug 10 05:47:35 2014
+++ src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h	Wed Feb  6 05:33:14 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_op_asm.h,v 1.1 2014/08/10 05:47:35 matt Exp $ */
+/* $NetBSD: atomic_op_asm.h,v 1.2 2019/02/06 05:33:14 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 ENTRY_NP(_atomic_##OP##_8)		;\
 	mov	x4, x0			;\
 1:	ldxrb	w0, [x4]		/* load old value */		;\
-	INSN	w2, w1, w0		/* calculate new value */	;\
+	INSN	w2, w0, w1		/* calculate new value */	;\
 	stxrb	w3, w2, [x4]		/* try to store */		;\
 	cbnz	w3, 1b			/*   succeed? no, try again */	;\
 	dmb	st			;\
@@ -49,7 +49,7 @@ END(_atomic_##OP##_8)
 ENTRY_NP(_atomic_##OP##_8_nv)		;\
 	mov	x4, x0			/* need r0 for return value */	;\
 1:	ldxrb	w0, [x4]		/* load old value */		;\
-	INSN	w2, w1, w0		/* calc new (return) value */	;\
+	INSN	w2, w0, w1		/* calc new (return) value */	;\
 	stxrb	w3, w2, [x4]		/* try to store */		;\
 	cbnz	w3, 1b			/*   succeed? no, try again */	;\
 	dmb	st			;\
@@ -60,7 +60,7 @@ END(_atomic_##OP##_8_nv)
 ENTRY_NP(_atomic_##OP##_16)		;\
 	mov	x4, x0			;\
 1:	ldxrh	w0, [x4]		/* load old value */		;\
-	INSN	w2, w1, w0		/* calculate new value */	;\
+	INSN	w2, w0, w1		/* calculate new value */	;\
 	stxrh	w3, w2, [x4]		/* try to store */		;\
 	cbnz	w3, 1b			/*   succeed? no, try again */	;\
 	dmb	st			;\
@@ -71,7 +71,7 @@ END(_atomic_##OP##_16)
 ENTRY_NP(_atomic_##OP##_16_nv)		;\
 	mov	x4, x0			/* need r0 for return value */	;\
 1:	ldxrh	w0, [x4]		/* load old value */		;\
-	INSN	w2, w1, w0		/* calc new (return) value */	;\
+	INSN	w2, w0, w1		/* calc new (return) value */	;\
 	stxrh	w3, w2, [x4]		/* try to store */		;\
 	cbnz	w3, 1b			/*   succeed? no, try again */	;\
 	dmb	st			;\
@@ -82,7 +82,7 @@ END(_atomic_##OP##_16_nv)
 ENTRY_NP(_atomic_##OP##_32)		;\
 	mov	x4, x0			;\
 1:	ldxr	w0, [x4]		/* load old value */		;\
-	INSN	w2, w1, w0		/* calculate new value */	;\
+	INSN	w2, w0, w1		/* calculate new value */	;\
 	stxr	w3, w2, [x4]		/* try to store */		;\
 	cbnz	w3, 1b			/*   succeed? no, try again */	;\
 	dmb	st			;\
@@ -104,7 +104,7 @@ END(_atomic_##OP##_32_nv)
 ENTRY_NP(_atomic_##OP##_64)		;\
 	mov	x4, x0			;\
 1:	ldxr	x0, [x4]		/* load old value */		;\
-	INSN	x2, x1, x0		/* calculate new value */	;\
+	INSN	x2, x0, x1		/* calculate new value */	;\
 	stxr	w3, x2, [x4]		/* try to store */		;\
 	cbnz	w3, 1b			/*   succeed? no, try again */	;\
 	dmb	st			;\



CVS commit: src/sys/arch/aarch64

2019-02-05 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Feb  6 05:33:41 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/include: pmap.h

Log Message:
improve pmap_remove
- don't lock/unlock per page in pmap_remove()
- speedup pte lookup for continuous addresses
- bring out pool_cache_put(&_pmap_pv_pool, pv) from lock/unlock section


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/include/pmap.h

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



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

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 05:04:41 UTC 2019

Modified Files:
src/sys/arch/hppa/spmath: cnv_float.h

Log Message:
- convert shift results into logical expressions


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/spmath/cnv_float.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/hppa/spmath/cnv_float.h
diff -u src/sys/arch/hppa/spmath/cnv_float.h:1.3 src/sys/arch/hppa/spmath/cnv_float.h:1.4
--- src/sys/arch/hppa/spmath/cnv_float.h:1.3	Sun Apr  6 08:03:36 2008
+++ src/sys/arch/hppa/spmath/cnv_float.h	Wed Feb  6 05:04:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cnv_float.h,v 1.3 2008/04/06 08:03:36 skrll Exp $	*/
+/*	$NetBSD: cnv_float.h,v 1.4 2019/02/06 05:04:41 mrg Exp $	*/
 
 /*	$OpenBSD: cnv_float.h,v 1.5 2001/03/29 03:58:17 mickey Exp $	*/
 
@@ -75,19 +75,19 @@
 ((exponent < (SGL_P - 1)) ?\
  (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : false)
 
-#define Int_isinexact_to_sgl(int_value)	(int_value << (33 - SGL_EXP_LENGTH))
+#define Int_isinexact_to_sgl(int_value)	((int_value << (33 - SGL_EXP_LENGTH)) != 0)
 
 #define Sgl_roundnearest_from_int(int_value,sgl_value)			\
 if (int_value & 1<<(SGL_EXP_LENGTH - 2))   /* round bit */		\
-	if ((int_value << (34 - SGL_EXP_LENGTH)) || Slow(sgl_value))	\
+	if (((int_value << (34 - SGL_EXP_LENGTH)) != 0) || Slow(sgl_value))	\
 		Sall(sgl_value)++
 
 #define Dint_isinexact_to_sgl(dint_valueA,dint_valueB)		\
-((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) || Dintp2(dint_valueB))
+(((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) != 0) || Dintp2(dint_valueB))
 
 #define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value)	\
 if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2))			\
-	if ((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) ||		\
+	if (((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) != 0) ||	\
 	Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++
 
 #define Dint_isinexact_to_dbl(dint_value)	\



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

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 05:04:41 UTC 2019

Modified Files:
src/sys/arch/hppa/spmath: cnv_float.h

Log Message:
- convert shift results into logical expressions


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/spmath/cnv_float.h

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



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 04:23:16 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
uses the idiom len = snprintf(, 1, ...) to compute length.
needs -Wno-format-truncation


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/cddl/osnet/lib/libdtrace/Makefile

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



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 04:23:16 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
uses the idiom len = snprintf(, 1, ...) to compute length.
needs -Wno-format-truncation


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/cddl/osnet/lib/libdtrace/Makefile

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

Modified files:

Index: src/external/cddl/osnet/lib/libdtrace/Makefile
diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.19 src/external/cddl/osnet/lib/libdtrace/Makefile:1.20
--- src/external/cddl/osnet/lib/libdtrace/Makefile:1.19	Thu Jun  7 09:21:44 2018
+++ src/external/cddl/osnet/lib/libdtrace/Makefile	Tue Feb  5 23:23:16 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2018/06/07 13:21:44 kamil Exp $
+#	$NetBSD: Makefile,v 1.20 2019/02/06 04:23:16 christos Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -105,6 +105,7 @@ CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/
 CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
 .PATH:		${.CURDIR}/../../dist/lib/libdtrace/arm
 .endif
+COPTS.dt_link.c	+= -Wno-format-truncation
 
 LFLAGS+=-l
 



CVS commit: src/sys/dev/nor

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 04:20:40 UTC 2019

Modified Files:
src/sys/dev/nor: cfi.c

Log Message:
memset(0) the structure, not the pointer itself, and what ever
data happens to be after the pointer's stack location.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nor/cfi.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/nor/cfi.c
diff -u src/sys/dev/nor/cfi.c:1.8 src/sys/dev/nor/cfi.c:1.9
--- src/sys/dev/nor/cfi.c:1.8	Fri Sep 18 21:30:02 2015
+++ src/sys/dev/nor/cfi.c	Wed Feb  6 04:20:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $	*/
+/*	$NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_cfi.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $"); 
+__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $"); 
 
 #include 
 #include 
@@ -829,7 +829,7 @@ cfi_jedec_fill(struct cfi *cfi, const st
 	cfi->cfi_name = jt->jt_name;
 
 	struct cfi_query_data *qryp = >cfi_qry_data;
-	memset(, 0, sizeof(*qryp));
+	memset(qryp, 0, sizeof(*qryp));
 	qryp->id_pri = jt->jt_id_pri;
 	qryp->id_alt = jt->jt_id_alt;
 	qryp->interface_code_desc = jt->jt_interface_code_desc;



CVS commit: src/sys/dev/nor

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 04:20:40 UTC 2019

Modified Files:
src/sys/dev/nor: cfi.c

Log Message:
memset(0) the structure, not the pointer itself, and what ever
data happens to be after the pointer's stack location.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nor/cfi.c

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



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 04:14:03 UTC 2019

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

Log Message:
 Fix a bug that all ports' MAC address become the last port's address on
Non-OF environment.

 The Saturn multi port card has only one VPD ROM and all ports share it.
If the card has four port, it has four "local-mac-address" entries.
Before this commit, the code keep the last one and use it for all ports.
The Saturn four port card has three bridge.

e.g.

003:02:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
004:00:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
004:04:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
005:00:0: National Semiconductor Saturn (ethernet network, revision 0x30)
005:01:0: National Semiconductor Saturn (ethernet network, revision 0x30)
006:02:0: National Semiconductor Saturn (ethernet network, revision 0x30)
006:03:0: National Semiconductor Saturn (ethernet network, revision 0x30)


The card assign each port's PCI device number to match the port number.
Use it as the offset of "local-mac-address". Almost the same as FreeBSD.

OK'd by mrg and martin.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_cas.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_cas.c
diff -u src/sys/dev/pci/if_cas.c:1.31 src/sys/dev/pci/if_cas.c:1.32
--- src/sys/dev/pci/if_cas.c:1.31	Tue Feb  5 06:17:03 2019
+++ src/sys/dev/pci/if_cas.c	Wed Feb  6 04:14:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cas.c,v 1.31 2019/02/05 06:17:03 msaitoh Exp $	*/
+/*	$NetBSD: if_cas.c,v 1.32 2019/02/06 04:14:03 msaitoh Exp $	*/
 /*	$OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $	*/
 
 /*
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.31 2019/02/05 06:17:03 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.32 2019/02/06 04:14:03 msaitoh Exp $");
 
 #ifndef _MODULE
 #include "opt_inet.h"
@@ -203,6 +203,7 @@ static const u_int8_t cas_promdat2[] = {
 	PCI_CLASS_NETWORK		/* class code */
 };
 
+#define CAS_LMA_MAXNUM	4
 int
 cas_pci_enaddr(struct cas_softc *sc, struct pci_attach_args *pa,
 uint8_t *enaddr)
@@ -212,10 +213,11 @@ cas_pci_enaddr(struct cas_softc *sc, str
 	bus_space_handle_t romh;
 	bus_space_tag_t romt;
 	bus_size_t romsize = 0;
+	uint8_t enaddrs[CAS_LMA_MAXNUM][ETHER_ADDR_LEN];
 	u_int8_t buf[32], *desc;
 	pcireg_t address;
-	int dataoff, vpdoff, len;
-	int rv = -1;
+	int dataoff, vpdoff, len, lma = 0;
+	int i, rv = -1;
 
 	if (pci_mapreg_map(pa, PCI_MAPREG_ROM, PCI_MAPREG_TYPE_MEM, 0,
 	, , NULL, ))
@@ -297,8 +299,11 @@ next:
 continue;
 			desc += strlen("local-mac-address") + 1;
 
-			memcpy(enaddr, desc, ETHER_ADDR_LEN);
+			memcpy(enaddrs[lma], desc, ETHER_ADDR_LEN);
+			lma++;
 			rv = 0;
+			if (lma == CAS_LMA_MAXNUM)
+break;
 		}
 		break;
 
@@ -306,6 +311,19 @@ next:
 		goto fail;
 	}
 
+	i = 0;
+	/*
+	 * Multi port card has bridge chip. The device number is fixed:
+	 * e.g.
+	 * p0: 005:00:0
+	 * p1: 005:01:0
+	 * p2: 006:02:0
+	 * p3: 006:03:0
+	 */
+	if ((lma > 1) && (pa->pa_device < CAS_LMA_MAXNUM)
+	&& (pa->pa_device < lma))
+		i = pa->pa_device;
+	memcpy(enaddr, enaddrs[i], ETHER_ADDR_LEN);
  fail:
 	if (romsize != 0)
 		bus_space_unmap(romt, romh, romsize);



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 04:14:03 UTC 2019

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

Log Message:
 Fix a bug that all ports' MAC address become the last port's address on
Non-OF environment.

 The Saturn multi port card has only one VPD ROM and all ports share it.
If the card has four port, it has four "local-mac-address" entries.
Before this commit, the code keep the last one and use it for all ports.
The Saturn four port card has three bridge.

e.g.

003:02:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
004:00:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
004:04:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
005:00:0: National Semiconductor Saturn (ethernet network, revision 0x30)
005:01:0: National Semiconductor Saturn (ethernet network, revision 0x30)
006:02:0: National Semiconductor Saturn (ethernet network, revision 0x30)
006:03:0: National Semiconductor Saturn (ethernet network, revision 0x30)


The card assign each port's PCI device number to match the port number.
Use it as the offset of "local-mac-address". Almost the same as FreeBSD.

OK'd by mrg and martin.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_cas.c

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



CVS commit: src/sys/arch/amiga/dev

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 04:07:31 UTC 2019

Modified Files:
src/sys/arch/amiga/dev: wstsc.c

Log Message:
properly check SCI_CSR_DREQ in one place.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/dev/wstsc.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/wstsc.c
diff -u src/sys/arch/amiga/dev/wstsc.c:1.34 src/sys/arch/amiga/dev/wstsc.c:1.35
--- src/sys/arch/amiga/dev/wstsc.c:1.34	Wed Jan 22 00:25:16 2014
+++ src/sys/arch/amiga/dev/wstsc.c	Wed Feb  6 04:07:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wstsc.c,v 1.34 2014/01/22 00:25:16 christos Exp $ */
+/*	$NetBSD: wstsc.c,v 1.35 2019/02/06 04:07:31 mrg Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wstsc.c,v 1.34 2014/01/22 00:25:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wstsc.c,v 1.35 2019/02/06 04:07:31 mrg Exp $");
 
 #include 
 #include 
@@ -405,7 +405,7 @@ wstsc_dma_xfer_in2(struct sci_softc *dev
 			}
 		}
 #else
-		while (!(*sci_csr * SCI_CSR_DREQ))
+		while (!(*sci_csr & SCI_CSR_DREQ))
 			;
 #endif
 



CVS commit: src/sys/arch/amiga/dev

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 04:07:31 UTC 2019

Modified Files:
src/sys/arch/amiga/dev: wstsc.c

Log Message:
properly check SCI_CSR_DREQ in one place.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/dev/wstsc.c

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



CVS commit: src/external/gpl3/gcc/lib

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 04:00:43 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer
src/external/gpl3/gcc/lib/libasan: Makefile
src/external/gpl3/gcc/lib/liblsan: Makefile
src/external/gpl3/gcc/lib/libtsan: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile

Log Message:
update the sanitizer source lists for gcc 7.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/Makefile.sanitizer
cvs rdiff -u -r1.26 -r1.27 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/libtsan/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/lib/libubsan/Makefile

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



CVS commit: src/external/gpl3/gcc/lib

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 04:00:43 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer
src/external/gpl3/gcc/lib/libasan: Makefile
src/external/gpl3/gcc/lib/liblsan: Makefile
src/external/gpl3/gcc/lib/libtsan: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile

Log Message:
update the sanitizer source lists for gcc 7.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/Makefile.sanitizer
cvs rdiff -u -r1.26 -r1.27 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/libtsan/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/lib/libubsan/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/lib/Makefile.sanitizer
diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.6 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.7
--- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.6	Sun Jul  1 17:41:49 2018
+++ src/external/gpl3/gcc/lib/Makefile.sanitizer	Wed Feb  6 04:00:43 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sanitizer,v 1.6 2018/07/01 17:41:49 christos Exp $
+#	$NetBSD: Makefile.sanitizer,v 1.7 2019/02/06 04:00:43 mrg Exp $
 
 SANITIZER=${GCCDIST}/libsanitizer
 .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -10,59 +10,55 @@ interception_type_test.cc \
 interception_win.cc
 
 SANITIZER_SRCS+= \
-sanitizer_allocator.cc \
-sanitizer_common.cc \
-sanitizer_common_libcdep.cc \
-sanitizer_coverage_libcdep.cc \
-sanitizer_coverage_mapping_libcdep.cc \
-sanitizer_deadlock_detector1.cc \
-sanitizer_deadlock_detector2.cc \
-sanitizer_flags.cc \
-sanitizer_flag_parser.cc \
-sanitizer_libc.cc \
-sanitizer_libignore.cc \
-sanitizer_linux.cc \
-sanitizer_linux_libcdep.cc \
-sanitizer_mac.cc \
-sanitizer_persistent_allocator.cc \
-sanitizer_platform_limits_linux.cc \
-sanitizer_platform_limits_posix.cc \
-sanitizer_posix.cc \
-sanitizer_posix_libcdep.cc \
-sanitizer_printf.cc \
-sanitizer_procmaps_common.cc \
-sanitizer_procmaps_netbsd.cc \
-sanitizer_procmaps_freebsd.cc \
-sanitizer_procmaps_linux.cc \
-sanitizer_procmaps_mac.cc \
-sanitizer_stackdepot.cc \
-sanitizer_stacktrace.cc \
-sanitizer_stacktrace_libcdep.cc \
-sanitizer_stacktrace_printer.cc \
-sanitizer_stoptheworld_linux_libcdep.cc \
-sanitizer_suppressions.cc \
-sanitizer_symbolizer.cc \
-sanitizer_symbolizer_libbacktrace.cc \
-sanitizer_symbolizer_libcdep.cc \
-sanitizer_symbolizer_mac.cc \
-sanitizer_symbolizer_posix_libcdep.cc \
-sanitizer_symbolizer_win.cc \
-sanitizer_thread_registry.cc \
-sanitizer_tls_get_addr.cc \
-sanitizer_unwind_linux_libcdep.cc \
-sanitizer_win.cc
-
-.PATH: ${SANITIZER}/ubsan
-UBSAN_SRCS+= \
-ubsan_diag.cc \
-ubsan_init.cc \
-ubsan_flags.cc \
-ubsan_value.cc
+	sanitizer_allocator.cc \
+	sanitizer_common.cc \
+	sanitizer_common_libcdep.cc \
+	sanitizer_coverage_libcdep.cc \
+	sanitizer_coverage_mapping_libcdep.cc \
+	sanitizer_deadlock_detector1.cc \
+	sanitizer_deadlock_detector2.cc \
+	sanitizer_flags.cc \
+	sanitizer_flag_parser.cc \
+	sanitizer_libc.cc \
+	sanitizer_libignore.cc \
+	sanitizer_linux.cc \
+	sanitizer_linux_libcdep.cc \
+	sanitizer_linux_s390.cc \
+	sanitizer_mac.cc \
+	sanitizer_persistent_allocator.cc \
+	sanitizer_platform_limits_linux.cc \
+	sanitizer_platform_limits_posix.cc \
+	sanitizer_posix.cc \
+	sanitizer_posix_libcdep.cc \
+	sanitizer_printf.cc \
+	sanitizer_procmaps_common.cc \
+	sanitizer_procmaps_freebsd.cc \
+	sanitizer_procmaps_netbsd.cc \
+	sanitizer_procmaps_linux.cc \
+	sanitizer_procmaps_mac.cc \
+	sanitizer_stackdepot.cc \
+	sanitizer_stacktrace.cc \
+	sanitizer_stacktrace_libcdep.cc \
+	sanitizer_symbolizer_mac.cc \
+	sanitizer_stacktrace_printer.cc \
+	sanitizer_stoptheworld_linux_libcdep.cc \
+	sanitizer_suppressions.cc \
+	sanitizer_symbolizer.cc \
+	sanitizer_symbolizer_libbacktrace.cc \
+	sanitizer_symbolizer_libcdep.cc \
+	sanitizer_symbolizer_posix_libcdep.cc \
+	sanitizer_symbolizer_win.cc \
+	sanitizer_termination.cc \
+	sanitizer_thread_registry.cc \
+	sanitizer_tls_get_addr.cc \
+	sanitizer_unwind_linux_libcdep.cc \
+	sanitizer_win.cc
 
 # The linux build does this to avoid preinit sections on shared libraries
 CSHLIBFLAGS+= -DPIC
 
-SRCS+=	${INTERCEPTION_SRCS} ${SANITIZER_SRCS} ${UBSAN_SRCS}
+#SRCS+=	${INTERCEPTION_SRCS} ${SANITIZER_SRCS} ${UBSAN_SRCS}
+SRCS+=	${INTERCEPTION_SRCS} ${SANITIZER_SRCS}
 CPPFLAGS+=-I${SANITIZER}/include -I${SANITIZER}
 CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude
 CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS

Index: src/external/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.26 src/external/gpl3/gcc/lib/libasan/Makefile:1.27
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.26	Sun Jul  1 17:41:49 2018
+++ 

CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 03:59:09 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in

Log Message:
add sanitizer_procmaps_netbsd.cc


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in

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

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.1.1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.1.1.4	Sat Jan 19 10:14:03 2019
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am	Wed Feb  6 03:59:09 2019
@@ -42,6 +42,7 @@ sanitizer_common_files = \
 	sanitizer_printf.cc \
 	sanitizer_procmaps_common.cc \
 	sanitizer_procmaps_freebsd.cc \
+	sanitizer_procmaps_netbsd.cc \
 	sanitizer_procmaps_linux.cc \
 	sanitizer_procmaps_mac.cc \
 	sanitizer_stackdepot.cc \
Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in:1.1.1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in:1.1.1.4	Sat Jan 19 10:14:03 2019
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in	Wed Feb  6 03:59:09 2019
@@ -93,6 +93,7 @@ am__objects_1 = sanitizer_allocator.lo s
 	sanitizer_platform_limits_posix.lo sanitizer_posix.lo \
 	sanitizer_posix_libcdep.lo sanitizer_printf.lo \
 	sanitizer_procmaps_common.lo sanitizer_procmaps_freebsd.lo \
+	sanitizer_procmaps_netbsd.lo \
 	sanitizer_procmaps_linux.lo sanitizer_procmaps_mac.lo \
 	sanitizer_stackdepot.lo sanitizer_stacktrace.lo \
 	sanitizer_stacktrace_libcdep.lo sanitizer_symbolizer_mac.lo \
@@ -323,6 +324,7 @@ sanitizer_common_files = \
 	sanitizer_printf.cc \
 	sanitizer_procmaps_common.cc \
 	sanitizer_procmaps_freebsd.cc \
+	sanitizer_procmaps_netbsd.cc \
 	sanitizer_procmaps_linux.cc \
 	sanitizer_procmaps_mac.cc \
 	sanitizer_stackdepot.cc \
@@ -464,6 +466,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_printf.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_common.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_freebsd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_netbsd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_linux.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_mac.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_stackdepot.Plo@am__quote@



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 03:59:09 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in

Log Message:
add sanitizer_procmaps_netbsd.cc


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in

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



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Wed Feb  6 03:37:13 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Fix GET_INFO.  Yes, can probably be simplified.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.370 src/sys/dev/raidframe/rf_netbsdkintf.c:1.371
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.370	Wed Feb  6 03:01:48 2019
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Wed Feb  6 03:37:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -1399,7 +1399,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 	RF_Raid_t *raidPtr;
 	RF_AccTotals_t *totals;
 	RF_SingleComponent_t component;
-	RF_DeviceConfig_t *d_cfg;
+	RF_DeviceConfig_t *d_cfg, *ucfgp;
 	int retcode = 0;
 	int column;
 	RF_ComponentLabel_t *clabel;
@@ -1513,13 +1513,14 @@ raidioctl(dev_t dev, u_long cmd, void *d
 		return rf_rebuild_in_place(raidPtr, data);
 
 	case RAIDFRAME_GET_INFO:
+		ucfgp = *(RF_DeviceConfig_t **)data;
 		RF_Malloc(d_cfg, sizeof(RF_DeviceConfig_t),
 			  (RF_DeviceConfig_t *));
 		if (d_cfg == NULL)
 			return ENOMEM;
 		retcode = rf_get_info(raidPtr, d_cfg);
 		if (retcode == 0) {
-			retcode = copyout(d_cfg, data, sizeof(*d_cfg));
+			retcode = copyout(d_cfg, ucfgp, sizeof(*d_cfg));
 		}
 		RF_Free(d_cfg, sizeof(RF_DeviceConfig_t));
 		return retcode;



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Wed Feb  6 03:37:13 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Fix GET_INFO.  Yes, can probably be simplified.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/sys/dev/raidframe/rf_netbsdkintf.c

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



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 03:16:36 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
 Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1349 -r1.1350 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1348 -r1.1349 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 03:16:08 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
>From OpenBSD:
- Add NetXen's vendor ID and devices.
- Add Sun Neptune.


To generate a diff of this commit:
cvs rdiff -u -r1.1360 -r1.1361 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1360 src/sys/dev/pci/pcidevs:1.1361
--- src/sys/dev/pci/pcidevs:1.1360	Mon Jan 28 03:37:27 2019
+++ src/sys/dev/pci/pcidevs	Wed Feb  6 03:16:08 2019
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1360 2019/01/28 03:37:27 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1361 2019/02/06 03:16:08 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -657,6 +657,7 @@ vendor HINT		0x3388	HiNT
 vendor 3DLABS		0x3d3d	3D Labs
 vendor AVANCE2		0x4005	Avance Logic (2nd PCI Vendor ID)
 vendor ADDTRON		0x4033	Addtron Technology
+vendor NETXEN		0x4040	NetXen
 vendor QINHENG		0x4348	Nanjing QinHeng Electronics
 vendor ICOMPRESSION	0x	Conexant (iCompression)
 vendor INDCOMPSRC	0x494f	Industrial Computer Source
@@ -6008,6 +6009,16 @@ product NETMOS MCS9990	0x9990	MCS9990 Qu
 /* Network Security Technologies */
 product NETSEC 7751		0x7751	7751
 
+/* NetXen Inc products */
+product NETXEN NXB_10GXxR	0x0001	NXB-10GXxR
+product NETXEN NXB_10GCX4	0x0002	NXB-10GCX4
+product NETXEN NXB_4GCU		0x0003	NXB-4GCU
+product NETXEN NXB_IMEZ		0x0004	IMEZ 10GbE
+product NETXEN NXB_HMEZ		0x0005	HMEZ 10GbE
+product NETXEN NXB_IMEZ_2	0x0024	IMEZ 10GbE Mgmt
+product NETXEN NXB_HMEZ_2	0x0025	HMEZ 10GbE Mgmt
+product NETXEN NX3031		0x0100	NX3031
+
 /* NexGen products */
 product NEXGEN NX82C501	0x4e78	NX82C501 Host-PCI Bridge
 
@@ -7140,6 +7151,7 @@ product SUN MS_IIep	0x9000	microSPARC II
 product SUN US_IIi	0xa000	UltraSPARC IIi PCI
 product SUN US_IIe	0xa001	UltraSPARC IIe PCI
 product SUN CASSINI	0xabba	Cassini Gigabit Ethernet
+product SUN NEPTUNE	0xabcd	Neptune
 
 /* Sundance Technology products */
 product SUNDANCETI IP100A	0x0200	IP100A 10/100 Ethernet



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 03:16:08 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
>From OpenBSD:
- Add NetXen's vendor ID and devices.
- Add Sun Neptune.


To generate a diff of this commit:
cvs rdiff -u -r1.1360 -r1.1361 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/dev/pci

2019-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  6 03:16:36 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
 Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1349 -r1.1350 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1348 -r1.1349 src/sys/dev/pci/pcidevs_data.h

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



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

2019-02-05 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Feb  6 03:07:08 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_mixer.c

Log Message:
Add support for hardware cursors where we can.

As far as I can tell, alpha blending only works between overlay channels,
and not between layers on a channel. Unfortunately, RT-Mixer1 only has
a single UI channel, so this feature is limited to RT-Mixer0.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_drm.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_mixer.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/sunxi/sunxi_drm.c
diff -u src/sys/arch/arm/sunxi/sunxi_drm.c:1.6 src/sys/arch/arm/sunxi/sunxi_drm.c:1.7
--- src/sys/arch/arm/sunxi/sunxi_drm.c:1.6	Mon Feb  4 12:10:13 2019
+++ src/sys/arch/arm/sunxi/sunxi_drm.c	Wed Feb  6 03:07:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.6 2019/02/04 12:10:13 jmcneill Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.7 2019/02/06 03:07:08 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.6 2019/02/04 12:10:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.7 2019/02/06 03:07:08 jmcneill Exp $");
 
 #include 
 #include 
@@ -247,6 +247,7 @@ sunxi_drm_fb_create(struct drm_device *d
 
 	switch (fb->base.pixel_format) {
 	case DRM_FORMAT_XRGB:
+	case DRM_FORMAT_ARGB:
 		fb->base.depth = 32;
 		break;
 	default:

Index: src/sys/arch/arm/sunxi/sunxi_mixer.c
diff -u src/sys/arch/arm/sunxi/sunxi_mixer.c:1.5 src/sys/arch/arm/sunxi/sunxi_mixer.c:1.6
--- src/sys/arch/arm/sunxi/sunxi_mixer.c:1.5	Tue Feb  5 21:01:38 2019
+++ src/sys/arch/arm/sunxi/sunxi_mixer.c	Wed Feb  6 03:07:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $ */
+/* $NetBSD: sunxi_mixer.c,v 1.6 2019/02/06 03:07:08 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.6 2019/02/06 03:07:08 jmcneill Exp $");
 
 #include 
 #include 
@@ -36,6 +36,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -47,13 +48,14 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.
 
 #include 
 
+#define	MIXER_CURSOR_MAXWIDTH	256
+#define	MIXER_CURSOR_MAXHEIGHT	256
+
 #define	SUNXI_MIXER_FREQ	43200
 
 #define	GLB_BASE		0x0
 #define	BLD_BASE		0x01000
 #define	OVL_BASE(n)		(0x02000 + (n) * 0x1000)
-#define	OVL_V_BASE		OVL_BASE(0)
-#define	OVL_UI_BASE		OVL_BASE(1)
 #define	VSU_BASE		0x2
 #define	CSC_BASE(n)		((n) == 0 ? 0xaa050 : 0xa)
 
@@ -67,11 +69,20 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.
 
 /* BLD registers */
 #define	BLD_FILL_COLOR_CTL	0x000
+#define	 BLD_FILL_COLOR_CTL_P3_EN		__BIT(11)
+#define	 BLD_FILL_COLOR_CTL_P2_EN		__BIT(10)
 #define	 BLD_FILL_COLOR_CTL_P1_EN		__BIT(9)
 #define	 BLD_FILL_COLOR_CTL_P0_EN		__BIT(8)
+#define	 BLD_FILL_COLOR_CTL_P3_FCEN		__BIT(3)
+#define	 BLD_FILL_COLOR_CTL_P2_FCEN		__BIT(2)
+#define	 BLD_FILL_COLOR_CTL_P1_FCEN		__BIT(1)
+#define	 BLD_FILL_COLOR_CTL_P0_FCEN		__BIT(0)
+#define	BLD_FILL_COLOR(n)	(0x004 + (n) * 0x10)
 #define	BLD_CH_ISIZE(n)		(0x008 + (n) * 0x10)
 #define	BLD_CH_OFFSET(n)	(0x00c + (n) * 0x10)
 #define	BLD_CH_RTCTL		0x080
+#define	 BLD_CH_RTCTL_P3			__BITS(15,12)
+#define	 BLD_CH_RTCTL_P2			__BITS(11,8)
 #define	 BLD_CH_RTCTL_P1			__BITS(7,4)
 #define	 BLD_CH_RTCTL_P0			__BITS(3,0)
 #define	BLD_SIZE		0x08c
@@ -88,6 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.
 #define	  OVL_V_ATTCTL_LAY_FBFMT_YUV422		0x06
 #define	  OVL_V_ATTCTL_LAY_FBFMT_YUV420		0x0a
 #define	  OVL_V_ATTCTL_LAY_FBFMT_YUV411		0x0e
+#define	  OVL_V_ATTCTL_LAY_FBFMT_ARGB_	0x00
 #define	  OVL_V_ATTCTL_LAY_FBFMT_XRGB_	0x04
 #define	 OVL_V_ATTCTL_LAY0_EN			__BIT(0)
 #define	OVL_V_MBSIZE(n)		(0x004 + (n) * 0x30)
@@ -112,13 +124,16 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.
 /* OVL_UI registers */
 #define	OVL_UI_ATTR_CTL(n)	(0x000 + (n) * 0x20)
 #define	 OVL_UI_ATTR_CTL_LAY_FBFMT		__BITS(12,8)
+#define	  OVL_UI_ATTR_CTL_LAY_FBFMT_ARGB_	0x00
 #define	  OVL_UI_ATTR_CTL_LAY_FBFMT_XRGB_	0x04
 #define	 OVL_UI_ATTR_CTL_LAY_EN			__BIT(0)
 #define	OVL_UI_MBSIZE(n)	(0x004 + (n) * 0x20)
 #define	OVL_UI_COOR(n)		(0x008 + (n) * 0x20)
 #define	OVL_UI_PITCH(n)		(0x00c + (n) * 0x20)
 #define	OVL_UI_TOP_LADD(n)	(0x010 + (n) * 0x20)
+#define	OVL_UI_FILL_COLOR(n)	(0x018 + (n) * 0x20)
 #define	OVL_UI_TOP_HADD		0x080
+#define	 OVL_UI_TOP_HADD_LAYER1	__BITS(15,8)
 #define	 OVL_UI_TOP_HADD_LAYER0	__BITS(7,0)
 #define	OVL_UI_SIZE		0x088
 
@@ -158,11 +173,11 @@ enum {
 	MIXER_PORT_OUTPUT = 1,
 };
 
-static const char * const compatible[] = {
-	"allwinner,sun8i-h3-de2-mixer-0",
-	

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

2019-02-05 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Feb  6 03:07:08 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_mixer.c

Log Message:
Add support for hardware cursors where we can.

As far as I can tell, alpha blending only works between overlay channels,
and not between layers on a channel. Unfortunately, RT-Mixer1 only has
a single UI channel, so this feature is limited to RT-Mixer0.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_drm.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_mixer.c

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



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 03:01:49 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
use 'data' directly.


To generate a diff of this commit:
cvs rdiff -u -r1.369 -r1.370 src/sys/dev/raidframe/rf_netbsdkintf.c

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



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 03:01:49 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
use 'data' directly.


To generate a diff of this commit:
cvs rdiff -u -r1.369 -r1.370 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.369 src/sys/dev/raidframe/rf_netbsdkintf.c:1.370
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.369	Tue Feb  5 21:49:50 2019
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Tue Feb  5 22:01:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -1399,7 +1399,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 	RF_Raid_t *raidPtr;
 	RF_AccTotals_t *totals;
 	RF_SingleComponent_t component;
-	RF_DeviceConfig_t *d_cfg, *ucfgp = data;
+	RF_DeviceConfig_t *d_cfg;
 	int retcode = 0;
 	int column;
 	RF_ComponentLabel_t *clabel;
@@ -1519,7 +1519,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 			return ENOMEM;
 		retcode = rf_get_info(raidPtr, d_cfg);
 		if (retcode == 0) {
-		retcode = copyout(d_cfg, ucfgp, sizeof(*d_cfg));
+			retcode = copyout(d_cfg, data, sizeof(*d_cfg));
 		}
 		RF_Free(d_cfg, sizeof(RF_DeviceConfig_t));
 		return retcode;



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 02:57:39 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
revert, somehow I got the generated file in the wrong directory.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.40 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.41
--- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.40	Tue Feb  5 21:55:54 2019
+++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile	Tue Feb  5 21:57:39 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2019/02/06 02:55:54 christos Exp $
+#	$NetBSD: Makefile,v 1.41 2019/02/06 02:57:39 christos Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -33,7 +33,7 @@ libstdc++.a:: libstdc++-symbols.ver
 
 LDFLAGS+=	-Wl,-O1 \
 		-Wl,--gc-sections \
-		-Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver
+		-Wl,--version-script=libstdc++-symbols.ver
 .endif
 
 CXXFLAGS.clang+=	-stdlib=libstdc++ -std=c++11 -D_GLIBCXX_ABI_TAG_CXX11=



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 02:57:39 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
revert, somehow I got the generated file in the wrong directory.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

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



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 02:55:54 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
fix objdir build


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

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



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  6 02:55:54 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
fix objdir build


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.39 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.40
--- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.39	Fri Feb  1 05:37:13 2019
+++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile	Tue Feb  5 21:55:54 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2019/02/01 10:37:13 mrg Exp $
+#	$NetBSD: Makefile,v 1.40 2019/02/06 02:55:54 christos Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -33,7 +33,7 @@ libstdc++.a:: libstdc++-symbols.ver
 
 LDFLAGS+=	-Wl,-O1 \
 		-Wl,--gc-sections \
-		-Wl,--version-script=libstdc++-symbols.ver
+		-Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver
 .endif
 
 CXXFLAGS.clang+=	-stdlib=libstdc++ -std=c++11 -D_GLIBCXX_ABI_TAG_CXX11=



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Wed Feb  6 02:49:51 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Fix logic inversion.  Progress, but still broken.


To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 src/sys/dev/raidframe/rf_netbsdkintf.c:1.369
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.368	Wed Feb  6 02:49:09 2019
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Wed Feb  6 02:49:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -1067,7 +1067,7 @@ rf_must_be_initialized(const struct raid
 	case RAIDFRAME_SET_AUTOCONFIG:
 	case RAIDFRAME_SET_COMPONENT_LABEL:
 	case RAIDFRAME_SET_ROOT:
-		return (rs->sc_flags & RAIDF_INITED) != 0;
+		return (rs->sc_flags & RAIDF_INITED) == 0;
 	}
 	return false;
 }



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Wed Feb  6 02:49:51 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Fix logic inversion.  Progress, but still broken.


To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/sys/dev/raidframe/rf_netbsdkintf.c

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



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Wed Feb  6 02:49:09 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsd.h rf_netbsdkintf.c rf_raid.h

Log Message:
Shuffle softc declarations to a different .h file.  Create missing
rf_get_raid().  Things compile, but don't work correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -u -r1.367 -r1.368 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/raidframe/rf_raid.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/raidframe/rf_netbsd.h
diff -u src/sys/dev/raidframe/rf_netbsd.h:1.32 src/sys/dev/raidframe/rf_netbsd.h:1.33
--- src/sys/dev/raidframe/rf_netbsd.h:1.32	Tue Feb  5 23:28:02 2019
+++ src/sys/dev/raidframe/rf_netbsd.h	Wed Feb  6 02:49:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsd.h,v 1.32 2019/02/05 23:28:02 christos Exp $	*/
+/*	$NetBSD: rf_netbsd.h,v 1.33 2019/02/06 02:49:09 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -103,11 +103,4 @@ typedef struct RF_ConfigSet_s {
 	struct RF_ConfigSet_s *next;
 } RF_ConfigSet_t;
 
-int rf_fail_disk(RF_Raid_t *, struct rf_recon_req *);
-
-int rf_inited(const struct raid_softc *);
-int rf_get_unit(const struct raid_softc *);
-RF_Raid_t *rf_get_raid(struct raid_softc *);
-int rf_construct(struct raid_softc *, RF_Config_t *);
-
 #endif /* _RF__RF_NETBSDSTUFF_H_ */

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.367 src/sys/dev/raidframe/rf_netbsdkintf.c:1.368
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.367	Tue Feb  5 23:28:02 2019
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Wed Feb  6 02:49:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.367 2019/02/05 23:28:02 christos Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.367 2019/02/05 23:28:02 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -182,7 +182,6 @@ static void KernelWakeupFunc(struct buf 
 static void InitBP(struct buf *, struct vnode *, unsigned,
 dev_t, RF_SectorNum_t, RF_SectorCount_t, void *, void (*) (struct buf *),
 void *, int, struct proc *);
-struct raid_softc;
 static void raidinit(struct raid_softc *);
 static int raiddoaccess(RF_Raid_t *raidPtr, struct buf *bp);
 static int rf_get_component_caches(RF_Raid_t *raidPtr, int *);
@@ -250,26 +249,6 @@ static struct dkdriver rf_dkdriver = {
 	.d_minphys = minphys
 };
 
-struct raid_softc {
-	struct dk_softc sc_dksc;
-	int	sc_unit;
-	int sc_flags;	/* flags */
-	int sc_cflags;	/* configuration flags */
-	kmutex_t sc_mutex;	/* interlock mutex */
-	kcondvar_t sc_cv;	/* and the condvar */
-	uint64_t sc_size;	/* size of the raid device */
-	charsc_xname[20];	/* XXX external name */
-	RF_Raid_t sc_r;
-	LIST_ENTRY(raid_softc) sc_link;
-};
-/* sc_flags */
-#define RAIDF_INITED		0x01	/* unit has been initialized */
-#define RAIDF_SHUTDOWN		0x02	/* unit is being shutdown */
-#define RAIDF_DETACH  		0x04	/* detach after final close */
-#define RAIDF_WANTED		0x08	/* someone waiting to obtain a lock */
-#define RAIDF_LOCKED		0x10	/* unit is locked */
-#define RAIDF_UNIT_CHANGED	0x20	/* unit is being changed */
-
 #define	raidunit(x)	DISKUNIT(x)
 #define	raidsoftc(dev)	(((struct raid_softc *)device_private(dev))->sc_r.softc)
 
@@ -460,6 +439,11 @@ rf_inited(const struct raid_softc *rs) {
 	return (rs->sc_flags & RAIDF_INITED) != 0;
 }
 
+RF_Raid_t *
+rf_get_raid(struct raid_softc *rs) {
+	return >sc_r;
+}
+
 int
 rf_get_unit(const struct raid_softc *rs) {
 	return rs->sc_unit;

Index: src/sys/dev/raidframe/rf_raid.h
diff -u src/sys/dev/raidframe/rf_raid.h:1.46 src/sys/dev/raidframe/rf_raid.h:1.47
--- src/sys/dev/raidframe/rf_raid.h:1.46	Tue Jan  8 07:18:18 2019
+++ src/sys/dev/raidframe/rf_raid.h	Wed Feb  6 02:49:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_raid.h,v 1.46 2019/01/08 07:18:18 mrg Exp $	*/
+/*	$NetBSD: rf_raid.h,v 1.47 2019/02/06 02:49:09 oster Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -305,4 +305,33 @@ struct RF_Raid_s {
 #endif/* RF_INCLUDE_PARITYLOGGING > 0 */
 	struct rf_paritymap *parity_map;
 };
+
+struct raid_softc {
+	struct dk_softc sc_dksc;
+	int	sc_unit;
+	int sc_flags;	/* flags */
+	int sc_cflags;	/* configuration flags */
+	kmutex_t sc_mutex;	/* interlock mutex */
+	kcondvar_t sc_cv;	/* and the condvar */
+	uint64_t sc_size;	/* size of the raid device */
+	charsc_xname[20];	/* XXX external name */
+	RF_Raid_t sc_r;
+	

CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Wed Feb  6 02:49:09 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_netbsd.h rf_netbsdkintf.c rf_raid.h

Log Message:
Shuffle softc declarations to a different .h file.  Create missing
rf_get_raid().  Things compile, but don't work correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -u -r1.367 -r1.368 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/raidframe/rf_raid.h

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



CVS commit: src/sys

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 23:28:02 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_compat32.c rf_compat32.h rf_compat50.c
rf_compat50.h rf_compat80.c rf_compat80.h rf_netbsd.h
rf_netbsdkintf.c
src/sys/kern: compat_stub.c
src/sys/sys: compat_stub.h
Removed Files:
src/sys/dev/raidframe: rf_compat50_mod.h rf_compat80_mod.h

Log Message:
- Redo all the ioctl compat stuff to use a standard "ioctl" interface,
  and provide methods to the private softc
- Provide a function for constructing a RF_Raid_t from an RF_Config_t
- Factor out the big inline ioctl code into functions


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/raidframe/rf_compat32.c \
src/sys/dev/raidframe/rf_compat32.h src/sys/dev/raidframe/rf_compat80.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/raidframe/rf_compat50.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/raidframe/rf_compat50.h
cvs rdiff -u -r1.4 -r0 src/sys/dev/raidframe/rf_compat50_mod.h \
src/sys/dev/raidframe/rf_compat80_mod.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_compat80.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -u -r1.366 -r1.367 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/compat_stub.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/raidframe/rf_compat32.c
diff -u src/sys/dev/raidframe/rf_compat32.c:1.2 src/sys/dev/raidframe/rf_compat32.c:1.3
--- src/sys/dev/raidframe/rf_compat32.c:1.2	Sun Feb  3 03:02:24 2019
+++ src/sys/dev/raidframe/rf_compat32.c	Tue Feb  5 18:28:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat32.c,v 1.2 2019/02/03 08:02:24 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat32.c,v 1.3 2019/02/05 23:28:02 christos Exp $	*/
 
 /*
  * Copyright (c) 2017 Matthew R. Green
@@ -38,6 +38,7 @@
 #include 
 
 #include "rf_raid.h"
+#include "rf_kintf.h"
 #include "rf_compat32.h"
 
 #include 
@@ -77,58 +78,104 @@ typedef struct RF_Config_s32 {
 	   indicate that configuration should not proceed without user
 	   intervention
 	 */
-} RF_Config_t32 ;
+} RF_Config_t32;
 
-int
-rf_config_netbsd32(void *data, RF_Config_t *k_cfg)
+static int
+rf_config_netbsd32(struct raid_softc *rs, void *data)
 {
-	RF_Config_t32 *u_cfg = NETBSD32PTR64(*(netbsd32_pointer_t *)data);
-	struct RF_Config_s32 *cfg32;
+	RF_Config_t32 *u_cfg32 = NETBSD32PTR64(*(netbsd32_pointer_t *)data);
+	RF_Config_t *k_cfg;
+	RF_Config_t32 *k_cfg32;
 	int rv;
 
-	RF_Malloc(cfg32, sizeof(RF_Config_t), (RF_Config_t32 *));
-	if (cfg32 == NULL)
-		return (ENOMEM);
-
-	rv = copyin(u_cfg, cfg32, sizeof(RF_Config_t32));
-	if (rv)
-		goto out;
-
-	k_cfg->numCol = cfg32->numCol;
-	k_cfg->numSpare = cfg32->numSpare;
-	memcpy(k_cfg->devs, cfg32->devs, sizeof(k_cfg->devs));
-	memcpy(k_cfg->devnames, cfg32->devnames, sizeof(k_cfg->devnames));
-	memcpy(k_cfg->spare_devs, cfg32->spare_devs, sizeof(k_cfg->spare_devs));
-	memcpy(k_cfg->spare_names, cfg32->spare_names, sizeof(k_cfg->spare_names));
-	k_cfg->sectPerSU = cfg32->sectPerSU;
-	k_cfg->SUsPerPU = cfg32->SUsPerPU;
-	k_cfg->SUsPerRU = cfg32->SUsPerRU;
-	k_cfg->parityConfig = cfg32->parityConfig;
-	memcpy(k_cfg->diskQueueType, cfg32->diskQueueType, sizeof(k_cfg->diskQueueType));
-	k_cfg->maxOutstandingDiskReqs = cfg32->maxOutstandingDiskReqs;
-	memcpy(k_cfg->debugVars, cfg32->debugVars, sizeof(k_cfg->debugVars));
-	k_cfg->layoutSpecificSize = cfg32->layoutSpecificSize;
-	k_cfg->layoutSpecific = NETBSD32PTR64(cfg32->layoutSpecific);
-	k_cfg->force = cfg32->force;
-
- out:
-	RF_Free(cfg32, sizeof(RF_Config_t32));
-	return rv;
+	RF_Malloc(k_cfg32, sizeof(RF_Config_t32), (RF_Config_t32 *));
+	if (k_cfg32 == NULL)
+		return ENOMEM;
+
+	rv = copyin(u_cfg32, k_cfg32, sizeof(RF_Config_t32));
+	if (rv) {
+		RF_Free(k_cfg32, sizeof(RF_Config_t32));
+		return ENOMEM;
+	}
+
+	RF_Malloc(k_cfg, sizeof(RF_Config_t), (RF_Config_t *));
+	if (k_cfg == NULL) {
+		RF_Free(k_cfg32, sizeof(RF_Config_t32));
+		RF_Free(k_cfg, sizeof(RF_Config_t));
+	}
+	k_cfg->numCol = k_cfg32->numCol;
+	k_cfg->numSpare = k_cfg32->numSpare;
+	memcpy(k_cfg->devs, k_cfg32->devs, sizeof(k_cfg->devs));
+	memcpy(k_cfg->devnames, k_cfg32->devnames, sizeof(k_cfg->devnames));
+	memcpy(k_cfg->spare_devs, k_cfg32->spare_devs,
+	sizeof(k_cfg->spare_devs));
+	memcpy(k_cfg->spare_names, k_cfg32->spare_names,
+	sizeof(k_cfg->spare_names));
+	k_cfg->sectPerSU = k_cfg32->sectPerSU;
+	k_cfg->SUsPerPU = k_cfg32->SUsPerPU;
+	k_cfg->SUsPerRU = k_cfg32->SUsPerRU;
+	k_cfg->parityConfig = k_cfg32->parityConfig;
+	memcpy(k_cfg->diskQueueType, k_cfg32->diskQueueType,
+	sizeof(k_cfg->diskQueueType));
+	k_cfg->maxOutstandingDiskReqs = k_cfg32->maxOutstandingDiskReqs;
+	memcpy(k_cfg->debugVars, k_cfg32->debugVars, sizeof(k_cfg->debugVars));
+	k_cfg->layoutSpecificSize = 

CVS commit: src/sys

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 23:28:02 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_compat32.c rf_compat32.h rf_compat50.c
rf_compat50.h rf_compat80.c rf_compat80.h rf_netbsd.h
rf_netbsdkintf.c
src/sys/kern: compat_stub.c
src/sys/sys: compat_stub.h
Removed Files:
src/sys/dev/raidframe: rf_compat50_mod.h rf_compat80_mod.h

Log Message:
- Redo all the ioctl compat stuff to use a standard "ioctl" interface,
  and provide methods to the private softc
- Provide a function for constructing a RF_Raid_t from an RF_Config_t
- Factor out the big inline ioctl code into functions


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/raidframe/rf_compat32.c \
src/sys/dev/raidframe/rf_compat32.h src/sys/dev/raidframe/rf_compat80.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/raidframe/rf_compat50.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/raidframe/rf_compat50.h
cvs rdiff -u -r1.4 -r0 src/sys/dev/raidframe/rf_compat50_mod.h \
src/sys/dev/raidframe/rf_compat80_mod.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_compat80.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -u -r1.366 -r1.367 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/compat_stub.h

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



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 21:50:21 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/earm: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earm: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/earm: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmhf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmhfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7hf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7hfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libobjc/arch/earm: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/earmeb: defs.mk

CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 21:50:21 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/earm: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earm: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/earm: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmhf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmhfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7hf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7hfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libobjc/arch/earm: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/earmeb: defs.mk

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

2019-02-05 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  5 21:01:38 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_mixer.c

Log Message:
Implement page flip API


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_mixer.c

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



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

2019-02-05 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  5 21:01:38 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_mixer.c

Log Message:
Implement page flip API


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_mixer.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/sunxi/sunxi_mixer.c
diff -u src/sys/arch/arm/sunxi/sunxi_mixer.c:1.4 src/sys/arch/arm/sunxi/sunxi_mixer.c:1.5
--- src/sys/arch/arm/sunxi/sunxi_mixer.c:1.4	Tue Feb  5 00:21:35 2019
+++ src/sys/arch/arm/sunxi/sunxi_mixer.c	Tue Feb  5 21:01:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mixer.c,v 1.4 2019/02/05 00:21:35 jmcneill Exp $ */
+/* $NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.4 2019/02/05 00:21:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $");
 
 #include 
 #include 
@@ -222,14 +222,61 @@ struct sunxi_mixer_softc {
 #define	to_sunxi_mixer_crtc(x)		container_of(x, struct sunxi_mixer_crtc, base)
 #define	to_sunxi_mixer_overlay(x)	container_of(x, struct sunxi_mixer_overlay, base)
 
+static int
+sunxi_mixer_mode_do_set_base(struct drm_crtc *crtc, struct drm_framebuffer *fb,
+int x, int y, int atomic)
+{
+	struct sunxi_mixer_crtc *mixer_crtc = to_sunxi_mixer_crtc(crtc);
+	struct sunxi_mixer_softc * const sc = mixer_crtc->sc;
+	struct sunxi_drm_framebuffer *sfb = atomic?
+	to_sunxi_drm_framebuffer(fb) :
+	to_sunxi_drm_framebuffer(crtc->primary->fb);
+
+	uint64_t paddr = (uint64_t)sfb->obj->dmamap->dm_segs[0].ds_addr;
+
+	uint32_t haddr = (paddr >> 32) & OVL_UI_TOP_HADD_LAYER0;
+	uint32_t laddr = paddr & 0x;
+
+	/* Framebuffer start address */
+	OVL_UI_WRITE(sc, OVL_UI_TOP_HADD, haddr);
+	OVL_UI_WRITE(sc, OVL_UI_TOP_LADD(0), laddr);
+
+	return 0;
+}
+
 static void
 sunxi_mixer_destroy(struct drm_crtc *crtc)
 {
 	drm_crtc_cleanup(crtc);
 }
 
+static int
+sunxi_mixer_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
+struct drm_pending_vblank_event *event, uint32_t flags)
+{
+	struct sunxi_mixer_crtc *mixer_crtc = to_sunxi_mixer_crtc(crtc);
+	struct sunxi_mixer_softc * const sc = mixer_crtc->sc;
+	unsigned long irqflags;
+
+	drm_crtc_wait_one_vblank(crtc);
+
+	sunxi_mixer_mode_do_set_base(crtc, fb, 0, 0, true);
+
+	/* Commit settings */
+	GLB_WRITE(sc, GLB_DBUFFER, GLB_DBUFFER_DOUBLE_BUFFER_RDY);
+
+	if (event) {
+		spin_lock_irqsave(>dev->event_lock, irqflags);
+		drm_send_vblank_event(crtc->dev, drm_crtc_index(crtc), event);
+		spin_unlock_irqrestore(>dev->event_lock, irqflags);
+	}
+
+	return 0;
+}
+
 static const struct drm_crtc_funcs sunxi_mixer_crtc_funcs = {
 	.set_config = drm_crtc_helper_set_config,
+	.page_flip = sunxi_mixer_page_flip,
 	.destroy = sunxi_mixer_destroy,
 };
 
@@ -246,28 +293,6 @@ sunxi_mixer_mode_fixup(struct drm_crtc *
 }
 
 static int
-sunxi_mixer_mode_do_set_base(struct drm_crtc *crtc, struct drm_framebuffer *fb,
-int x, int y, int atomic)
-{
-	struct sunxi_mixer_crtc *mixer_crtc = to_sunxi_mixer_crtc(crtc);
-	struct sunxi_mixer_softc * const sc = mixer_crtc->sc;
-	struct sunxi_drm_framebuffer *sfb = atomic?
-	to_sunxi_drm_framebuffer(fb) :
-	to_sunxi_drm_framebuffer(crtc->primary->fb);
-
-	uint64_t paddr = (uint64_t)sfb->obj->dmamap->dm_segs[0].ds_addr;
-
-	uint32_t haddr = (paddr >> 32) & OVL_UI_TOP_HADD_LAYER0;
-	uint32_t laddr = paddr & 0x;
-
-	/* Framebuffer start address */
-	OVL_UI_WRITE(sc, OVL_UI_TOP_HADD, haddr);
-	OVL_UI_WRITE(sc, OVL_UI_TOP_LADD(0), laddr);
-
-	return 0;
-}
-
-static int
 sunxi_mixer_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
 struct drm_display_mode *adjusted_mode, int x, int y,
 struct drm_framebuffer *old_fb)



CVS commit: src/share/doc/smm/18.net

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 19:53:14 UTC 2019

Modified Files:
src/share/doc/smm/18.net: 6.t

Log Message:
comment out the IFF_TRAILERS stuff that is no longer relevant and add
the missing flags.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/doc/smm/18.net/6.t

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

Modified files:

Index: src/share/doc/smm/18.net/6.t
diff -u src/share/doc/smm/18.net/6.t:1.5 src/share/doc/smm/18.net/6.t:1.6
--- src/share/doc/smm/18.net/6.t:1.5	Thu Aug  7 06:30:55 2003
+++ src/share/doc/smm/18.net/6.t	Tue Feb  5 14:53:13 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: 6.t,v 1.5 2003/08/07 10:30:55 agc Exp $
+.\"	$NetBSD: 6.t,v 1.6 2019/02/05 19:53:13 christos Exp $
 .\"
 .\" Copyright (c) 1983, 1986, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -447,14 +447,22 @@ The state of an interface and certain ch
 the \fIif_flags\fP field.  The following values are possible:
 .DS
 ._d
-#define	IFF_UP	0x1	/* interface is up */
-#define	IFF_BROADCAST	0x2	/* broadcast is possible */
-#define	IFF_DEBUG	0x4	/* turn on debugging */
-#define	IFF_LOOPBACK	0x8	/* is a loopback net */
-#define	IFF_POINTOPOINT	0x10	/* interface is point-to-point link */
-#define	IFF_NOTRAILERS	0x20	/* avoid use of trailers */
-#define	IFF_RUNNING	0x40	/* resources allocated */
-#define	IFF_NOARP	0x80	/* no address resolution protocol */
+#define	IFF_UP		0x0001		/* interface is up */
+#define	IFF_BROADCAST	0x0002		/* broadcast address valid */
+#define	IFF_DEBUG	0x0004		/* turn on debugging */
+#define	IFF_LOOPBACK	0x0008		/* is a loopback net */
+#define	IFF_POINTOPOINT	0x0010		/* interface is point-to-point link */
+.\" #define	IFF_NOTRAILERS	0x0020		/* avoid use of trailers */
+#define	IFF_RUNNING	0x0040		/* resources allocated */
+#define	IFF_NOARP	0x0080		/* no address resolution protocol */
+#define	IFF_PROMISC	0x0100		/* receive all packets */
+#define	IFF_ALLMULTI	0x0200		/* receive all multicast packets */
+#define	IFF_OACTIVE	0x0400		/* transmission in progress */
+#define	IFF_SIMPLEX	0x0800		/* can't hear own transmissions */
+#define	IFF_LINK0	0x1000		/* per link layer defined bit */
+#define	IFF_LINK1	0x2000		/* per link layer defined bit */
+#define	IFF_LINK2	0x4000		/* per link layer defined bit */
+#define	IFF_MULTICAST	0x8000		/* supports multicast */
 .DE
 If the interface is connected to a network which supports transmission
 of \fIbroadcast\fP packets, the IFF_BROADCAST flag will be set and
@@ -467,12 +475,14 @@ and the local address of the interface, 
 filtering incoming packets.  The interface sets IFF_RUNNING after
 it has allocated system resources and posted an initial read on the
 device it manages.  This state bit is used to avoid multiple allocation
-requests when an interface's address is changed.  The IFF_NOTRAILERS
-flag indicates the interface should refrain from using a \fItrailer\fP
-encapsulation on outgoing packets, or (where per-host negotiation
-of trailers is possible) that trailer encapsulations should not be requested;
-\fItrailer\fP protocols are described
-in section 14.  The IFF_NOARP flag indicates the interface should not
+requests when an interface's address is changed.
+.\" The IFF_NOTRAILERS
+.\" flag indicates the interface should refrain from using a \fItrailer\fP
+.\" encapsulation on outgoing packets, or (where per-host negotiation
+.\" of trailers is possible) that trailer encapsulations should not be
+.\" requested; \fItrailer\fP protocols are described
+.\" in section 14.
+The IFF_NOARP flag indicates the interface should not
 use an ``address resolution protocol'' in mapping internetwork addresses
 to local network addresses.
 .PP



CVS commit: src/share/doc/smm/18.net

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 19:53:14 UTC 2019

Modified Files:
src/share/doc/smm/18.net: 6.t

Log Message:
comment out the IFF_TRAILERS stuff that is no longer relevant and add
the missing flags.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/doc/smm/18.net/6.t

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



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 19:42:31 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_compat80.c

Log Message:
use -> instead of .


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_compat80.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/raidframe/rf_compat80.c
diff -u src/sys/dev/raidframe/rf_compat80.c:1.9 src/sys/dev/raidframe/rf_compat80.c:1.10
--- src/sys/dev/raidframe/rf_compat80.c:1.9	Tue Feb  5 12:13:37 2019
+++ src/sys/dev/raidframe/rf_compat80.c	Tue Feb  5 14:42:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat80.c,v 1.9 2019/02/05 17:13:37 christos Exp $	*/
+/*	$NetBSD: rf_compat80.c,v 1.10 2019/02/05 19:42:31 christos Exp $	*/
 
 /*
  * Copyright (c) 2017 Matthew R. Green
@@ -226,8 +226,8 @@ static int
 rf_fail_disk80(RF_Raid_t *raidPtr, struct rf_recon_req80 *req80)
 {
 	struct rf_recon_req req = {
-		.col = req80.col,
-		.flags = req80.flags,
+		.col = req80->col,
+		.flags = req80->flags,
 	};
 	return rf_fail_disk(raidPtr, );
 }



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 19:42:31 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_compat80.c

Log Message:
use -> instead of .


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_compat80.c

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



Re: CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
In article ,
Paul Goyette   wrote:
>> Module Name:src
>> Committed By:   mrg
>> Date:   Tue Feb  5 09:28:00 UTC 2019
>>
>> Modified Files:
>> src/sys/dev/raidframe: rf_netbsdkintf.c
>>
>> Log Message:
>> fix the previous:
>>
>> rf_netbsd32 is only relevant on _LP64 as all the structures are
>> the same for arm32 oabi/eabi compat.
>>
>> only do it for _LP64 *and* COMAPT_NETBSD32.
>
>This doesn't really do the job...
>
>Consider a kernel with raid(4) built-in, but _not_ built with 
>COMPAT_NETBSD32.  The raid code will not have any calls to the compat 
>hooks.  So even if you subsequently modload the compat_netbsd32 module 
>there won't be any way to call the compat code.
>
>The main raidframe driver code needs to be built _without_ depending on 
>COMPAT_NETBSD32 being defined at all.

There is also the consideration of compat_32 for all the _80 ioctls...

christos



CVS commit: src/tests/lib/libc/stdio

2019-02-05 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  5 17:30:19 UTC 2019

Modified Files:
src/tests/lib/libc/stdio: t_fopen.c

Log Message:
Add 2 new tests in t_fopen

Added:
 - fopen_nullptr (without COMPAT_10)
 - fopen_nullptr_compat10 (with COMPAT_10)

PR kern/53948

Reviewed by 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdio/t_fopen.c

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



CVS commit: src/tests/lib/libc/stdio

2019-02-05 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  5 17:30:19 UTC 2019

Modified Files:
src/tests/lib/libc/stdio: t_fopen.c

Log Message:
Add 2 new tests in t_fopen

Added:
 - fopen_nullptr (without COMPAT_10)
 - fopen_nullptr_compat10 (with COMPAT_10)

PR kern/53948

Reviewed by 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdio/t_fopen.c

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

Modified files:

Index: src/tests/lib/libc/stdio/t_fopen.c
diff -u src/tests/lib/libc/stdio/t_fopen.c:1.5 src/tests/lib/libc/stdio/t_fopen.c:1.6
--- src/tests/lib/libc/stdio/t_fopen.c:1.5	Mon Nov  6 23:06:55 2017
+++ src/tests/lib/libc/stdio/t_fopen.c	Tue Feb  5 17:30:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fopen.c,v 1.5 2017/11/06 23:06:55 kre Exp $ */
+/*	$NetBSD: t_fopen.c,v 1.6 2019/02/05 17:30:19 kamil Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,14 +29,18 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fopen.c,v 1.5 2017/11/06 23:06:55 kre Exp $");
+__RCSID("$NetBSD: t_fopen.c,v 1.6 2019/02/05 17:30:19 kamil Exp $");
 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -287,6 +291,114 @@ ATF_TC_CLEANUP(fopen_mode, tc)
 	(void)unlink(path);
 }
 
+static void
+check_kernel_modular(void)
+{
+	int err;
+
+	err = modctl(MODCTL_EXISTS, 0);
+	if (err == 0) return;
+	if (errno == ENOSYS)
+		atf_tc_skip("Kernel does not have 'options MODULAR'.");
+	if (errno == EPERM)
+		return; /* Module loading can be administratively forbidden */
+	ATF_REQUIRE_EQ_MSG(errno, 0, "unexpected error %d from "
+	"modctl(MODCTL_EXISTS, 0)", errno);
+}
+
+static bool
+is_module_present(const char *name)
+{
+	bool found;
+	size_t len;
+	int count;
+	struct iovec iov;
+	modstat_t *ms;
+
+	for (len = 8192; ;) {
+		iov.iov_base = malloc(len);
+		iov.iov_len = len;
+
+		errno = 0;
+
+		if (modctl(MODCTL_STAT, ) != 0) {
+			fprintf(stderr, "modctl(MODCTL_STAT) failed: %s\n",
+			strerror(errno));
+			atf_tc_fail("Failed to query module status");
+		}
+		if (len >= iov.iov_len)
+			break;
+		free(iov.iov_base);
+		len = iov.iov_len;
+	}
+
+	found = false;
+	count = *(int *)iov.iov_base;
+	ms = (modstat_t *)((char *)iov.iov_base + sizeof(int));
+	while (count > 0) {
+		if (strcmp(ms->ms_name, name) == 0) {
+			found = true;
+			break;
+		}
+		ms++;
+		count--;
+	}
+
+	free(iov.iov_base);
+
+	return found;
+}
+
+#define COMPAT10_MODNAME "compat_10"
+
+ATF_TC(fopen_nullptr);
+ATF_TC_HEAD(fopen_nullptr, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test fopen(3) with NULL path (without "
+	COMPAT10_MODNAME ")");
+}
+
+ATF_TC_BODY(fopen_nullptr, tc)
+{
+	bool compat10;
+
+	check_kernel_modular();
+	compat10 = is_module_present(COMPAT10_MODNAME);
+
+	if (compat10)
+		atf_tc_skip("Kernel does have the " COMPAT10_MODNAME
+		" module loaded into the kernel");
+
+	/* NULL shall trigger error */
+	ATF_REQUIRE_ERRNO(EFAULT, fopen(NULL, "r") == NULL);
+}
+
+ATF_TC(fopen_nullptr_compat10);
+ATF_TC_HEAD(fopen_nullptr_compat10, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test fopen(3) with NULL path (with "
+	COMPAT10_MODNAME ")");
+}
+
+ATF_TC_BODY(fopen_nullptr_compat10, tc)
+{
+	FILE *fp;
+	bool compat10;
+
+	check_kernel_modular();
+	compat10 = is_module_present(COMPAT10_MODNAME);
+
+	if (!compat10)
+		atf_tc_skip("Kernel does not have the " COMPAT10_MODNAME
+		" module loaded into the kernel");
+
+	/* NULL is translated to "." and shall success */
+	fp = fopen(NULL, "r");
+
+	ATF_REQUIRE(fp != NULL);
+	ATF_REQUIRE(fclose(fp) == 0);
+}
+
 ATF_TC(fopen_perm);
 ATF_TC_HEAD(fopen_perm, tc)
 {
@@ -482,6 +594,8 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, fopen_append);
 	ATF_TP_ADD_TC(tp, fopen_err);
 	ATF_TP_ADD_TC(tp, fopen_mode);
+	ATF_TP_ADD_TC(tp, fopen_nullptr);
+	ATF_TP_ADD_TC(tp, fopen_nullptr_compat10);
 	ATF_TP_ADD_TC(tp, fopen_perm);
 	ATF_TP_ADD_TC(tp, fopen_regular);
 	ATF_TP_ADD_TC(tp, fopen_symlink);



CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 17:13:37 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_compat80.c rf_netbsd.h rf_netbsdkintf.c

Log Message:
- Fix the FAIL_DISK handling (it would prolly trash the wrong disk before
  since the request structs are different and the row in the old struct is
  the col in the new one).
- Restructure the way compat modules are loaded so that we only load them
  for the ioctls that need them. Put a comment explaining why...
- Set retcode after loading compat (now that the fail disk passthrough
  hack is gone), so that various ioctls don't always fail.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/raidframe/rf_compat80.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -u -r1.365 -r1.366 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_compat80.c
diff -u src/sys/dev/raidframe/rf_compat80.c:1.8 src/sys/dev/raidframe/rf_compat80.c:1.9
--- src/sys/dev/raidframe/rf_compat80.c:1.8	Sun Feb  3 03:02:24 2019
+++ src/sys/dev/raidframe/rf_compat80.c	Tue Feb  5 12:13:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat80.c,v 1.8 2019/02/03 08:02:24 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat80.c,v 1.9 2019/02/05 17:13:37 christos Exp $	*/
 
 /*
  * Copyright (c) 2017 Matthew R. Green
@@ -222,6 +222,16 @@ rf_config80(RF_Raid_t *raidPtr, int unit
 	return 0;
 }
 
+static int
+rf_fail_disk80(RF_Raid_t *raidPtr, struct rf_recon_req80 *req80)
+{
+	struct rf_recon_req req = {
+		.col = req80.col,
+		.flags = req80.flags,
+	};
+	return rf_fail_disk(raidPtr, );
+}
+
 int
 raidframe_ioctl_80(u_long cmd, int initted, RF_Raid_t *raidPtr, int unit,
 void *data, RF_Config_t **k_cfg)  
@@ -238,9 +248,8 @@ raidframe_ioctl_80(u_long cmd, int initt
 			return ENXIO;
 		break;
 	case RAIDFRAME_CONFIGURE80:
-		break;
 	case RAIDFRAME_FAIL_DISK80:
-		return EPASSTHROUGH;
+		break;
 	default:
 		return EPASSTHROUGH;
 	}
@@ -261,8 +270,12 @@ raidframe_ioctl_80(u_long cmd, int initt
 		if (error != 0)
 			return error;
 		return EAGAIN;  /* flag mainline to call generic config */ 
+	case RAIDFRAME_FAIL_DISK80:
+		return rf_fail_disk80(raidPtr, data);
+	default:
+		/* abort really */
+		return EPASSTHROUGH;
 	}
-	return EPASSTHROUGH;
 }
  
 static void

Index: src/sys/dev/raidframe/rf_netbsd.h
diff -u src/sys/dev/raidframe/rf_netbsd.h:1.30 src/sys/dev/raidframe/rf_netbsd.h:1.31
--- src/sys/dev/raidframe/rf_netbsd.h:1.30	Sat Apr 27 17:18:42 2013
+++ src/sys/dev/raidframe/rf_netbsd.h	Tue Feb  5 12:13:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsd.h,v 1.30 2013/04/27 21:18:42 christos Exp $	*/
+/*	$NetBSD: rf_netbsd.h,v 1.31 2019/02/05 17:13:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -103,4 +103,6 @@ typedef struct RF_ConfigSet_s {
 	struct RF_ConfigSet_s *next;
 } RF_ConfigSet_t;
 
+int rf_fail_disk(RF_Raid_t *, struct rf_recon_req *);
+
 #endif /* _RF__RF_NETBSDSTUFF_H_ */

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.365 src/sys/dev/raidframe/rf_netbsdkintf.c:1.366
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.365	Tue Feb  5 04:45:38 2019
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Tue Feb  5 12:13:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.365 2019/02/05 09:45:38 mrg Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.366 2019/02/05 17:13:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.365 2019/02/05 09:45:38 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.366 2019/02/05 17:13:37 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -149,6 +149,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin
 #include "rf_parityscan.h"
 #include "rf_threadstuff.h"
 
+#include "rf_compat50.h"
 #include "rf_compat80.h"
 
 #ifdef COMPAT_NETBSD32
@@ -1049,6 +1050,145 @@ raid_detach_unlocked(struct raid_softc *
 	return 0;
 }
 
+static bool
+rf_must_be_initialized(const struct raid_softc *rs, u_long cmd)
+{
+	switch (cmd) {
+	case RAIDFRAME_ADD_HOT_SPARE:
+	case RAIDFRAME_CHECK_COPYBACK_STATUS:
+	case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT:
+	case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80:
+	case RAIDFRAME_CHECK_PARITY:
+	case RAIDFRAME_CHECK_PARITYREWRITE_STATUS:
+	case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT:
+	case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT80:
+	case RAIDFRAME_CHECK_RECON_STATUS:
+	case RAIDFRAME_CHECK_RECON_STATUS_EXT:
+	case RAIDFRAME_CHECK_RECON_STATUS_EXT80:
+	case RAIDFRAME_COPYBACK:
+	case RAIDFRAME_DELETE_COMPONENT:
+	case RAIDFRAME_FAIL_DISK:
+	case RAIDFRAME_FAIL_DISK80:
+	case RAIDFRAME_GET_ACCTOTALS:
+	case 

CVS commit: src/sys/dev/raidframe

2019-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  5 17:13:37 UTC 2019

Modified Files:
src/sys/dev/raidframe: rf_compat80.c rf_netbsd.h rf_netbsdkintf.c

Log Message:
- Fix the FAIL_DISK handling (it would prolly trash the wrong disk before
  since the request structs are different and the row in the old struct is
  the col in the new one).
- Restructure the way compat modules are loaded so that we only load them
  for the ioctls that need them. Put a comment explaining why...
- Set retcode after loading compat (now that the fail disk passthrough
  hack is gone), so that various ioctls don't always fail.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/raidframe/rf_compat80.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -u -r1.365 -r1.366 src/sys/dev/raidframe/rf_netbsdkintf.c

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



CVS commit: src/tests/lib/libnvmm

2019-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb  5 17:03:10 UTC 2019

Modified Files:
src/tests/lib/libnvmm: h_io_assist.c

Log Message:
Ah, I had warnings disabled, fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libnvmm/h_io_assist.c

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

Modified files:

Index: src/tests/lib/libnvmm/h_io_assist.c
diff -u src/tests/lib/libnvmm/h_io_assist.c:1.1 src/tests/lib/libnvmm/h_io_assist.c:1.2
--- src/tests/lib/libnvmm/h_io_assist.c:1.1	Tue Feb  5 13:00:03 2019
+++ src/tests/lib/libnvmm/h_io_assist.c	Tue Feb  5 17:03:10 2019
@@ -49,7 +49,7 @@
 
 static char iobuf[IO_SIZE];
 
-static uint8_t *databuf;
+static char *databuf;
 static uint8_t *instbuf;
 
 static void



CVS commit: src/tests/lib/libnvmm

2019-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb  5 17:03:10 UTC 2019

Modified Files:
src/tests/lib/libnvmm: h_io_assist.c

Log Message:
Ah, I had warnings disabled, fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libnvmm/h_io_assist.c

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



CVS commit: src/lib/libnvmm

2019-02-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  5 15:03:35 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
Mark up NULL with Dv. Remove empty line.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libnvmm/libnvmm.3

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



CVS commit: src/lib/libnvmm

2019-02-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  5 15:03:35 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
Mark up NULL with Dv. Remove empty line.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libnvmm/libnvmm.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/libnvmm/libnvmm.3
diff -u src/lib/libnvmm/libnvmm.3:1.10 src/lib/libnvmm/libnvmm.3:1.11
--- src/lib/libnvmm/libnvmm.3:1.10	Tue Feb  5 13:56:32 2019
+++ src/lib/libnvmm/libnvmm.3	Tue Feb  5 15:03:35 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: libnvmm.3,v 1.10 2019/02/05 13:56:32 maxv Exp $
+.\"	$NetBSD: libnvmm.3,v 1.11 2019/02/05 15:03:35 wiz Exp $
 .\"
 .\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -377,7 +377,6 @@ During VM exits, a partial VCPU state ar
 see
 .Sx Exit Reasons
 below for details.
-
 .Ss Exit Reasons
 The
 .Cd nvmm_exit
@@ -499,7 +498,8 @@ or
 .Fn nvmm_assist_mem
 are invoked.
 VMM software that does not intend to use either of these assists can put
-NULL in the callbacks.
+.Dv NULL
+in the callbacks.
 .Ss I/O Assist
 When a VM exit occurs with reason
 .Cd NVMM_EXIT_IO ,



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 14:07:24 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
- arm64 works
- alpha seems to work in simple testing
- armeb builds
- powerpc64 has ICE building libgcc2.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/README.gcc7

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc7
diff -u src/external/gpl3/gcc/README.gcc7:1.7 src/external/gpl3/gcc/README.gcc7:1.8
--- src/external/gpl3/gcc/README.gcc7:1.7	Tue Feb  5 12:08:12 2019
+++ src/external/gpl3/gcc/README.gcc7	Tue Feb  5 14:07:24 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc7,v 1.7 2019/02/05 12:08:12 mrg Exp $
+$NetBSD: README.gcc7,v 1.8 2019/02/05 14:07:24 mrg Exp $
 
 new stuff (from gcc 5):
 	cc1objcplus
@@ -26,10 +26,10 @@ atf:		does atf run / compare well
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 	-	---	--	--			---
-aarch64		y	?	y	y		n[2]		?	?
-alpha		y	?	y	y		y		y	?
+aarch64		y	y	y	y		y		y	?
+alpha		y	y	y	y		y		y	?
 arm		y	y	y	y		y		y	?
-armeb		y	?	y	y		?		?	?
+armeb		y	?	y	y		y		?	?
 earm		?	?	?	?		?		?	?
 earmeb		?	?	?	?		?		?	?
 earmhf		?	?	?	?		?		?	?
@@ -54,7 +54,7 @@ mipsel		y	?	?	y		?		?	?
 mips64eb	y	y	y	y		y		y	?
 mips64el	y	?	?	y		?		?	?
 powerpc		y	y	y	y		y		y	?
-powerpc64	y	?	y	y		?		?	?
+powerpc64	y	?	y	y		n[9]		?	?
 sh3eb		y	?	y	y		?		?	?
 sh3el		y	?	y	y		?		?	?
 sparc		y	y	y	y		y		y	?
@@ -71,7 +71,7 @@ architecture	tools	kernels	libgcc	native
 
 [1] - sparc64-gcc gets ICE at startup.  because sizeof(ufast8/16/32) != sizeof(sfast8/16/32)
 	-- uncommited hack to workaround it seems to work fine.
-[2] - __curbrk won't link libc.so
+[2]
 [3] - gcc can't be built: 
 	/usr/src6/external/gpl3/gcc/dist/gcc/calls.c:1361:1: error: unrecognizable insn:
 	 }
@@ -89,3 +89,4 @@ architecture	tools	kernels	libgcc	native
 [6] - uncommited changes that need confirming.
 [7] - ramdisk fails:  32,nbmakefs: Writing inode 1562 (work/./usr/mdec/boot), bytes 229376 + 4096: No space left on device
 [8] - ramdisk fails:  32,nbmakefs: Writing inode 1026 (work/./usr/share/zoneinfo/US/Alaska), bytes 0 + 2380: No space left on device
+[9] - /usr/src6/external/gpl3/gcc/dist/libgcc/libgcc2.c:2036:1: error: unrecognizable insn:



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 14:07:24 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
- arm64 works
- alpha seems to work in simple testing
- armeb builds
- powerpc64 has ICE building libgcc2.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/README.gcc7

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



CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 14:01:46 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
re-port host_detect_local_cpu() to netbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.3 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.4
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.3	Sat Jan 19 12:10:05 2019
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c	Tue Feb  5 14:01:46 2019
@@ -166,222 +166,30 @@ contains_core_p (unsigned *arr, unsigned
 #include 
 #include 
 #include 
+#endif
 
 const char *
 host_detect_local_cpu (int argc, const char **argv)
 {
-  const char *arch_id = NULL;
-  const char *res = NULL;
-  static const int num_exts = ARRAY_SIZE (aarch64_extensions);
-  char buf[128];
-  bool arch = false;
-  bool tune = false;
-  bool cpu = false;
-  unsigned int i, curcpu;
-  unsigned int core_idx = 0;
-  const char* imps[2] = { NULL, NULL };
-  const char* cores[2] = { NULL, NULL };
-  unsigned int n_cores = 0;
-  unsigned int n_imps = 0;
-  bool processed_exts = false;
-  const char *ext_string = "";
-  unsigned long extension_flags = 0;
-  unsigned long default_flags = 0;
-  size_t len;
-  char impl_buf[8];
-  char part_buf[8];
-  int mib[2], ncpu;
-
-  gcc_assert (argc);
-
-  if (!argv[0])
-goto not_found;
-
-  /* Are we processing -march, mtune or mcpu?  */
-  arch = strcmp (argv[0], "arch") == 0;
-  if (!arch)
-tune = strcmp (argv[0], "tune") == 0;
-
-  if (!arch && !tune)
-cpu = strcmp (argv[0], "cpu") == 0;
-
-  if (!arch && !tune && !cpu)
-goto not_found;
-
-  mib[0] = CTL_HW;
-  mib[1] = HW_NCPU; 
-  len = sizeof(ncpu);
-  if (sysctl(mib, 2, , , NULL, 0) == -1)
-goto not_found;
-
-  for (curcpu = 0; curcpu < ncpu; curcpu++)
-{
-  char path[128];
-  struct aarch64_sysctl_cpu_id id;
-
-  len = sizeof id;
-  snprintf(path, sizeof path, "machdep.cpu%d.cpu_id", curcpu);
-  if (sysctlbyname(path, , , NULL, 0) != 0)
-goto not_found;
-
-  snprintf(impl_buf, sizeof impl_buf, "0x%02x",
-	   (int)__SHIFTOUT(id.ac_midr, MIDR_EL1_IMPL));
-  snprintf(part_buf, sizeof part_buf, "0x%02x",
-	   (int)__SHIFTOUT(id.ac_midr, MIDR_EL1_PARTNUM));
-
-  for (i = 0; aarch64_cpu_data[i].name != NULL; i++)
-if (strstr (impl_buf, aarch64_cpu_data[i].implementer_id) != NULL
-&& !contains_string_p (imps, aarch64_cpu_data[i].implementer_id))
-  {
-if (n_imps == 2)
-  goto not_found;
-
-imps[n_imps++] = aarch64_cpu_data[i].implementer_id;
-
-break;
-  }
-
-  for (i = 0; aarch64_cpu_data[i].name != NULL; i++)
-if (strstr (part_buf, aarch64_cpu_data[i].part_no) != NULL
-&& !contains_string_p (cores, aarch64_cpu_data[i].part_no))
-  {
-if (n_cores == 2)
-  goto not_found;
-
-cores[n_cores++] = aarch64_cpu_data[i].part_no;
-core_idx = i;
-arch_id = aarch64_cpu_data[i].arch;
-break;
-  }
-
-  if (!tune && !processed_exts)
-{
-  for (i = 0; i < num_exts; i++)
-{
-  bool enabled;
-
-  if (strcmp(aarch64_extensions[i].ext, "fp") == 0)
-enabled = (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_FP)
-			   == ID_AA64PFR0_EL1_FP_IMPL);
-  else if (strcmp(aarch64_extensions[i].ext, "simd") == 0)
-enabled = (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_ADVSIMD)
-			   == ID_AA64PFR0_EL1_ADV_SIMD_IMPL);
-  else if (strcmp(aarch64_extensions[i].ext, "crypto") == 0)
-enabled = (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_AES)
-			   & ID_AA64ISAR0_EL1_AES_AES) != 0;
-  else if (strcmp(aarch64_extensions[i].ext, "crc") == 0)
-enabled = (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_CRC32)
-			   == ID_AA64ISAR0_EL1_CRC32_CRC32X);
-  else if (strcmp(aarch64_extensions[i].ext, "lse") == 0)
-enabled = false;
-  else
-		{
-  warning(0, "Unknown extension '%s'", aarch64_extensions[i].ext);
-		  goto not_found;
-		}
-
-  if (enabled)
-extension_flags |= aarch64_extensions[i].flag;
-  else
-extension_flags &= ~(aarch64_extensions[i].flag);
-}
-
-  processed_exts = true;
-	}
-}
-
-  /* Weird cpuinfo format that we don't know how to handle.  */
-  if (n_cores == 0 || n_cores > 2 || n_imps != 1)
-

CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 14:01:46 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
re-port host_detect_local_cpu() to netbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c

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



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

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 13:57:25 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: ad.aarch64

Log Message:
add gcc-7 specific header.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/comp/ad.aarch64

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.29 src/distrib/sets/lists/comp/ad.aarch64:1.30
--- src/distrib/sets/lists/comp/ad.aarch64:1.29	Sat Jan 19 13:06:50 2019
+++ src/distrib/sets/lists/comp/ad.aarch64	Tue Feb  5 13:57:25 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.29 2019/01/19 13:06:50 mrg Exp $
+# $NetBSD: ad.aarch64,v 1.30 2019/02/05 13:57:25 mrg Exp $
 ./usr/include/aarch64comp-c-include
 ./usr/include/aarch64/ansi.h			comp-c-include
 ./usr/include/aarch64/aout_machdep.h		comp-c-include
@@ -141,6 +141,7 @@
 ./usr/include/gcc-7/arm_acle.h			comp-c-include		gcc=7
 ./usr/include/gcc-7/arm_neon.h			comp-c-include		gcc=7
 ./usr/include/gcc-7/tgmath.h			comp-c-include		gcc=7
+./usr/include/gcc-7/arm_fp16.h			comp-c-include		gcc=7
 ./usr/include/ieeefp.hcomp-c-include
 ./usr/lib/eabi/libarm.acomp-c-lib		compat,llvm
 ./usr/lib/eabi/libarm.so			base-sys-shlib		compat,pic,llvm



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

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 13:57:25 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: ad.aarch64

Log Message:
add gcc-7 specific header.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/comp/ad.aarch64

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



CVS commit: src/lib/libnvmm

2019-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb  5 13:56:32 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
Sync with reality, and improve.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libnvmm/libnvmm.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/libnvmm/libnvmm.3
diff -u src/lib/libnvmm/libnvmm.3:1.9 src/lib/libnvmm/libnvmm.3:1.10
--- src/lib/libnvmm/libnvmm.3:1.9	Mon Jan  7 22:17:02 2019
+++ src/lib/libnvmm/libnvmm.3	Tue Feb  5 13:56:32 2019
@@ -1,6 +1,6 @@
-.\"	$NetBSD: libnvmm.3,v 1.9 2019/01/07 22:17:02 wiz Exp $
+.\"	$NetBSD: libnvmm.3,v 1.10 2019/02/05 13:56:32 maxv Exp $
 .\"
-.\" Copyright (c) 2018 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -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 January 7, 2019
+.Dd February 5, 2019
 .Dt LIBNVMM 3
 .Os
 .Sh NAME
@@ -96,10 +96,13 @@ A virtual machine is described by an opa
 VMM software should not attempt to modify this structure directly, and should
 use the API provided by
 .Nm
-to handle virtual machines.
+to manage virtual machines.
 .Pp
 .Fn nvmm_capability
 gets the capabilities of NVMM.
+See
+.Sx NVMM Capability
+below for details.
 .Pp
 .Fn nvmm_machine_create
 creates a virtual machine in the kernel.
@@ -159,6 +162,17 @@ See
 .Sx VCPU State Area
 below for details.
 .Pp
+.Fn nvmm_vcpu_inject
+injects into the CPU identified by
+.Fa cpuid
+of the machine
+.Fa mach
+an event described by
+.Fa event .
+See
+.Sx Event Injection
+below for details.
+.Pp
 .Fn nvmm_vcpu_run
 runs the CPU identified by
 .Fa cpuid
@@ -282,17 +296,88 @@ For example, the
 field indicates the maximum number of virtual machines supported, while
 .Cd max_vcpus
 indicates the maximum number of VCPUs supported per virtual machine.
+.Ss Guest-Host Mappings
+Each virtual machine has an associated guest physical memory.
+VMM software is allowed to modify this guest physical memory by mapping
+it into some parts of its virtual address space.
+.Pp
+VMM software should follow the following steps to achieve that:
+.Pp
+.Bl -bullet -offset indent -compact
+.It
+Call
+.Fn nvmm_hva_map
+to create in the host's virtual address space an area of memory that can
+be shared with a guest.
+Typically, the
+.Fa hva
+parameter will be a pointer to an area that was previously mapped via
+.Fn mmap .
+.Fn nvmm_hva_map
+will replace the content of the area, and will make it read-write (but not
+executable).
+.It
+Make available in the guest an area of guest physical memory, by calling
+.Fn nvmm_gpa_map
+and passing in the
+.Fa hva
+parameter the value that was previously given to
+.Fn nvmm_hva_map .
+.Fn nvmm_gpa_map
+does not replace the content of any memory, it only creates a direct link
+from
+.Fa gpa
+into
+.Fa hva .
+.Fn nvmm_gpa_unmap
+removes this link without modifying
+.Fa hva .
+.El
+.Pp
+The guest will then be able to use the guest physical address passed in the
+.Fa gpa
+parameter of
+.Fn nvmm_gpa_map .
+Each change the guest makes in
+.Fa gpa
+will be reflected in the host's
+.Fa hva ,
+and vice versa.
+.Pp
+It is illegal for VMM software to use
+.Fn munmap
+on an area that was mapped via
+.Fn nvmm_hva_map .
 .Ss VCPU State Area
 A VCPU state area is a structure that entirely defines the content of the
 registers of a VCPU.
 Only one such structure exists, for x86:
 .Bd -literal
 struct nvmm_x64_state {
-	...
+	struct nvmm_x64_state_seg segs[NVMM_X64_NSEG];
+	uint64_t gprs[NVMM_X64_NGPR];
+	uint64_t crs[NVMM_X64_NCR];
+	uint64_t drs[NVMM_X64_NDR];
+	uint64_t msrs[NVMM_X64_NMSR];
+	uint64_t misc[NVMM_X64_NMISC];
+	struct fxsave fpu;
 };
 .Ed
 .Pp
 Refer to functional examples to see precisely how to use this structure.
+.Pp
+A VCPU state area is divided in sub-states.
+A
+.Fa flags
+parameter is used to set and get the VCPU state; it acts as a bitmap which
+indicates which sub-states to set or get.
+.Pp
+During VM exits, a partial VCPU state area is provided in
+.Va exitstate ,
+see
+.Sx Exit Reasons
+below for details.
+
 .Ss Exit Reasons
 The
 .Cd nvmm_exit
@@ -307,7 +392,8 @@ enum nvmm_exit_reason {
 	NVMM_EXIT_MSR		= 0x0003,
 	NVMM_EXIT_INT_READY	= 0x0004,
 	NVMM_EXIT_NMI_READY	= 0x0005,
-	NVMM_EXIT_SHUTDOWN	= 0x0006,
+	NVMM_EXIT_HALTED	= 0x0006,
+	NVMM_EXIT_SHUTDOWN	= 0x0007,
 
 	/* Instructions (x86). */
 	...
@@ -392,6 +478,28 @@ and NVMM will cause a VM exit with reaso
 or
 .Cd NVMM_EXIT_NMI_READY
 to indicate that VMM software can now reinject the desired event.
+.Ss Assist Callbacks
+In order to assist emulation of certain operations,
+.Nm
+requires VMM software to register, via
+.Fn 

CVS commit: src/lib/libnvmm

2019-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb  5 13:56:32 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
Sync with reality, and improve.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libnvmm/libnvmm.3

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



CVS commit: src/sys/kern

2019-02-05 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  5 13:50:10 UTC 2019

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

Log Message:
The panic for fopen(NULL, ... is back, fix it

Restore the original behavior before merging the compat refactoring branch.

Now:
 - no compat_10 -> perform pathbuf_copyin() and report EFAULT
 - compat_10 and error -> report error
 - compat_10 and success -> return file descriptor for "."

PR kern/53948


To generate a diff of this commit:
cvs rdiff -u -r1.523 -r1.524 src/sys/kern/vfs_syscalls.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/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.523 src/sys/kern/vfs_syscalls.c:1.524
--- src/sys/kern/vfs_syscalls.c:1.523	Tue Feb  5 09:34:38 2019
+++ src/sys/kern/vfs_syscalls.c	Tue Feb  5 13:50:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.523 2019/02/05 09:34:38 pgoyette Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.524 2019/02/05 13:50:10 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.523 2019/02/05 09:34:38 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.524 2019/02/05 13:50:10 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -1636,9 +1636,12 @@ do_sys_openat(lwp_t *l, int fdat, const 
 
 	if (path == NULL) {
 		MODULE_CALL_HOOK(vfs_openat_10_hook, (), enosys(), error);
-		if (error != 0 && error != ENOSYS)
+		if (error == ENOSYS)
+			goto no_compat;
+		if (error)
 			return error;
 	} else {
+no_compat:
 		error = pathbuf_copyin(path, );
 		if (error)
 			return error;



CVS commit: src/sys/kern

2019-02-05 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  5 13:50:10 UTC 2019

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

Log Message:
The panic for fopen(NULL, ... is back, fix it

Restore the original behavior before merging the compat refactoring branch.

Now:
 - no compat_10 -> perform pathbuf_copyin() and report EFAULT
 - compat_10 and error -> report error
 - compat_10 and success -> return file descriptor for "."

PR kern/53948


To generate a diff of this commit:
cvs rdiff -u -r1.523 -r1.524 src/sys/kern/vfs_syscalls.c

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



CVS commit: src/lib/libc/arch/aarch64/sys

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 13:02:36 UTC 2019

Modified Files:
src/lib/libc/arch/aarch64/sys: brk.S

Log Message:
use adrp not adr, since the data is not pc-rel.  fixes brk(2).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/sys/brk.S

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



CVS commit: src/lib/libc/arch/aarch64/sys

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 13:02:36 UTC 2019

Modified Files:
src/lib/libc/arch/aarch64/sys: brk.S

Log Message:
use adrp not adr, since the data is not pc-rel.  fixes brk(2).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/sys/brk.S

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

Modified files:

Index: src/lib/libc/arch/aarch64/sys/brk.S
diff -u src/lib/libc/arch/aarch64/sys/brk.S:1.1 src/lib/libc/arch/aarch64/sys/brk.S:1.2
--- src/lib/libc/arch/aarch64/sys/brk.S:1.1	Sun Aug 10 05:47:37 2014
+++ src/lib/libc/arch/aarch64/sys/brk.S	Tue Feb  5 13:02:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: brk.S,v 1.1 2014/08/10 05:47:37 matt Exp $ */
+/* $NetBSD: brk.S,v 1.2 2019/02/05 13:02:35 mrg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -49,7 +49,7 @@ _C_LABEL(__minbrk):
  * Change the data segment size
  */
 ENTRY(_brk)
-	adr	x9, _C_LABEL(__minbrk)
+	adrp	x9, _C_LABEL(__minbrk)
 	ldr	x10, [x9, #:lo12:_C_LABEL(__minbrk)]
 
 	/*
@@ -63,7 +63,7 @@ ENTRY(_brk)
 	_INVOKE_CERROR()
 
 	/* Store the new address in curbrk */
-	adr	x9, _C_LABEL(__curbrk)
+	adrp	x9, _C_LABEL(__curbrk)
 	str	x11, [x9, #:lo12:_C_LABEL(__curbrk)]
 
 	/* Return 0 for success */



CVS commit: src

2019-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb  5 13:00:03 UTC 2019

Modified Files:
src/distrib/sets/lists/debug: md.amd64
src/distrib/sets/lists/tests: md.amd64
src/tests/lib/libnvmm: Makefile
Added Files:
src/tests/lib/libnvmm: h_io_assist.c h_io_assist_asm.S t_io_assist.sh

Log Message:
Add 12 tests for libnvmm's I/O Assist.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/tests/md.amd64
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libnvmm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libnvmm/h_io_assist.c \
src/tests/lib/libnvmm/h_io_assist_asm.S \
src/tests/lib/libnvmm/t_io_assist.sh

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



CVS commit: src

2019-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb  5 13:00:03 UTC 2019

Modified Files:
src/distrib/sets/lists/debug: md.amd64
src/distrib/sets/lists/tests: md.amd64
src/tests/lib/libnvmm: Makefile
Added Files:
src/tests/lib/libnvmm: h_io_assist.c h_io_assist_asm.S t_io_assist.sh

Log Message:
Add 12 tests for libnvmm's I/O Assist.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/tests/md.amd64
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libnvmm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libnvmm/h_io_assist.c \
src/tests/lib/libnvmm/h_io_assist_asm.S \
src/tests/lib/libnvmm/t_io_assist.sh

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

Modified files:

Index: src/distrib/sets/lists/debug/md.amd64
diff -u src/distrib/sets/lists/debug/md.amd64:1.104 src/distrib/sets/lists/debug/md.amd64:1.105
--- src/distrib/sets/lists/debug/md.amd64:1.104	Mon Dec 24 13:31:22 2018
+++ src/distrib/sets/lists/debug/md.amd64	Tue Feb  5 13:00:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.104 2018/12/24 13:31:22 christos Exp $
+# $NetBSD: md.amd64,v 1.105 2019/02/05 13:00:03 maxv Exp $
 ./usr/lib/i386/12.202++_g.a			comp-c-debuglib		debuglib,compat,12.202xx
 ./usr/lib/i386/libi386_g.a			comp-c-debuglib		debuglib,compat
 ./usr/lib/i386/libiberty_g.a			comp-obsolete		obsolete
@@ -24,4 +24,5 @@
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait6.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_waitid.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_waitpid.debug	tests-obsolete	obsolete
+./usr/libdata/debug/usr/tests/lib/libnvmm/h_io_assist.debug	tests-lib-debug	debug,atf
 ./usr/libdata/debug/usr/tests/lib/libnvmm/h_mem_assist.debug	tests-lib-debug	debug,atf

Index: src/distrib/sets/lists/tests/md.amd64
diff -u src/distrib/sets/lists/tests/md.amd64:1.6 src/distrib/sets/lists/tests/md.amd64:1.7
--- src/distrib/sets/lists/tests/md.amd64:1.6	Sun Dec 23 21:27:45 2018
+++ src/distrib/sets/lists/tests/md.amd64	Tue Feb  5 13:00:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.6 2018/12/23 21:27:45 jakllsch Exp $
+# $NetBSD: md.amd64,v 1.7 2019/02/05 13:00:03 maxv Exp $
 ./usr/tests/kernel/arch/x86/Atffile		tests-obsolete	obsolete
 ./usr/tests/kernel/arch/x86/Kyuafile		tests-obsolete	obsolete
 ./usr/tests/kernel/arch/x86/t_ptrace_wait	tests-obsolete	obsolete
@@ -7,5 +7,7 @@
 ./usr/tests/kernel/arch/x86/t_ptrace_wait6	tests-obsolete	obsolete
 ./usr/tests/kernel/arch/x86/t_ptrace_waitid	tests-obsolete	obsolete
 ./usr/tests/kernel/arch/x86/t_ptrace_waitpid	tests-obsolete	obsolete
+./usr/tests/lib/libnvmm/h_io_assist		tests-lib-tests	compattestfile,atf
+./usr/tests/lib/libnvmm/t_io_assist		tests-lib-tests	compattestfile,atf
 ./usr/tests/lib/libnvmm/h_mem_assist		tests-lib-tests	compattestfile,atf
 ./usr/tests/lib/libnvmm/t_mem_assist		tests-lib-tests	compattestfile,atf

Index: src/tests/lib/libnvmm/Makefile
diff -u src/tests/lib/libnvmm/Makefile:1.4 src/tests/lib/libnvmm/Makefile:1.5
--- src/tests/lib/libnvmm/Makefile:1.4	Mon Dec 24 05:06:45 2018
+++ src/tests/lib/libnvmm/Makefile	Tue Feb  5 13:00:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2018/12/24 05:06:45 kre Exp $
+# $NetBSD: Makefile,v 1.5 2019/02/05 13:00:03 maxv Exp $
 
 NOMAN= # defined
 
@@ -12,9 +12,14 @@ LDADD+=	-lnvmm
 BINDIR= ${TESTSDIR}
 
 .if ${MACHINE} == "amd64"
+# I/O Assist
+TESTS_SH=		t_io_assist
+PROGS=			h_io_assist
+SRCS.h_io_assist=	h_io_assist.c h_io_assist_asm.S
+
 # Mem Assist
-TESTS_SH=		t_mem_assist
-PROGS=			h_mem_assist
+TESTS_SH+=		t_mem_assist
+PROGS+=			h_mem_assist
 SRCS.h_mem_assist=	h_mem_assist.c h_mem_assist_asm.S
 .endif
 

Added files:

Index: src/tests/lib/libnvmm/h_io_assist.c
diff -u /dev/null src/tests/lib/libnvmm/h_io_assist.c:1.1
--- /dev/null	Tue Feb  5 13:00:04 2019
+++ src/tests/lib/libnvmm/h_io_assist.c	Tue Feb  5 13:00:03 2019
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Maxime Villard.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES 

CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:56:43 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc

Log Message:
provide empty version of Aarch64GetESR() for non-linux arm64.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc

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

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.25 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.26
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.25	Mon Feb  4 03:00:11 2019
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	Tue Feb  5 12:56:43 2019
@@ -1346,6 +1346,7 @@ void internal_join_thread(void *th) {}
 #endif
 
 #if defined(__aarch64__)
+#if SANITIZER_LINUX
 // Android headers in the older NDK releases miss this definition.
 struct __sanitizer_esr_context {
   struct _aarch64_ctx head;
@@ -1366,6 +1367,11 @@ static bool Aarch64GetESR(ucontext_t *uc
   }
   return false;
 }
+#else
+static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) {
+  return false;
+}
+#endif
 #endif
 
 SignalContext::WriteFlag SignalContext::GetWriteFlag(void *context) {



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:56:43 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc

Log Message:
provide empty version of Aarch64GetESR() for non-linux arm64.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc

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



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:42:09 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libgcc/arch/aarch64: defs.mk
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/aarch64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64: defs.mk
src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64: configargs.h
Added Files:
src/external/gpl3/gcc/usr.bin/common-target/arch: aarch64.mk

Log Message:
regen mknative-gcc gcc7 and arm64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/defs.mk
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/common-target/arch/aarch64.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.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/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk
diff -u src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk:1.4 src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk:1.5
--- src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk:1.4	Thu Jan 24 08:56:43 2019
+++ src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk	Tue Feb  5 12:42:08 2019
@@ -1,5 +1,5 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp 
+# Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
 G_INCLUDES=-I. -I. -I../.././gcc -I${GNUHOSTDIST}/libgcc -I${GNUHOSTDIST}/libgcc/. -I${GNUHOSTDIST}/libgcc/../gcc -I${GNUHOSTDIST}/libgcc/../include 
@@ -19,4 +19,3 @@ G_SHLIB_MAPFILES=libgcc-std.ver
 G_SHLIB_NM_FLAGS=-pg
 G_NOEXCEPTION_FLAGS=-fno-exceptions -fno-rtti -fasynchronous-unwind-tables
 G_EXTRA_HEADERS=${GNUHOSTDIST}/gcc/config/aarch64/arm_fp16.h ${GNUHOSTDIST}/gcc/config/aarch64/arm_neon.h ${GNUHOSTDIST}/gcc/config/aarch64/arm_acle.h ${GNUHOSTDIST}/gcc/ginclude/tgmath.h
-G_CONFIGLINKS=

Index: src/external/gpl3/gcc/lib/libiberty/defs.mk
diff -u src/external/gpl3/gcc/lib/libiberty/defs.mk:1.19 src/external/gpl3/gcc/lib/libiberty/defs.mk:1.20
--- src/external/gpl3/gcc/lib/libiberty/defs.mk:1.19	Tue Feb  5 12:01:44 2019
+++ src/external/gpl3/gcc/lib/libiberty/defs.mk	Tue Feb  5 12:42:08 2019
@@ -4,5 +4,5 @@
 #
 G_ALLOCA=
 G_EXTRA_OFILES=
-G_LIBOBJS=mempcpy.o strverscmp.o vfork.o
+G_LIBOBJS=mempcpy.o strverscmp.o
 G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o

Index: src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk
diff -u src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk:1.3 src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk:1.4
--- src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk:1.3	Thu Jan 24 08:56:44 2019
+++ src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk	Tue Feb  5 12:42:08 2019
@@ -1,5 +1,5 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp 
+# Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
 G_ALL_OPT_FILES=${GNUHOSTDIST}/gcc/brig/lang.opt ${GNUHOSTDIST}/gcc/lto/lang.opt ${GNUHOSTDIST}/gcc/c-family/c.opt ${GNUHOSTDIST}/gcc/common.opt ${GNUHOSTDIST}/gcc/config/aarch64/aarch64.opt ${GNUHOSTDIST}/gcc/config/netbsd.opt ${GNUHOSTDIST}/gcc/config/netbsd-elf.opt
@@ -8,4 +8,3 @@ G_INCLUDES=-I${GNUHOSTDIST}/libobjc/../g
 G_OBJC_SOURCE_FILES=NXConstStr.m Object.m Protocol.m accessors.m linking.m
 G_C_SOURCE_FILES=class.c encoding.c error.c gc.c hash.c init.c ivars.c memory.c methods.c nil_method.c objc-foreach.c objc-sync.c objects.c protocols.c sarray.c selector.c sendmsg.c thr.c exception.c
 G_OBJC_H=objc.h objc-exception.h objc-sync.h NXConstStr.h Object.h Protocol.h message.h 

CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:42:09 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libgcc/arch/aarch64: defs.mk
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/aarch64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64: defs.mk
src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64: configargs.h
Added Files:
src/external/gpl3/gcc/usr.bin/common-target/arch: aarch64.mk

Log Message:
regen mknative-gcc gcc7 and arm64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/defs.mk
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/common-target/arch/aarch64.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.h

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



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:08:12 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
update ppc64 status: mknativeg-gcc worked.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc7

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



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:08:12 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
update ppc64 status: mknativeg-gcc worked.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc7

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc7
diff -u src/external/gpl3/gcc/README.gcc7:1.6 src/external/gpl3/gcc/README.gcc7:1.7
--- src/external/gpl3/gcc/README.gcc7:1.6	Tue Feb  5 11:44:18 2019
+++ src/external/gpl3/gcc/README.gcc7	Tue Feb  5 12:08:12 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc7,v 1.6 2019/02/05 11:44:18 mrg Exp $
+$NetBSD: README.gcc7,v 1.7 2019/02/05 12:08:12 mrg Exp $
 
 new stuff (from gcc 5):
 	cc1objcplus
@@ -54,7 +54,7 @@ mipsel		y	?	?	y		?		?	?
 mips64eb	y	y	y	y		y		y	?
 mips64el	y	?	?	y		?		?	?
 powerpc		y	y	y	y		y		y	?
-powerpc64	n[9]	?	?	?		?		?	?
+powerpc64	y	?	y	y		?		?	?
 sh3eb		y	?	y	y		?		?	?
 sh3el		y	?	y	y		?		?	?
 sparc		y	y	y	y		y		y	?
@@ -89,6 +89,3 @@ architecture	tools	kernels	libgcc	native
 [6] - uncommited changes that need confirming.
 [7] - ramdisk fails:  32,nbmakefs: Writing inode 1562 (work/./usr/mdec/boot), bytes 229376 + 4096: No space left on device
 [8] - ramdisk fails:  32,nbmakefs: Writing inode 1026 (work/./usr/share/zoneinfo/US/Alaska), bytes 0 + 2380: No space left on device
-[9] - gcc doesn't build:
-	/usr/src6/tools/gcc/../../external/gpl3/gcc/dist/gcc/stor-layout.c:722:29: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2
-



CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:01:44 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/powerpc64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64: config.h
Added Files:
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: gthr-defs.mk
src/external/gpl3/gcc/usr.bin/common-target/arch: powerpc64.mk

Log Message:
mknative-gcc for GCC 7 and ppc64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/auto-target.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/gthr-defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/config.h \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/libgomp_f.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/omp.h
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libobjc/arch/powerpc64/defs.mk
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/cxxabi_tweaks.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-posix.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-single.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/defs.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/common-target/arch/powerpc64.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/bversion.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/plugin-version.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/gtyp-input.list
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/insn-modes.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64/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/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h
diff -u src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h:1.4 src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h:1.5
--- src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h:1.4	Tue Feb  6 09:18:16 2018
+++ src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h	Tue Feb  5 12:01:43 2019
@@ -1,9 +1,9 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp  */
+/* Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* backtrace-supported.h.in -- Whether stack backtrace is supported.
-   Copyright (C) 2012-2016 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
 
 Redistribution and use in source and binary forms, with or without
@@ -11,13 +11,13 @@ modification, are permitted provided tha
 met:
 
 

CVS commit: src/external/gpl3/gcc

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 12:01:44 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/powerpc64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64: config.h
Added Files:
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: gthr-defs.mk
src/external/gpl3/gcc/usr.bin/common-target/arch: powerpc64.mk

Log Message:
mknative-gcc for GCC 7 and ppc64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/auto-target.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/gthr-defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/config.h \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/libgomp_f.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/omp.h
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libobjc/arch/powerpc64/defs.mk
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/cxxabi_tweaks.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-posix.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-single.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/defs.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/common-target/arch/powerpc64.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/bversion.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/plugin-version.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/gtyp-input.list
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/insn-modes.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64/config.h

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



  1   2   >