CVS commit: src/sys/dev/pci

2015-06-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 10 12:14:59 UTC 2015

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

Log Message:
 Remove extra if_start() in wm_ioctl().


To generate a diff of this commit:
cvs rdiff -u -r1.332 -r1.333 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.332 src/sys/dev/pci/if_wm.c:1.333
--- src/sys/dev/pci/if_wm.c:1.332	Mon Jun  8 03:45:19 2015
+++ src/sys/dev/pci/if_wm.c	Wed Jun 10 12:14:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.332 2015/06/08 03:45:19 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.333 2015/06/10 12:14:59 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.332 2015/06/08 03:45:19 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.333 2015/06/10 12:14:59 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_net_mpsafe.h
@@ -2849,9 +2849,6 @@ wm_ioctl(struct ifnet *ifp, u_long cmd, 
 		break;
 	}
 
-	/* Try to get more packets going. */
-	ifp-if_start(ifp);
-
 #ifndef WM_MPSAFE
 	splx(s);
 #endif



CVS commit: src/sys/ufs/ufs

2015-06-10 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jun 10 15:28:27 UTC 2015

Modified Files:
src/sys/ufs/ufs: ufs_inode.c

Log Message:
ufs_inactive: take UFS_WAPBL_BEGIN() before calling chkiq().

Should fix PR kern/49948 (quota panic)


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/ufs/ufs/ufs_inode.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/ufs/ufs/ufs_inode.c
diff -u src/sys/ufs/ufs/ufs_inode.c:1.93 src/sys/ufs/ufs/ufs_inode.c:1.94
--- src/sys/ufs/ufs/ufs_inode.c:1.93	Wed Apr 15 14:39:24 2015
+++ src/sys/ufs/ufs/ufs_inode.c	Wed Jun 10 15:28:27 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_inode.c,v 1.93 2015/04/15 14:39:24 riastradh Exp $	*/
+/*	$NetBSD: ufs_inode.c,v 1.94 2015/06/10 15:28:27 hannken Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_inode.c,v 1.93 2015/04/15 14:39:24 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_inode.c,v 1.94 2015/06/10 15:28:27 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -84,27 +84,31 @@ ufs_inactive(void *v)
 	} */ *ap = v;
 	struct vnode *vp = ap-a_vp;
 	struct inode *ip = VTOI(vp);
-	struct mount *transmp;
+	struct mount *mp = vp-v_mount;
 	mode_t mode;
 	int error = 0;
+	bool wapbl_locked = false;
 
-	UFS_WAPBL_JUNLOCK_ASSERT(vp-v_mount);
+	UFS_WAPBL_JUNLOCK_ASSERT(mp);
 
-	transmp = vp-v_mount;
-	fstrans_start(transmp, FSTRANS_LAZY);
+	fstrans_start(mp, FSTRANS_LAZY);
 	/*
 	 * Ignore inodes related to stale file handles.
 	 */
 	if (ip-i_mode == 0)
 		goto out;
-	if (ip-i_nlink = 0  (vp-v_mount-mnt_flag  MNT_RDONLY) == 0) {
+	if (ip-i_nlink = 0  (mp-mnt_flag  MNT_RDONLY) == 0) {
 #ifdef UFS_EXTATTR
 		ufs_extattr_vnode_inactive(vp, curlwp);
 #endif
 		if (ip-i_size != 0)
 			error = ufs_truncate(vp, 0, NOCRED);
 #if defined(QUOTA) || defined(QUOTA2)
-		(void)chkiq(ip, -1, NOCRED, 0);
+		error = UFS_WAPBL_BEGIN(mp);
+		if (error == 0) {
+			wapbl_locked = true;
+			(void)chkiq(ip, -1, NOCRED, 0);
+		}
 #endif
 		DIP_ASSIGN(ip, rdev, 0);
 		mode = ip-i_mode;
@@ -118,20 +122,24 @@ ufs_inactive(void *v)
 	}
 
 	if (ip-i_flag  (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) {
-		error = UFS_WAPBL_BEGIN(vp-v_mount);
-		if (error)
-			goto out;
+		if (! wapbl_locked) {
+			error = UFS_WAPBL_BEGIN(mp);
+			if (error)
+goto out;
+			wapbl_locked = true;
+		}
 		UFS_UPDATE(vp, NULL, NULL, 0);
-		UFS_WAPBL_END(vp-v_mount);
 	}
 out:
+	if (wapbl_locked)
+		UFS_WAPBL_END(mp);
 	/*
 	 * If we are done with the inode, reclaim it
 	 * so that it can be reused immediately.
 	 */
 	*ap-a_recycle = (ip-i_mode == 0);
 	VOP_UNLOCK(vp);
-	fstrans_done(transmp);
+	fstrans_done(mp);
 	return (error);
 }
 



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

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 16:43:51 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #833):
sys/dev/pci/if_wm.c: revisions 1.322, 1.323
sys/dev/pci/if_wmreg.h: revision 1.72
- Currently, WM_F_EEE bit is not set on all chips. It's intened to not
  to use all of EEE fuctions but wm_set_eee_i350() leaves IPCNFG_10BASE_TE
  bit and it causes link negotiation problem on some old switches. Disable
  10BASE-Te function, too.
- Call wm_set_eee_i350() on some chips, too.
--
Fix a bug that flags related to semaphore were incorrectly checked in
wm_kmrn_{readreg,writereg}. i80003, ICH* and PCH* had this problem.


To generate a diff of this commit:
cvs rdiff -u -r1.289.2.7 -r1.289.2.8 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.60.2.3 -r1.60.2.4 src/sys/dev/pci/if_wmreg.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.289.2.7 src/sys/dev/pci/if_wm.c:1.289.2.8
--- src/sys/dev/pci/if_wm.c:1.289.2.7	Tue May 19 05:09:02 2015
+++ src/sys/dev/pci/if_wm.c	Wed Jun 10 16:43:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.289.2.7 2015/05/19 05:09:02 snj Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.289.2.8 2015/06/10 16:43:51 snj Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.289.2.7 2015/05/19 05:09:02 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.289.2.8 2015/06/10 16:43:51 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3766,7 +3766,7 @@ wm_reset(struct wm_softc *sc)
 	/* reload sc_ctrl */
 	sc-sc_ctrl = CSR_READ(sc, WMREG_CTRL);
 
-	if (sc-sc_type == WM_T_I350)
+	if ((sc-sc_type = WM_T_I350)  (sc-sc_type = WM_T_I211))
 		wm_set_eee_i350(sc);
 
 	/* dummy read from WUC */
@@ -7240,13 +7240,13 @@ wm_kmrn_readreg(struct wm_softc *sc, int
 {
 	int rv;
 
-	if (sc-sc_flags == WM_F_LOCK_SWFW) {
+	if (sc-sc_flags  WM_F_LOCK_SWFW) {
 		if (wm_get_swfw_semaphore(sc, SWFW_MAC_CSR_SM)) {
 			aprint_error_dev(sc-sc_dev,
 			%s: failed to get semaphore\n, __func__);
 			return 0;
 		}
-	} else if (sc-sc_flags == WM_F_LOCK_EXTCNF) {
+	} else if (sc-sc_flags  WM_F_LOCK_EXTCNF) {
 		if (wm_get_swfwhw_semaphore(sc)) {
 			aprint_error_dev(sc-sc_dev,
 			%s: failed to get semaphore\n, __func__);
@@ -7262,9 +7262,9 @@ wm_kmrn_readreg(struct wm_softc *sc, int
 
 	rv = CSR_READ(sc, WMREG_KUMCTRLSTA)  KUMCTRLSTA_MASK;
 
-	if (sc-sc_flags == WM_F_LOCK_SWFW)
+	if (sc-sc_flags  WM_F_LOCK_SWFW)
 		wm_put_swfw_semaphore(sc, SWFW_MAC_CSR_SM);
-	else if (sc-sc_flags == WM_F_LOCK_EXTCNF)
+	else if (sc-sc_flags  WM_F_LOCK_EXTCNF)
 		wm_put_swfwhw_semaphore(sc);
 
 	return rv;
@@ -7279,13 +7279,13 @@ static void
 wm_kmrn_writereg(struct wm_softc *sc, int reg, int val)
 {
 
-	if (sc-sc_flags == WM_F_LOCK_SWFW) {
+	if (sc-sc_flags  WM_F_LOCK_SWFW) {
 		if (wm_get_swfw_semaphore(sc, SWFW_MAC_CSR_SM)) {
 			aprint_error_dev(sc-sc_dev,
 			%s: failed to get semaphore\n, __func__);
 			return;
 		}
-	} else if (sc-sc_flags == WM_F_LOCK_EXTCNF) {
+	} else if (sc-sc_flags  WM_F_LOCK_EXTCNF) {
 		if (wm_get_swfwhw_semaphore(sc)) {
 			aprint_error_dev(sc-sc_dev,
 			%s: failed to get semaphore\n, __func__);
@@ -7297,9 +7297,9 @@ wm_kmrn_writereg(struct wm_softc *sc, in
 	((reg  KUMCTRLSTA_OFFSET_SHIFT)  KUMCTRLSTA_OFFSET) |
 	(val  KUMCTRLSTA_MASK));
 
-	if (sc-sc_flags == WM_F_LOCK_SWFW)
+	if (sc-sc_flags  WM_F_LOCK_SWFW)
 		wm_put_swfw_semaphore(sc, SWFW_MAC_CSR_SM);
-	else if (sc-sc_flags == WM_F_LOCK_EXTCNF)
+	else if (sc-sc_flags  WM_F_LOCK_EXTCNF)
 		wm_put_swfwhw_semaphore(sc);
 }
 
@@ -9535,6 +9535,7 @@ wm_set_eee_i350(struct wm_softc *sc)
 		| EEER_LPI_FC);
 	} else {
 		ipcnfg = ~(IPCNFG_EEE_1G_AN | IPCNFG_EEE_100M_AN);
+		ipcnfg = ~IPCNFG_10BASE_TE;
 		eeer = ~(EEER_TX_LPI_EN | EEER_RX_LPI_EN
 		| EEER_LPI_FC);
 	}

Index: src/sys/dev/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.60.2.3 src/sys/dev/pci/if_wmreg.h:1.60.2.4
--- src/sys/dev/pci/if_wmreg.h:1.60.2.3	Tue May 19 05:09:02 2015
+++ src/sys/dev/pci/if_wmreg.h	Wed Jun 10 16:43:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.60.2.3 2015/05/19 05:09:02 snj Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.60.2.4 2015/06/10 16:43:51 snj Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -642,6 +642,7 @@ struct livengood_tcpip_ctxdesc {
 #define EEER_EEER_TX_LPI_STATUS	0x8000 /* EEER Tx in LPI state */
 #define WMREG_EEE_SU	0x0e34	/* EEE Setup */
 #define WMREG_IPCNFG	0x0e38	/* Internal PHY Configuration */
+#define IPCNFG_10BASE_TE	0x0002 /* IPCNFG 10BASE-Te low power op. */
 #define IPCNFG_EEE_100M_AN	0x0004 /* IPCNFG EEE Ena 100M AN */
 #define IPCNFG_EEE_1G_AN	0x0008 /* IPCNFG EEE Ena 1G AN */
 



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSPosix

2015-06-10 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jun 10 16:32:43 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: mDNSUNP.c

Log Message:
Teach mdnsd about IN_IFF_NOTREADY and IN_IFF_DETACHED.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.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/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c:1.5 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c:1.6
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c:1.5	Fri Jan 16 20:16:36 2015
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c	Wed Jun 10 16:32:42 2015
@@ -279,6 +279,15 @@ struct ifi_info *get_ifi_info(int family
 continue;   /* ignore if interface not up */
 
 	/* Skip addresses we can't use */
+#ifdef SIOCGIFAFLAG_IN
+	if (ifr-ifr_addr.sa_family == AF_INET) {
+		ifrcopy = *ifr;
+		if (ioctl(sockfd, SIOCGIFAFLAG_IN, ifrcopy)  0)
+			goto gotError;
+		if (ifrcopy.ifr_addrflags  (IN_IFF_NOTREADY | IN_IFF_DETACHED))
+			continue;
+	}
+#endif
 #ifdef SIOCGIFAFLAG_IN6
 if (ifr-ifr_addr.sa_family == AF_INET6) {
 		struct in6_ifreq ifr6;



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

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 16:38:05 UTC 2015

Modified Files:
src/sys/arch/arm/omap [netbsd-7]: am335x_prcm.h files.omap2 omap2_reg.h
src/sys/arch/evbarm/conf [netbsd-7]: BEAGLEBONE
Added Files:
src/sys/arch/arm/omap [netbsd-7]: am335x_trng.c am335x_trngreg.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #830):
sys/arch/arm/omap/am335x_prcm.h: revision 1.9
sys/arch/arm/omap/am335x_trngreg.h: revision 1.1
sys/arch/arm/omap/am335x_trng.c: revision 1.1
sys/arch/arm/omap/files.omap2: revision 1.31
sys/arch/arm/omap/omap2_reg.h: revision 1.30
sys/arch/evbarm/conf/BEAGLEBONE: revision 1.32
Add driver for AM335x TRNG module.
--
enable trng driver


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.2.1 src/sys/arch/arm/omap/am335x_prcm.h
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/omap/am335x_trng.c \
src/sys/arch/arm/omap/am335x_trngreg.h
cvs rdiff -u -r1.28.2.1 -r1.28.2.2 src/sys/arch/arm/omap/files.omap2 \
src/sys/arch/arm/omap/omap2_reg.h
cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/arch/evbarm/conf/BEAGLEBONE

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/omap/am335x_prcm.h
diff -u src/sys/arch/arm/omap/am335x_prcm.h:1.8 src/sys/arch/arm/omap/am335x_prcm.h:1.8.2.1
--- src/sys/arch/arm/omap/am335x_prcm.h:1.8	Sun Jul 20 23:08:43 2014
+++ src/sys/arch/arm/omap/am335x_prcm.h	Wed Jun 10 16:38:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: am335x_prcm.h,v 1.8 2014/07/20 23:08:43 bouyer Exp $	*/
+/*	$NetBSD: am335x_prcm.h,v 1.8.2.1 2015/06/10 16:38:05 snj Exp $	*/
 
 /*
  * TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -63,6 +63,7 @@ struct omap_module {
 #define CM_PER_TIMER2_CLKCTRL		0x080
 #define CM_PER_TIMER3_CLKCTRL		0x084
 #define CM_PER_TIMER4_CLKCTRL		0x088
+#define CM_PER_RNG_CLKCTRL		0x090
 #define CM_PER_GPIO1_CLKCTRL		0x0AC
 #define CM_PER_GPIO2_CLKCTRL		0x0B0
 #define CM_PER_GPIO3_CLKCTRL		0x0B4

Index: src/sys/arch/arm/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.28.2.1 src/sys/arch/arm/omap/files.omap2:1.28.2.2
--- src/sys/arch/arm/omap/files.omap2:1.28.2.1	Sun Apr 19 04:37:17 2015
+++ src/sys/arch/arm/omap/files.omap2	Wed Jun 10 16:38:05 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.28.2.1 2015/04/19 04:37:17 msaitoh Exp $
+#	$NetBSD: files.omap2,v 1.28.2.2 2015/06/10 16:38:05 snj Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -174,6 +174,10 @@ device	edma
 attach	edma at obio
 file	arch/arm/omap/omap_edma.c		edma needs-flag
 
+device	trng
+attach	trng at obio
+file	arch/arm/omap/am335x_trng.c		trng
+
 # these bus space methods are not bus-specific ...
 #
 file	arch/arm/omap/omap_nobyteacc_space.c	emifs | gpmc
Index: src/sys/arch/arm/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.28.2.1 src/sys/arch/arm/omap/omap2_reg.h:1.28.2.2
--- src/sys/arch/arm/omap/omap2_reg.h:1.28.2.1	Sun Apr 19 04:37:17 2015
+++ src/sys/arch/arm/omap/omap2_reg.h	Wed Jun 10 16:38:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.28.2.1 2015/04/19 04:37:17 msaitoh Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.28.2.2 2015/06/10 16:38:05 snj Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -912,4 +912,10 @@
 #define AM335X_INT_TCERRINT0		112
 #define AM335X_INT_TCERRINT1		113
 #define AM335X_INT_TCERRINT2		114
+
+/* TRNG */
+#define AM335X_TRNG_BASE		0x4831
+#define AM335X_TRNG_SIZE		0x2000
+#define AM335X_INT_TRNG			111
+
 #endif	/* _ARM_OMAP_OMAP2_REG_H_ */

Index: src/sys/arch/evbarm/conf/BEAGLEBONE
diff -u src/sys/arch/evbarm/conf/BEAGLEBONE:1.24.2.1 src/sys/arch/evbarm/conf/BEAGLEBONE:1.24.2.2
--- src/sys/arch/evbarm/conf/BEAGLEBONE:1.24.2.1	Sun Apr 19 04:37:17 2015
+++ src/sys/arch/evbarm/conf/BEAGLEBONE	Wed Jun 10 16:38:05 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBONE,v 1.24.2.1 2015/04/19 04:37:17 msaitoh Exp $
+#	$NetBSD: BEAGLEBONE,v 1.24.2.2 2015/06/10 16:38:05 snj Exp $
 #
 #	BEAGLEBONE -- TI AM335x board Kernel
 #
@@ -247,6 +247,9 @@ omapdmtimer2	at obio0 addr 0x48044000 si
 # Watchdog timers
 omapwdt32k*	at obio0 addr 0x44e35000 size 0x1000	# WDT1
 
+# Random number generator
+trng*		at obio0 addr 0x4831 size 0x2000 intr 111	# TRNG
+
 # onboard video, experimental. Video mode is hardcoded in the driver
 #tifb* 	at obio0 addr 0x4830E000 size 0x1000 intr 36
 

Added files:

Index: src/sys/arch/arm/omap/am335x_trng.c
diff -u /dev/null src/sys/arch/arm/omap/am335x_trng.c:1.1.2.2
--- /dev/null	Wed Jun 10 16:38:05 2015
+++ src/sys/arch/arm/omap/am335x_trng.c	Wed Jun 10 16:38:05 2015
@@ -0,0 +1,184 @@
+/* $NetBSD: am335x_trng.c,v 1.1.2.2 2015/06/10 16:38:05 snj Exp $ */
+
+/*-
+ * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, 

CVS commit: [netbsd-7] src

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 16:41:12 UTC 2015

Modified Files:
src/gnu/dist/groff/src/utils/hpftodit [netbsd-7]: hpftodit.cpp
src/gnu/dist/texinfo/makeinfo [netbsd-7]: files.c
src/usr.bin/netstat [netbsd-7]: atalk.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #831):
gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp: revision 1.6
gnu/dist/texinfo/makeinfo/files.c: revision 1.10
usr.bin/netstat/atalk.c: revision 1.16
Fix operator precedence to allocate enough memory.
--
Drop assignment from uninitialized and otherwise unused variable.
--
The opposite of new[] is delete[], not delete.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.62.1 \
src/gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp
cvs rdiff -u -r1.9 -r1.9.38.1 src/gnu/dist/texinfo/makeinfo/files.c
cvs rdiff -u -r1.15 -r1.15.4.1 src/usr.bin/netstat/atalk.c

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

Modified files:

Index: src/gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp
diff -u src/gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp:1.5 src/gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp:1.5.62.1
--- src/gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp:1.5	Mon Feb  6 18:25:48 2006
+++ src/gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp	Wed Jun 10 16:41:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpftodit.cpp,v 1.5 2006/02/06 18:25:48 wiz Exp $	*/
+/*	$NetBSD: hpftodit.cpp,v 1.5.62.1 2015/06/10 16:41:12 snj Exp $	*/
 
 // -*- C++ -*-
 /* Copyright (C) 1994, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
@@ -577,7 +577,7 @@ output_font_name(File f)
 ;
   *(p + 1) = '\0';
   printf(# %s\n, font_name);
-  delete font_name;
+  delete[] font_name;
 }
 
 static void

Index: src/gnu/dist/texinfo/makeinfo/files.c
diff -u src/gnu/dist/texinfo/makeinfo/files.c:1.9 src/gnu/dist/texinfo/makeinfo/files.c:1.9.38.1
--- src/gnu/dist/texinfo/makeinfo/files.c:1.9	Tue Sep  2 08:41:51 2008
+++ src/gnu/dist/texinfo/makeinfo/files.c	Wed Jun 10 16:41:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: files.c,v 1.9 2008/09/02 08:41:51 christos Exp $	*/
+/*	$NetBSD: files.c,v 1.9.38.1 2015/06/10 16:41:12 snj Exp $	*/
 
 /* files.c -- file-related functions for makeinfo.
Id: files.c,v 1.5 2004/07/27 00:06:31 karl Exp
@@ -458,8 +458,7 @@ full_pathname (char *filename)
   temp_home = (char *) getenv (HOME);
   result = xmalloc (strlen (filename[1])
 + 1
-+ temp_home ? strlen (temp_home)
-: 0);
++ (temp_home ? strlen (temp_home) : 0));
   *result = 0;
 
   if (temp_home)

Index: src/usr.bin/netstat/atalk.c
diff -u src/usr.bin/netstat/atalk.c:1.15 src/usr.bin/netstat/atalk.c:1.15.4.1
--- src/usr.bin/netstat/atalk.c:1.15	Fri Oct 18 20:26:45 2013
+++ src/usr.bin/netstat/atalk.c	Wed Jun 10 16:41:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atalk.c,v 1.15 2013/10/18 20:26:45 christos Exp $	*/
+/*	$NetBSD: atalk.c,v 1.15.4.1 2015/06/10 16:41:12 snj Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from @(#)atalk.c	1.1 (Whistle) 6/6/96;
 #else
-__RCSID($NetBSD: atalk.c,v 1.15 2013/10/18 20:26:45 christos Exp $);
+__RCSID($NetBSD: atalk.c,v 1.15.4.1 2015/06/10 16:41:12 snj Exp $);
 #endif
 #endif /* not lint */
 
@@ -229,7 +229,6 @@ atalk_print2(const struct sockaddr *sa, 
 void
 atalkprotopr(u_long off, const char *name)
 {
-	struct ddpcb cb;
 	struct ddpcb *next;
 	struct ddpcb *initial;
 	int width = 22;
@@ -237,7 +236,6 @@ atalkprotopr(u_long off, const char *nam
 		return;
 	if (kread(off, (char *)initial, sizeof(struct ddpcb *))  0)
 		return;
-	ddpcb = cb;
 	for (next = initial; next != NULL;) {
 		u_long	ppcb = (u_long)next;
 



CVS commit: [netbsd-7] src/lib/libcurses

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 16:59:32 UTC 2015

Modified Files:
src/lib/libcurses [netbsd-7]: curses.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #836):
lib/libcurses/curses.h: revision 1.107
mvgetnstr should have a length argument as the name implies.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.106.4.1 src/lib/libcurses/curses.h

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

Modified files:

Index: src/lib/libcurses/curses.h
diff -u src/lib/libcurses/curses.h:1.106 src/lib/libcurses/curses.h:1.106.4.1
--- src/lib/libcurses/curses.h:1.106	Wed Oct 16 19:59:29 2013
+++ src/lib/libcurses/curses.h	Wed Jun 10 16:59:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses.h,v 1.106 2013/10/16 19:59:29 roy Exp $	*/
+/*	$NetBSD: curses.h,v 1.106.4.1 2015/06/10 16:59:32 snj Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -480,7 +480,7 @@ extern int	 TABSIZE;		/* Size of a tab. 
 #define	mvaddstr(y, x, s)		mvwaddstr(stdscr, y, x, s)
 #define	mvdelch(y, x)			mvwdelch(stdscr, y, x)
 #define	mvgetch(y, x)			mvwgetch(stdscr, y, x)
-#define	mvgetnstr(y, x, s)		mvwgetnstr(stdscr, y, x, s, n)
+#define	mvgetnstr(y, x, s, n)		mvwgetnstr(stdscr, y, x, s, n)
 #define	mvgetstr(y, x, s)		mvwgetstr(stdscr, y, x, s)
 #define	mvinch(y, x)			mvwinch(stdscr, y, x)
 #define	mvinchnstr(y, x, c, n)		mvwinchnstr(stdscr, y, x, c, n)



CVS commit: [netbsd-7] src

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 17:16:24 UTC 2015

Modified Files:
src/common/lib/libc/arch/arm [netbsd-7]: features.mk
src/lib/libarch [netbsd-7]: Makefile
src/lib/libarch/i386 [netbsd-7]: Makefile.inc
src/lib/libarch/x86_64 [netbsd-7]: Makefile.inc
src/share/mk [netbsd-7]: bsd.gcc.mk bsd.prog.mk

Log Message:
Pull up following revision(s) (requested by martin in ticket #837):
common/lib/libc/arch/arm/features.mk: revision 1.2
lib/libarch/Makefile: revision 1.29
lib/libarch/i386/Makefile.inc: revision 1.15
lib/libarch/x86_64/Makefile.inc: revision 1.5
share/mk/bsd.gcc.mk: revision 1.11
share/mk/bsd.prog.mk: revision 1.292
Make LIBCRT* depend on the right files if MLIBDIR from MKCOMPAT is defined.
Use ${COPT} so it properly emits the right features doing MKCOMPAT
Avoid defining MLIBDIR.  Use ${MLIBDIR:Unone} instead.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.6.1 src/common/lib/libc/arch/arm/features.mk
cvs rdiff -u -r1.28 -r1.28.2.1 src/lib/libarch/Makefile
cvs rdiff -u -r1.14 -r1.14.24.1 src/lib/libarch/i386/Makefile.inc
cvs rdiff -u -r1.4 -r1.4.24.1 src/lib/libarch/x86_64/Makefile.inc
cvs rdiff -u -r1.10 -r1.10.8.1 src/share/mk/bsd.gcc.mk
cvs rdiff -u -r1.290 -r1.290.4.1 src/share/mk/bsd.prog.mk

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/arm/features.mk
diff -u src/common/lib/libc/arch/arm/features.mk:1.1 src/common/lib/libc/arch/arm/features.mk:1.1.6.1
--- src/common/lib/libc/arch/arm/features.mk:1.1	Thu Feb 27 09:37:02 2014
+++ src/common/lib/libc/arch/arm/features.mk	Wed Jun 10 17:16:23 2015
@@ -1,9 +1,9 @@
-# $NetBSD: features.mk,v 1.1 2014/02/27 09:37:02 matt Exp $
+# $NetBSD: features.mk,v 1.1.6.1 2015/06/10 17:16:23 snj Exp $
 
 .ifnmake obj
 TESTFILE=${NETBSDSRCDIR}/common/lib/libc/arch/arm/features.c
-FEAT_EABI!=if ${COMPILE.c} -fsyntax-only -DEABI_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
-FEAT_LDREX!=if ${COMPILE.c} -fsyntax-only -DLDREX_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
-FEAT_LDRD!=if ${COMPILE.c} -fsyntax-only -DLDRD_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
-FEAT_THUMB2!=if ${COMPILE.c} -fsyntax-only -DTHUMB2_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
+FEAT_EABI!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DEABI_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
+FEAT_LDREX!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DLDREX_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
+FEAT_LDRD!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DLDRD_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
+FEAT_THUMB2!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DTHUMB2_TEST ${TESTFILE} /dev/null 2/dev/null; then echo yes; else echo no; fi
 .endif

Index: src/lib/libarch/Makefile
diff -u src/lib/libarch/Makefile:1.28 src/lib/libarch/Makefile:1.28.2.1
--- src/lib/libarch/Makefile:1.28	Sun Aug 10 23:25:49 2014
+++ src/lib/libarch/Makefile	Wed Jun 10 17:16:24 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2014/08/10 23:25:49 matt Exp $
+#	$NetBSD: Makefile,v 1.28.2.1 2015/06/10 17:16:24 snj Exp $
 
 .include bsd.own.mk
 
@@ -18,7 +18,7 @@ LIBC_MACHINE_CPU?=	${MACHINE_CPU}
 
 # Build the library if SRCS is now defined ...
 .if defined(SRCS)
-.if defined(MLIBDIR)  ${MLIBDIR} != none  ${LIBC_MACHINE_CPU} != arm
+.if defined(MLIBDIR)  ${LIBC_MACHINE_CPU} != arm
 LIB=	${MLIBDIR}
 .else
 LIB=	${LIBC_MACHINE_CPU}

Index: src/lib/libarch/i386/Makefile.inc
diff -u src/lib/libarch/i386/Makefile.inc:1.14 src/lib/libarch/i386/Makefile.inc:1.14.24.1
--- src/lib/libarch/i386/Makefile.inc:1.14	Sun Dec 13 08:25:20 2009
+++ src/lib/libarch/i386/Makefile.inc	Wed Jun 10 17:16:24 2015
@@ -1,8 +1,6 @@
-#	$NetBSD: Makefile.inc,v 1.14 2009/12/13 08:25:20 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.14.24.1 2015/06/10 17:16:24 snj Exp $
 
-MLIBDIR?=	none
-
-.if (${MACHINE_ARCH} == i386 || ${MLIBDIR} == i386)
+.if (${MACHINE_ARCH} == i386 || ${MLIBDIR:Unone} == i386)
 SRCS+=	i386_get_ldt.c i386_set_ldt.c \
 	i386_iopl.c i386_get_ioperm.c i386_set_ioperm.c \
 	i386_vm86.c i386_pmc.c i386_mtrr.c

Index: src/lib/libarch/x86_64/Makefile.inc
diff -u src/lib/libarch/x86_64/Makefile.inc:1.4 src/lib/libarch/x86_64/Makefile.inc:1.4.24.1
--- src/lib/libarch/x86_64/Makefile.inc:1.4	Sun Dec 13 08:25:20 2009
+++ src/lib/libarch/x86_64/Makefile.inc	Wed Jun 10 17:16:24 2015
@@ -1,8 +1,6 @@
-#	$NetBSD: Makefile.inc,v 1.4 2009/12/13 08:25:20 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.4.24.1 2015/06/10 17:16:24 snj Exp $
 
-MLIBDIR?=	none
-
-.if (${MACHINE_ARCH} == x86_64  ${MLIBDIR} != i386)
+.if (${MACHINE_ARCH} == x86_64  ${MLIBDIR:Unone} != i386)
 SRCS+=	x86_64_mtrr.c x86_64_iopl.c
 .endif
 

Index: src/share/mk/bsd.gcc.mk
diff -u 

CVS commit: [netbsd-7] src/doc

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 17:21:06 UTC 2015

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

Log Message:
830, 831, 833, 835, 836, 837, 838


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.327 -r1.1.2.328 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.327 src/doc/CHANGES-7.0:1.1.2.328
--- src/doc/CHANGES-7.0:1.1.2.327	Tue Jun  9 20:50:57 2015
+++ src/doc/CHANGES-7.0	Wed Jun 10 17:21:06 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.327 2015/06/09 20:50:57 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.328 2015/06/10 17:21:06 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -32062,3 +32062,65 @@ lib/libperfuse/ops.c1.84
 	Fix dot-lookup when readdir does not provide inodes
 	[manu, ticket #828]
 
+sys/arch/arm/omap/am335x_prcm.h			1.9
+sys/arch/arm/omap/am335x_trng.c			1.1
+sys/arch/arm/omap/am335x_trngreg.h		1.1
+sys/arch/arm/omap/files.omap2			1.31
+sys/arch/arm/omap/omap2_reg.h			1.30
+sys/arch/evbarm/conf/BEAGLEBONE			1.32
+
+	Add driver for AM335x TRNG module.
+	[jmcneill, ticket #830]
+
+gnu/dist/groff/src/utils/hpftodit/hpftodit.cpp	1.6
+gnu/dist/texinfo/makeinfo/files.c		1.10
+usr.bin/netstat/atalk.c1.16
+
+	Fix three clang warnings.
+	[joerg, ticket #831]
+
+sys/dev/pci/if_wm.c1.322, 1.323
+sys/dev/pci/if_wmreg.h1.72
+
+	wm(4):
+	- Fix a link negotiation problem on some old switches.
+	- Fix a bug that flags related to semaphores were incorrectly
+	  checked in wm_kmrn_{readreg,writereg}.  Affects i80003, ICH*
+	  and PCH*.
+	[msaitoh, ticket #833]
+
+sys/net/npf/npf_ctl.c1.42
+usr.sbin/npf/npfctl/npf_bpf_comp.c		1.8
+usr.sbin/npf/npfctl/npf_build.c			1.40
+
+	- npfctl: fix the confusion in the parser (0/0 case with
+	  no other filter).
+	- Always populate the error dictionary, not only for
+	  DEBUG/DIAGNOSTIC.
+	[rmind, ticket #835]
+
+lib/libcurses/curses.h1.107
+
+	mvgetnstr should have a length argument as its name implies.
+	[joerg, ticket #836]
+
+common/lib/libc/arch/arm/features.mk		1.2
+lib/libarch/Makefile1.29
+lib/libarch/i386/Makefile.inc			1.15
+lib/libarch/x86_64/Makefile.inc			1.5
+share/mk/bsd.gcc.mk1.11
+share/mk/bsd.prog.mk1.292
+
+	- Make LIBCRT* depend on the right files if MLIBDIR from
+	  MKCOMPAT is defined.
+	- Use ${COPT} so it properly emits the right features doing
+	  MKCOMPAT.
+	- Avoid defining MLIBDIR.  Use ${MLIBDIR:Unone} instead.
+	[martin, ticket #837]
+
+sys/arch/amiga/amiga/machdep.c			1.244
+
+	Fix space calculation for dump header. Round up to clicks to
+	avoid disk alignment issues.
+	[mlelstv, ticket #838]
+



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

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 17:19:28 UTC 2015

Modified Files:
src/sys/arch/amiga/amiga [netbsd-7]: machdep.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #838):
sys/arch/amiga/amiga/machdep.c: revision 1.244
Fix space calculation for dump header. Round up to clicks to avoid
disk alignment issues.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.243.4.1 src/sys/arch/amiga/amiga/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/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.243 src/sys/arch/amiga/amiga/machdep.c:1.243.4.1
--- src/sys/arch/amiga/amiga/machdep.c:1.243	Mon Mar 24 20:06:31 2014
+++ src/sys/arch/amiga/amiga/machdep.c	Wed Jun 10 17:19:28 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.243 2014/03/24 20:06:31 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.243.4.1 2015/06/10 17:19:28 snj Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
 #include empm.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.243 2014/03/24 20:06:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.243.4.1 2015/06/10 17:19:28 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -535,7 +535,7 @@ cpu_dumpconf(void)
 		else if (dumplo == 0)
 			dumplo = nblks - btodb(ctob(dumpsize));
 	}
-	--dumplo;	/* XXX assume header fits in one block */
+	dumplo -= btodb(ctob(btoc(MDHDRSIZE + ctob(1) - 1)));
 	/*
 	 * Don't dump on the first PAGE_SIZE (why PAGE_SIZE?)
 	 * in case the dump device includes a disk label.



CVS commit: [netbsd-7] src

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 16:57:58 UTC 2015

Modified Files:
src/sys/net/npf [netbsd-7]: npf_ctl.c
src/usr.sbin/npf/npfctl [netbsd-7]: npf_bpf_comp.c npf_build.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #835):
sys/net/npf/npf_ctl.c: revision 1.42
usr.sbin/npf/npfctl/npf_bpf_comp.c: revision 1.8
usr.sbin/npf/npfctl/npf_build.c: revision 1.40
- npfctl: fix the confusion in the parser (0/0 case with no other filter).
- Always populate the error dictionary, not only for DEBUG/DIAGNOSTIC.


To generate a diff of this commit:
cvs rdiff -u -r1.38.2.2 -r1.38.2.3 src/sys/net/npf/npf_ctl.c
cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/npf/npfctl/npf_bpf_comp.c
cvs rdiff -u -r1.38.2.1 -r1.38.2.2 src/usr.sbin/npf/npfctl/npf_build.c

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

Modified files:

Index: src/sys/net/npf/npf_ctl.c
diff -u src/sys/net/npf/npf_ctl.c:1.38.2.2 src/sys/net/npf/npf_ctl.c:1.38.2.3
--- src/sys/net/npf/npf_ctl.c:1.38.2.2	Sat Mar 21 17:49:03 2015
+++ src/sys/net/npf/npf_ctl.c	Wed Jun 10 16:57:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_ctl.c,v 1.38.2.2 2015/03/21 17:49:03 snj Exp $	*/
+/*	$NetBSD: npf_ctl.c,v 1.38.2.3 2015/06/10 16:57:58 snj Exp $	*/
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.38.2.2 2015/03/21 17:49:03 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.38.2.3 2015/06/10 16:57:58 snj Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -49,13 +49,9 @@ __KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 
 #include npf_impl.h
 #include npf_conn.h
 
-#if defined(DEBUG) || defined(DIAGNOSTIC)
 #define	NPF_ERR_DEBUG(e) \
 	prop_dictionary_set_cstring_nocopy((e), source-file, __FILE__); \
 	prop_dictionary_set_uint32((e), source-line, __LINE__);
-#else
-#define	NPF_ERR_DEBUG(e)
-#endif
 
 /*
  * npfctl_switch: enable or disable packet inspection.

Index: src/usr.sbin/npf/npfctl/npf_bpf_comp.c
diff -u src/usr.sbin/npf/npfctl/npf_bpf_comp.c:1.7 src/usr.sbin/npf/npfctl/npf_bpf_comp.c:1.7.2.1
--- src/usr.sbin/npf/npfctl/npf_bpf_comp.c:1.7	Sun Jun 29 00:05:24 2014
+++ src/usr.sbin/npf/npfctl/npf_bpf_comp.c	Wed Jun 10 16:57:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_bpf_comp.c,v 1.7 2014/06/29 00:05:24 rmind Exp $	*/
+/*	$NetBSD: npf_bpf_comp.c,v 1.7.2.1 2015/06/10 16:57:58 snj Exp $	*/
 
 /*-
  * Copyright (c) 2010-2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: npf_bpf_comp.c,v 1.7 2014/06/29 00:05:24 rmind Exp $);
+__RCSID($NetBSD: npf_bpf_comp.c,v 1.7.2.1 2015/06/10 16:57:58 snj Exp $);
 
 #include stdlib.h
 #include stdbool.h
@@ -189,6 +189,10 @@ npfctl_bpf_complete(npf_bpf_t *ctx)
 	struct bpf_program *bp = ctx-prog;
 	const u_int retoff = bp-bf_len;
 
+	/* No instructions (optimised out). */
+	if (!bp-bf_len)
+		return NULL;
+
 	/* Add the return fragment (success and failure paths). */
 	struct bpf_insn insns_ret[] = {
 		BPF_STMT(BPF_RET+BPF_K, NPF_BPF_SUCCESS),

Index: src/usr.sbin/npf/npfctl/npf_build.c
diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.38.2.1 src/usr.sbin/npf/npfctl/npf_build.c:1.38.2.2
--- src/usr.sbin/npf/npfctl/npf_build.c:1.38.2.1	Sat Mar 21 17:49:03 2015
+++ src/usr.sbin/npf/npfctl/npf_build.c	Wed Jun 10 16:57:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_build.c,v 1.38.2.1 2015/03/21 17:49:03 snj Exp $	*/
+/*	$NetBSD: npf_build.c,v 1.38.2.2 2015/06/10 16:57:58 snj Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: npf_build.c,v 1.38.2.1 2015/03/21 17:49:03 snj Exp $);
+__RCSID($NetBSD: npf_build.c,v 1.38.2.2 2015/06/10 16:57:58 snj Exp $);
 
 #include sys/types.h
 #include sys/mman.h
@@ -368,6 +368,10 @@ npfctl_build_code(nl_rule_t *rl, sa_fami
 
 	/* Complete BPF byte-code and pass to the rule. */
 	struct bpf_program *bf = npfctl_bpf_complete(bc);
+	if (bf == NULL) {
+		npfctl_bpf_destroy(bc);
+		return true;
+	}
 	len = bf-bf_len * sizeof(struct bpf_insn);
 
 	if (npf_rule_setcode(rl, NPF_CODE_BPF, bf-bf_insns, len) == -1) {



CVS commit: src/sys/arch

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 10 22:31:00 UTC 2015

Modified Files:
src/sys/arch/evbmips/cavium: machdep.c
src/sys/arch/mips/cavium: octeon_cpunode.c octeonvar.h
src/sys/arch/mips/include: cpu.h pmap.h types.h
src/sys/arch/mips/mips: cpu_subr.c ipifuncs.c locore_octeon.S pmap.c
pmap_tlb.c
src/sys/arch/mips/rmi: rmixl_cpu.c rmixl_intr.c
Removed Files:
src/sys/arch/mips/include: cpuset.h

Log Message:
Transition from __cpuset_t to kcpuset_t *.  This brings the local pmap one
step closer to uvm/pmap, its eventual replacement.  Tested on ERLITE MP kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/cavium/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/cavium/octeon_cpunode.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/cavium/octeonvar.h
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/mips/include/cpu.h
cvs rdiff -u -r1.3 -r0 src/sys/arch/mips/include/cpuset.h
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/mips/include/pmap.h
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mips/include/types.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/mips/mips/cpu_subr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/mips/ipifuncs.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/mips/locore_octeon.S
cvs rdiff -u -r1.214 -r1.215 src/sys/arch/mips/mips/pmap.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/pmap_tlb.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/rmi/rmixl_cpu.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/rmi/rmixl_intr.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/evbmips/cavium/machdep.c
diff -u src/sys/arch/evbmips/cavium/machdep.c:1.4 src/sys/arch/evbmips/cavium/machdep.c:1.5
--- src/sys/arch/evbmips/cavium/machdep.c:1.4	Thu Jun  4 05:21:09 2015
+++ src/sys/arch/evbmips/cavium/machdep.c	Wed Jun 10 22:31:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.4 2015/06/04 05:21:09 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.5 2015/06/10 22:31:00 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -111,8 +111,10 @@
  *	from: Utah Hdr: machdep.c 1.63 91/04/24
  */
 
+#include opt_multiprocessor.h
+
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.4 2015/06/04 05:21:09 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.5 2015/06/10 22:31:00 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -172,8 +174,6 @@ int	netboot;
 phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
 int mem_cluster_cnt;
 
-
-void	configure(void);
 void	mach_init(uint64_t, uint64_t, uint64_t, uint64_t);
 
 struct octeon_config octeon_configuration;
@@ -233,6 +233,7 @@ mach_init(uint64_t arg0, uint64_t arg1, 
 	mips_init_lwp0_uarea();
 
 	boothowto = RB_AUTOBOOT;
+	boothowto |= AB_VERBOSE;
 
 #if defined(DDB)
 	if (boothowto  RB_KDB)
@@ -266,7 +267,7 @@ mach_init_vector(void)
 {
 
 	/* Make sure exception base at 0 (MIPS_COP_0_EBASE) */
-	asm volatile(mtc0 %0, $15, 1 : : r(0x8000) );
+	__asm __volatile(mtc0 %0, $15, 1 : : r(0x8000) );
 
 	/*
 	 * Set up the exception vectors and CPU-specific function
@@ -275,11 +276,7 @@ mach_init_vector(void)
 	 * first printf() after that is called).
 	 * Also clears the I+D caches.
 	 */
-#if MULTIPROCESSOR
 	mips_vector_init(NULL, true);
-#else
-	mips_vector_init(NULL, false);
-#endif
 }
 
 void
@@ -380,6 +377,11 @@ int	waittime = -1;
 void
 cpu_startup(void)
 {
+#ifdef MULTIPROCESSOR
+	// Create a kcpuset so we can see on which CPUs the kernel was started.
+	kcpuset_create(cpus_booted, true);
+#endif
+
 	/*
 	 * Do the common startup items.
 	 */

Index: src/sys/arch/mips/cavium/octeon_cpunode.c
diff -u src/sys/arch/mips/cavium/octeon_cpunode.c:1.4 src/sys/arch/mips/cavium/octeon_cpunode.c:1.5
--- src/sys/arch/mips/cavium/octeon_cpunode.c:1.4	Tue Jun  9 12:10:08 2015
+++ src/sys/arch/mips/cavium/octeon_cpunode.c	Wed Jun 10 22:31:00 2015
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, $NetBSD);
 #include sys/device.h
 #include sys/lwp.h
 #include sys/cpu.h
+#include sys/atomic.h
 #include sys/wdog.h
 
 #include uvm/uvm.h
@@ -47,7 +48,6 @@ __KERNEL_RCSID(0, $NetBSD);
 #include dev/sysmon/sysmonvar.h
 
 #include mips/cache.h
-#include mips/cpuset.h
 #include mips/mips_opcode.h
 #include mips/mips3_clock.h
 
@@ -78,7 +78,7 @@ CFATTACH_DECL_NEW(cpunode, sizeof(struct
 CFATTACH_DECL_NEW(cpu_cpunode, 0,
 cpu_cpunode_match, cpu_cpunode_attach, NULL, NULL);
 
-volatile __cpuset_t cpus_booted = 1;
+kcpuset_t *cpus_booted;
 
 void octeon_reset_vector(void);
 
@@ -123,7 +123,9 @@ cpunode_mainbus_attach(device_t parent, 
 	if (cvmctl  CP0_CVMCTL_REPUN)
 		aprint_normal(, unaligned-access ok);
 #ifdef MULTIPROCESSOR
-	aprint_normal(, booted %# PRIx64, cpus_booted);
+	uint32_t booted[1];
+	kcpuset_export_u32(cpus_booted, booted, sizeof(booted));
+	aprint_normal(, booted %# PRIx32, booted[0]);
 #endif
 	aprint_normal(\n);
 
@@ -290,7 +292,7 @@ cpu_cpunode_attach(device_t parent, 

CVS commit: src/sys/arch/evbmips/rmixl

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 10 22:33:06 UTC 2015

Modified Files:
src/sys/arch/evbmips/rmixl: autoconf.c

Log Message:
Match sd and ld in addition to wd.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/rmixl/autoconf.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/evbmips/rmixl/autoconf.c
diff -u src/sys/arch/evbmips/rmixl/autoconf.c:1.7 src/sys/arch/evbmips/rmixl/autoconf.c:1.8
--- src/sys/arch/evbmips/rmixl/autoconf.c:1.7	Sat Oct 27 17:17:51 2012
+++ src/sys/arch/evbmips/rmixl/autoconf.c	Wed Jun 10 22:33:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.7 2012/10/27 17:17:51 chs Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.8 2015/06/10 22:33:06 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.7 2012/10/27 17:17:51 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.8 2015/06/10 22:33:06 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -83,17 +83,19 @@ extern int	netboot;
 static void
 findroot(void)
 {
-	device_t dv;
-	deviter_t di;
-
 	if (booted_device)
 		return;
 
 	if ((booted_device == NULL)  netboot == 0) {
+		device_t dv;
+		deviter_t di;
+
 		for (dv = deviter_first(di, DEVITER_F_ROOT_FIRST); dv != NULL;
 		dv = deviter_next(di)) {
-			if (device_class(dv) == DV_DISK 
-			device_is_a(dv, wd))
+			if (device_class(dv) == DV_DISK
+			 (device_is_a(dv, wd)
+|| device_is_a(dv, sd)
+|| device_is_a(dv, ld)))
 booted_device = dv;
 		}
 		deviter_release(di);



CVS commit: [netbsd-7] src/common/lib/libc/arch/arm/string

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 20:57:22 UTC 2015

Modified Files:
src/common/lib/libc/arch/arm/string [netbsd-7]: memcpy.S

Log Message:
Pull up following revision(s) (requested by joerg in ticket #834):
common/lib/libc/arch/arm/string/memcpy.S: revision 1.8
Add ARM EABI aliases for aligned arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.4.1 src/common/lib/libc/arch/arm/string/memcpy.S

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/arm/string/memcpy.S
diff -u src/common/lib/libc/arch/arm/string/memcpy.S:1.6 src/common/lib/libc/arch/arm/string/memcpy.S:1.6.4.1
--- src/common/lib/libc/arch/arm/string/memcpy.S:1.6	Mon Dec  2 21:21:33 2013
+++ src/common/lib/libc/arch/arm/string/memcpy.S	Wed Jun 10 20:57:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: memcpy.S,v 1.6 2013/12/02 21:21:33 joerg Exp $	*/
+/*	$NetBSD: memcpy.S,v 1.6.4.1 2015/06/10 20:57:22 snj Exp $	*/
 
 #include arm/cdefs.h
 
@@ -10,4 +10,6 @@
 
 #if defined(__ARM_EABI__)
 STRONG_ALIAS(__aeabi_memcpy, memcpy)
+STRONG_ALIAS(__aeabi_memcpy4, memcpy)
+STRONG_ALIAS(__aeabi_memcpy8, memcpy)
 #endif



CVS commit: src/sys/arch/evbmips/rmixl

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 10 22:32:32 UTC 2015

Modified Files:
src/sys/arch/evbmips/rmixl: machdep.c

Log Message:
Avoid using curpcb (use lwp_getpcb(curlwp)) instead.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbmips/rmixl/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/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.15 src/sys/arch/evbmips/rmixl/machdep.c:1.16
--- src/sys/arch/evbmips/rmixl/machdep.c:1.15	Mon Jun  1 22:55:12 2015
+++ src/sys/arch/evbmips/rmixl/machdep.c	Wed Jun 10 22:32:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.15 2015/06/01 22:55:12 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.16 2015/06/10 22:32:32 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.15 2015/06/01 22:55:12 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.16 2015/06/10 22:32:32 matt Exp $);
 
 #define __INTR_PRIVATE
 
@@ -1018,7 +1018,7 @@ cpu_reboot(int howto, char *bootstr)
 {
 
 	/* Take a snapshot before clobbering any registers. */
-	savectx(curpcb);
+	savectx(lwp_getpcb(curlwp));
 
 	if (cold) {
 		howto |= RB_HALT;



CVS commit: src/sys/arch/mips/mips

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 10 22:40:37 UTC 2015

Modified Files:
src/sys/arch/mips/mips: cache.c

Log Message:
mci_cache_virtual_alias is bool so use true and false, not 1 and 0.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/mips/mips/cache.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/mips/mips/cache.c
diff -u src/sys/arch/mips/mips/cache.c:1.49 src/sys/arch/mips/mips/cache.c:1.50
--- src/sys/arch/mips/mips/cache.c:1.49	Wed Apr 29 08:32:00 2015
+++ src/sys/arch/mips/mips/cache.c	Wed Jun 10 22:40:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache.c,v 1.49 2015/04/29 08:32:00 hikaru Exp $	*/
+/*	$NetBSD: cache.c,v 1.50 2015/06/10 22:40:37 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.49 2015/04/29 08:32:00 hikaru Exp $);
+__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.50 2015/06/10 22:40:37 matt Exp $);
 
 #include opt_cputype.h
 #include opt_mips_cache.h
@@ -598,7 +598,7 @@ primary_cache_is_2way:
 
 		if (mci-mci_picache_size / mci-mci_picache_ways  PAGE_SIZE ||
 		mci-mci_pdcache_size / mci-mci_pdcache_ways  PAGE_SIZE)
-			mci-mci_cache_virtual_alias = 1;
+			mci-mci_cache_virtual_alias = true;
 
 		mco-mco_icache_sync_all =
 		ls2_icache_sync_all;
@@ -677,7 +677,7 @@ primary_cache_is_2way:
 		(MIPS3_MAX_PCACHE_SIZE - 1)  ~PAGE_MASK;	/* va[14:12] */
 		mci-mci_cache_prefer_mask = MIPS3_MAX_PCACHE_SIZE - 1;
 
-		mci-mci_cache_virtual_alias = 0;
+		mci-mci_cache_virtual_alias = false;
 		/* FALLTHROUGH */
 	case MIPS_R4600:
 #ifdef ENABLE_MIPS_R4700



CVS commit: [netbsd-7] src/doc

2015-06-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 10 20:59:56 UTC 2015

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

Log Message:
834


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.328 -r1.1.2.329 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.328 src/doc/CHANGES-7.0:1.1.2.329
--- src/doc/CHANGES-7.0:1.1.2.328	Wed Jun 10 17:21:06 2015
+++ src/doc/CHANGES-7.0	Wed Jun 10 20:59:55 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.328 2015/06/10 17:21:06 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.329 2015/06/10 20:59:55 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -32124,3 +32124,9 @@ sys/arch/amiga/amiga/machdep.c			1.244
 	avoid disk alignment issues.
 	[mlelstv, ticket #838]
 
+common/lib/libc/arch/arm/string/memcpy.S	1.8
+
+	Add ARM EABI __aeabi_memcpy4 and __aeabi_memcpy8 aliases
+	for memcpy.
+	[joerg, ticket #834]
+



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

2015-06-10 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Wed Jun 10 23:16:27 UTC 2015

Modified Files:
src/sys/arch/amd64/include: sljit_machdep.h

Log Message:
Include i386/sljit_machdep.h for i386 compat build.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/include/sljit_machdep.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/amd64/include/sljit_machdep.h
diff -u src/sys/arch/amd64/include/sljit_machdep.h:1.1 src/sys/arch/amd64/include/sljit_machdep.h:1.2
--- src/sys/arch/amd64/include/sljit_machdep.h:1.1	Wed Jul 23 18:19:43 2014
+++ src/sys/arch/amd64/include/sljit_machdep.h	Wed Jun 10 23:16:27 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljit_machdep.h,v 1.1 2014/07/23 18:19:43 alnsn Exp $	*/
+/*	$NetBSD: sljit_machdep.h,v 1.2 2015/06/10 23:16:27 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2012-2013 The NetBSD Foundation, Inc.
@@ -29,8 +29,16 @@
 #ifndef _AMD64_SLJITARCH_H
 #define _AMD64_SLJITARCH_H
 
+#if !defined __i386__
+
 #define SLJIT_CONFIG_X86_64 1
 
 #define SLJIT_CACHE_FLUSH(from, to)
 
+#else	/*	!__i386__	*/
+
+#include i386/sljit_machdep.h
+
+#endif
+
 #endif



CVS commit: src/sys/dev/mii

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 11 05:22:55 UTC 2015

Modified Files:
src/sys/dev/mii: mii.c

Log Message:
Constify nibbletab


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/mii/mii.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/mii/mii.c
diff -u src/sys/dev/mii/mii.c:1.50 src/sys/dev/mii/mii.c:1.51
--- src/sys/dev/mii/mii.c:1.50	Fri Dec  4 22:37:35 2009
+++ src/sys/dev/mii/mii.c	Thu Jun 11 05:22:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii.c,v 1.50 2009/12/04 22:37:35 dyoung Exp $	*/
+/*	$NetBSD: mii.c,v 1.51 2015/06/11 05:22:55 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mii.c,v 1.50 2009/12/04 22:37:35 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: mii.c,v 1.51 2015/06/11 05:22:55 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -266,7 +266,7 @@ mii_down(struct mii_data *mii)
 static unsigned char
 bitreverse(unsigned char x)
 {
-	static unsigned char nibbletab[16] = {
+	static const unsigned char nibbletab[16] = {
 		0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15
 	};
 



CVS commit: src/sys/uvm/pmap

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 11 05:27:07 UTC 2015

Modified Files:
src/sys/uvm/pmap: pmap.c pmap.h

Log Message:
Add virtual_start to pmap_limits.  This allows MD to steal address space
before pmap_bootstrap.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/uvm/pmap/pmap.c
cvs rdiff -u -r1.4 -r1.5 src/sys/uvm/pmap/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/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.11 src/sys/uvm/pmap/pmap.c:1.12
--- src/sys/uvm/pmap/pmap.c:1.11	Tue Feb  3 10:25:53 2015
+++ src/sys/uvm/pmap/pmap.c	Thu Jun 11 05:27:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.11 2015/02/03 10:25:53 nonaka Exp $	*/
+/*	$NetBSD: pmap.c,v 1.12 2015/06/11 05:27:07 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.11 2015/02/03 10:25:53 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.12 2015/06/11 05:27:07 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -214,7 +214,9 @@ struct pmap_kernel kernel_pmap_store = {
 
 struct pmap * const kernel_pmap_ptr = kernel_pmap_store.kernel_pmap;
 
-struct pmap_limits pmap_limits;
+struct pmap_limits pmap_limits = {
+	.virtual_start = VM_MIN_KERNEL_ADDRESS,
+};
 
 #ifdef UVMHIST
 static struct kern_history_ent pmapexechistbuf[1];
@@ -351,8 +353,8 @@ void
 pmap_virtual_space(vaddr_t *vstartp, vaddr_t *vendp)
 {
 
-	*vstartp = VM_MIN_KERNEL_ADDRESS;
-	*vendp = VM_MAX_KERNEL_ADDRESS;
+	*vstartp = pmap_limits.virtual_start;
+	*vendp = pmap_limits.virtual_end;
 }
 
 vaddr_t

Index: src/sys/uvm/pmap/pmap.h
diff -u src/sys/uvm/pmap/pmap.h:1.4 src/sys/uvm/pmap/pmap.h:1.5
--- src/sys/uvm/pmap/pmap.h:1.4	Tue Mar 18 18:20:44 2014
+++ src/sys/uvm/pmap/pmap.h	Thu Jun 11 05:27:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.4 2014/03/18 18:20:44 riastradh Exp $	*/
+/*	$NetBSD: pmap.h,v 1.5 2015/06/11 05:27:07 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -148,6 +148,7 @@ struct pmap_kernel {
 struct pmap_limits {
 	paddr_t avail_start;
 	paddr_t avail_end;
+	vaddr_t virtual_start;
 	vaddr_t virtual_end;
 };
 



CVS commit: src/sys/uvm/pmap

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 11 05:28:42 UTC 2015

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Don't call kcpuset_intersecting_p and then kcpuset_ffs_intersecting since
that the last will tell use what we need to know.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/uvm/pmap/pmap_tlb.c

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

Modified files:

Index: src/sys/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.11 src/sys/uvm/pmap/pmap_tlb.c:1.12
--- src/sys/uvm/pmap/pmap_tlb.c:1.11	Sat Apr 18 16:58:31 2015
+++ src/sys/uvm/pmap/pmap_tlb.c	Thu Jun 11 05:28:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.11 2015/04/18 16:58:31 joerg Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.12 2015/06/11 05:28:42 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.11 2015/04/18 16:58:31 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.12 2015/06/11 05:28:42 matt Exp $);
 
 /*
  * Manages address spaces in a TLB.
@@ -635,9 +635,10 @@ pmap_tlb_shootdown_bystanders(pmap_t pm)
 		struct pmap_asid_info * const pai = PMAP_PAI(pm, ti);
 		kcpuset_remove(pm_active, ti-ti_kcpuset);
 		TLBINFO_LOCK(ti);
-		if (pmap_tlb_intersecting_onproc_p(pm, ti)) {
-			cpuid_t j = kcpuset_ffs_intersecting(pm-pm_onproc,
-			ti-ti_kcpuset);
+		cpuid_t j = kcpuset_ffs_intersecting(pm-pm_onproc,
+		ti-ti_kcpuset);
+		// post decrement since ffs returns bit + 1 or 0 if no bit
+		if (j--  0) {
 			if (kernel_p) {
 ti-ti_tlbinvop =
 TLBINV_KERNEL_MAP(ti-ti_tlbinvop);



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

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 11 05:15:49 UTC 2015

Modified Files:
src/sys/arch/mips/include: cpuregs.h

Log Message:
Add a few MIPS32 R3 bits


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/mips/include/cpuregs.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/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.93 src/sys/arch/mips/include/cpuregs.h:1.94
--- src/sys/arch/mips/include/cpuregs.h:1.93	Wed Jun 10 05:03:41 2015
+++ src/sys/arch/mips/include/cpuregs.h	Thu Jun 11 05:15:49 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.93 2015/06/10 05:03:41 matt Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.94 2015/06/11 05:15:49 matt Exp $	*/
 
 /*
  * Copyright (c) 2009 Miodrag Vallat.
@@ -748,6 +748,7 @@
 #define	MIPS1_TLB_PID_SHIFT		6
 
 #define	MIPS3_TLB_VPN2			0xe000
+#define	MIPS3_TLB_EHINV			0x0400	/* mipsNN R3 */
 #define	MIPS3_TLB_ASID			0x00ff
 
 #define	MIPS1_TLB_VIRT_PAGE_NUM		MIPS1_TLB_VPN
@@ -940,6 +941,7 @@
 #define	MIPS_74K	0x97	/* MIPS 74Kc/74Kf		ISA 32  Rel 2 */
 #define	MIPS_1004K	0x99	/* MIPS 1004Kc/1004Kf		ISA 32  Rel 2 */
 #define	MIPS_1074K	0x9a	/* MIPS 1074Kc/1074Kf		ISA 32  Rel 2 */
+#define	MIPS_interAptiv	0xa1	/* MIPS interAptiv		ISA 32  R3 MT */
 
 /*
  * CPU processor revision IDs for company ID == 2 (Broadcom)



CVS commit: src/sys/compat/linux/common

2015-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 11 02:54:00 UTC 2015

Modified Files:
src/sys/compat/linux/common: linux_exec_elf32.c

Log Message:
Force *stackp to (uintptr_t) before possibly moving to a smaller pointer size.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/linux/common/linux_exec_elf32.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.92 src/sys/compat/linux/common/linux_exec_elf32.c:1.93
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.92	Fri Mar 20 20:36:27 2015
+++ src/sys/compat/linux/common/linux_exec_elf32.c	Thu Jun 11 02:54:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_elf32.c,v 1.92 2015/03/20 20:36:27 maxv Exp $	*/
+/*	$NetBSD: linux_exec_elf32.c,v 1.93 2015/06/11 02:54:00 matt Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_exec_elf32.c,v 1.92 2015/03/20 20:36:27 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_exec_elf32.c,v 1.93 2015/06/11 02:54:00 matt Exp $);
 
 #ifndef ELFSIZE
 /* XXX should die */
@@ -460,7 +460,7 @@ ELFNAME2(linux,copyargs)(struct lwp *l, 
 	a++;
 
 	a-a_type = LINUX_AT_RANDOM;
-	a-a_v = (Elf_Addr)*stackp;
+	a-a_v = (Elf_Addr)(uintptr_t)*stackp;
 	a++;
 
 	a-a_type = AT_NULL;