CVS commit: src/sys/dev/ic

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:27:54 UTC 2015

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

Log Message:
don't leak pdata. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/ic/aic7xxx.c

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

Modified files:

Index: src/sys/dev/ic/aic7xxx.c
diff -u src/sys/dev/ic/aic7xxx.c:1.131 src/sys/dev/ic/aic7xxx.c:1.132
--- src/sys/dev/ic/aic7xxx.c:1.131	Thu Mar 27 14:28:26 2014
+++ src/sys/dev/ic/aic7xxx.c	Fri Feb  6 23:27:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic7xxx.c,v 1.131 2014/03/27 18:28:26 christos Exp $	*/
+/*	$NetBSD: aic7xxx.c,v 1.132 2015/02/07 04:27:54 christos Exp $	*/
 
 /*
  * Core routines and tables shareable across OS platforms.
@@ -39,7 +39,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: aic7xxx.c,v 1.131 2014/03/27 18:28:26 christos Exp $
+ * $Id: aic7xxx.c,v 1.132 2015/02/07 04:27:54 christos Exp $
  *
  * //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
  *
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.131 2014/03/27 18:28:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.132 2015/02/07 04:27:54 christos Exp $");
 
 #include 
 #include 
@@ -4372,8 +4372,10 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
 			  AHC_MAXTRANSFER_SIZE, AHC_NSEG, MAXPHYS, 0,
 			  BUS_DMA_WAITOK|BUS_DMA_ALLOCNOW|ahc->sc_dmaflags,
 			  &next_scb->dmamap);
-		if (error != 0)
+		if (error != 0) {
+			free(pdata, M_DEVBUF);
 			break;
+		}
 
 		next_scb->hscb = &scb_data->hscbs[scb_data->numscbs];
 		next_scb->hscb->tag = ahc->scb_data->numscbs;



CVS commit: src/sys/fs/nilfs

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:25:16 UTC 2015

Modified Files:
src/sys/fs/nilfs: nilfs_vfsops.c

Log Message:
fix devvp leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/nilfs/nilfs_vfsops.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/fs/nilfs/nilfs_vfsops.c
diff -u src/sys/fs/nilfs/nilfs_vfsops.c:1.18 src/sys/fs/nilfs/nilfs_vfsops.c:1.19
--- src/sys/fs/nilfs/nilfs_vfsops.c:1.18	Wed Oct 15 05:05:46 2014
+++ src/sys/fs/nilfs/nilfs_vfsops.c	Fri Feb  6 23:25:16 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_vfsops.c,v 1.18 2014/10/15 09:05:46 hannken Exp $ */
+/* $NetBSD: nilfs_vfsops.c,v 1.19 2015/02/07 04:25:16 christos Exp $ */
 
 /*
  * Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.18 2014/10/15 09:05:46 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.19 2015/02/07 04:25:16 christos Exp $");
 #endif /* not lint */
 
 
@@ -879,8 +879,10 @@ nilfs_mount(struct mount *mp, const char
 #endif
 
 	error = nilfs_mount_device(devvp, mp, args, &nilfsdev);
-	if (error)
+	if (error) {
+		vrele(devvp);
 		return error;
+	}
 
 	/*
 	 * Create a nilfs_mount on the specified checkpoint. Note that only



CVS commit: src/sys/ufs/chfs

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:21:11 UTC 2015

Modified Files:
src/sys/ufs/chfs: ebh.c

Log Message:
fix leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/chfs/ebh.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/chfs/ebh.c
diff -u src/sys/ufs/chfs/ebh.c:1.5 src/sys/ufs/chfs/ebh.c:1.6
--- src/sys/ufs/chfs/ebh.c:1.5	Sat Oct 18 04:33:29 2014
+++ src/sys/ufs/chfs/ebh.c	Fri Feb  6 23:21:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ebh.c,v 1.5 2014/10/18 08:33:29 snj Exp $	*/
+/*	$NetBSD: ebh.c,v 1.6 2015/02/07 04:21:11 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -1956,8 +1956,10 @@ ebh_map_leb(struct chfs_ebh *ebh, int ln
 	ebhdr = kmem_alloc(sizeof(struct chfs_eb_hdr), KM_SLEEP);
 
 	err = leb_write_lock(ebh, lnr);
-	if (err)
+	if (err) {
+		kmem_free(ebhdr, sizeof(struct chfs_eb_hdr));
 		return err;
+	}
 
 retry:
 	pebnr = get_peb(ebh);



CVS commit: src/sys/ufs/chfs

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:19:53 UTC 2015

Modified Files:
src/sys/ufs/chfs: chfs_scan.c

Log Message:
fix buf leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/chfs/chfs_scan.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/chfs/chfs_scan.c
diff -u src/sys/ufs/chfs/chfs_scan.c:1.5 src/sys/ufs/chfs/chfs_scan.c:1.6
--- src/sys/ufs/chfs/chfs_scan.c:1.5	Mon Sep  1 12:27:38 2014
+++ src/sys/ufs/chfs/chfs_scan.c	Fri Feb  6 23:19:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_scan.c,v 1.5 2014/09/01 16:27:38 he Exp $	*/
+/*	$NetBSD: chfs_scan.c,v 1.6 2015/02/07 04:19:52 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -461,6 +461,7 @@ chfs_scan_eraseblock(struct chfs_mount *
 			read_free += CHFS_NODE_HDR_SIZE;
 			if (read_free >= MAX_READ_FREE(chmp)) {
 dbg("rest of the block is free. Size: %d\n", cheb->free_size);
+kmem_free(buf, CHFS_MAX_NODE_SIZE);
 return chfs_scan_classify_cheb(chmp, cheb);
 			}
 			ofs += CHFS_NODE_HDR_SIZE;



CVS commit: src/sys/fs/udf

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:18:03 UTC 2015

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
fix udf_node leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/fs/udf/udf_subr.c

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

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.127 src/sys/fs/udf/udf_subr.c:1.128
--- src/sys/fs/udf/udf_subr.c:1.127	Wed Sep 17 17:18:43 2014
+++ src/sys/fs/udf/udf_subr.c	Fri Feb  6 23:18:03 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.127 2014/09/17 21:18:43 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.128 2015/02/07 04:18:03 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.127 2014/09/17 21:18:43 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.128 2015/02/07 04:18:03 christos Exp $");
 #endif /* not lint */
 
 
@@ -5335,8 +5335,9 @@ udf_get_node(struct udf_mount *ump, stru
 
 	/* always return locked vnode */
 	if ((error = vn_lock(nvp, LK_EXCLUSIVE | LK_RETRY))) {
-		/* recycle vnode and unlock; simultanious will fail too */
+		/* recycle vnode and unlock; simultaneous will fail too */
 		ungetnewvnode(nvp);
+		pool_put(&udf_node_pool, udf_node);
 		mutex_exit(&ump->get_node_lock);
 		return error;
 	}



CVS commit: src/sys/dev/sdmmc

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:13:27 UTC 2015

Modified Files:
src/sys/dev/sdmmc: sdmmc_mem.c

Log Message:
Return an actual error. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/sdmmc/sdmmc_mem.c

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

Modified files:

Index: src/sys/dev/sdmmc/sdmmc_mem.c
diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.32 src/sys/dev/sdmmc/sdmmc_mem.c:1.33
--- src/sys/dev/sdmmc/sdmmc_mem.c:1.32	Sun Dec  7 15:07:25 2014
+++ src/sys/dev/sdmmc/sdmmc_mem.c	Fri Feb  6 23:13:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_mem.c,v 1.32 2014/12/07 20:07:25 jmcneill Exp $	*/
+/*	$NetBSD: sdmmc_mem.c,v 1.33 2015/02/07 04:13:26 christos Exp $	*/
 /*	$OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -45,7 +45,7 @@
 /* Routines for SD/MMC memory cards. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.32 2014/12/07 20:07:25 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.33 2015/02/07 04:13:26 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -748,7 +748,7 @@ sdmmc_mem_mmc_init(struct sdmmc_softc *s
 			aprint_error_dev(sc->sc_dev,
 			"unrecognised future version (%d)\n",
 ext_csd[EXT_CSD_STRUCTURE]);
-			return error;
+			return ENOTSUP;
 		}
 
 		if (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_F_52M) {
@@ -761,7 +761,7 @@ sdmmc_mem_mmc_init(struct sdmmc_softc *s
 			aprint_error_dev(sc->sc_dev,
 			"unknown CARD_TYPE: 0x%x\n",
 			ext_csd[EXT_CSD_CARD_TYPE]);
-			return error;
+			return ENOTSUP;
 		}
 
 		if (!ISSET(sc->sc_caps, SMC_CAPS_MMC_HIGHSPEED)) {



CVS commit: src/sys/dev/ic

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:11:06 UTC 2015

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

Log Message:
set error. Reported by;
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/ic/an.c

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

Modified files:

Index: src/sys/dev/ic/an.c
diff -u src/sys/dev/ic/an.c:1.61 src/sys/dev/ic/an.c:1.62
--- src/sys/dev/ic/an.c:1.61	Tue Feb 25 13:30:09 2014
+++ src/sys/dev/ic/an.c	Fri Feb  6 23:11:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: an.c,v 1.61 2014/02/25 18:30:09 pooka Exp $	*/
+/*	$NetBSD: an.c,v 1.62 2015/02/07 04:11:06 christos Exp $	*/
 /*
  * Copyright (c) 1997, 1998, 1999
  *	Bill Paul .  All rights reserved.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.61 2014/02/25 18:30:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.62 2015/02/07 04:11:06 christos Exp $");
 
 
 #include 
@@ -569,8 +569,8 @@ an_init(struct ifnet *ifp)
 	if (ic->ic_des_esslen)
 		memcpy(sc->sc_buf.sc_ssidlist.an_entry[0].an_ssid,
 		ic->ic_des_essid, ic->ic_des_esslen);
-	if (an_write_rid(sc, AN_RID_SSIDLIST, &sc->sc_buf,
-	sizeof(sc->sc_buf.sc_ssidlist)) != 0) {
+	if ((error = an_write_rid(sc, AN_RID_SSIDLIST, &sc->sc_buf,
+	sizeof(sc->sc_buf.sc_ssidlist))) != 0) {
 		printf("%s: failed to write ssid list\n", ifp->if_xname);
 		an_stop(ifp, 1);
 		return error;
@@ -604,8 +604,8 @@ an_init(struct ifnet *ifp)
 		printf("\n");
 	}
 #endif
-	if (an_write_rid(sc, AN_RID_GENCONFIG, &sc->sc_config,
-	sizeof(sc->sc_config)) != 0) {
+	if ((error = an_write_rid(sc, AN_RID_GENCONFIG, &sc->sc_config,
+	sizeof(sc->sc_config))) != 0) {
 		printf("%s: failed to write config\n", ifp->if_xname);
 		an_stop(ifp, 1);
 		return error;



CVS commit: src/sys/modules/lua

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:09:13 UTC 2015

Modified Files:
src/sys/modules/lua: lua.c

Log Message:
plug leak on error. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/modules/lua/lua.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/modules/lua/lua.c
diff -u src/sys/modules/lua/lua.c:1.15 src/sys/modules/lua/lua.c:1.16
--- src/sys/modules/lua/lua.c:1.15	Sun Nov 30 14:15:03 2014
+++ src/sys/modules/lua/lua.c	Fri Feb  6 23:09:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lua.c,v 1.15 2014/11/30 19:15:03 lneto Exp $ */
+/*	$NetBSD: lua.c,v 1.16 2015/02/07 04:09:13 christos Exp $ */
 
 /*
  * Copyright (c) 2014 by Lourival Vieira Neto .
@@ -653,8 +653,10 @@ klua_newstate(lua_Alloc f, void *ud, con
 		sc->sc_state = true;
 	mutex_exit(&sc->sc_state_lock);
 
-	if (error)
+	if (error) {
+		kmem_free(s, sizeof(struct lua_state));
 		return NULL;
+	}
 
 	K = kmem_zalloc(sizeof(klua_State), KM_SLEEP);
 	K->L = lua_newstate(f, ud);



CVS commit: src/sys/fs/nfs/common

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 04:06:52 UTC 2015

Modified Files:
src/sys/fs/nfs/common: krpc_subr.c

Log Message:
fix mbuf leak; this is not being compiled yet.
Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/fs/nfs/common/krpc_subr.c

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

Modified files:

Index: src/sys/fs/nfs/common/krpc_subr.c
diff -u src/sys/fs/nfs/common/krpc_subr.c:1.1.1.1 src/sys/fs/nfs/common/krpc_subr.c:1.2
--- src/sys/fs/nfs/common/krpc_subr.c:1.1.1.1	Mon Sep 30 03:19:32 2013
+++ src/sys/fs/nfs/common/krpc_subr.c	Fri Feb  6 23:06:52 2015
@@ -44,7 +44,7 @@
 
 #include 
 /* __FBSDID("FreeBSD: head/sys/nfs/krpc_subr.c 248207 2013-03-12 13:42:47Z glebius "); */
-__RCSID("$NetBSD: krpc_subr.c,v 1.1.1.1 2013/09/30 07:19:32 dholland Exp $");
+__RCSID("$NetBSD: krpc_subr.c,v 1.2 2015/02/07 04:06:52 christos Exp $");
 
 #include 
 #include 
@@ -169,7 +169,7 @@ krpc_portmap(struct sockaddr_in *sin, u_
 	error = krpc_call(sin, PMAPPROG, PMAPVERS,
 	  PMAPPROC_GETPORT, &m, NULL, td);
 	if (error)
-		return error;
+		goto out;
 
 	if (m->m_len < sizeof(*rdata)) {
 		m = m_pullup(m, sizeof(*rdata));
@@ -179,8 +179,9 @@ krpc_portmap(struct sockaddr_in *sin, u_
 	rdata = mtod(m, struct rdata *);
 	*portp = rdata->port;
 
+out:
 	m_freem(m);
-	return 0;
+	return error;
 }
 
 /*



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

2015-02-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  7 02:39:56 UTC 2015

Modified Files:
src/sys/arch/arm/cortex: a9_mpsubr.S

Log Message:
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/cortex/a9_mpsubr.S

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/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.26 src/sys/arch/arm/cortex/a9_mpsubr.S:1.27
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.26	Tue Dec  2 22:57:08 2014
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Sat Feb  7 02:39:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.26 2014/12/02 22:57:08 matt Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.27 2015/02/07 02:39:56 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -445,7 +445,7 @@ cortex_init:
 
 	// For the A7, SMP must be on ldrex/strex to work.
 	//
-#if defined(MULTIPROCESSOR) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) || defined(CPU_CORTEXA17)
+#if defined(MULTIPROCESSOR) || defined(CPU_CORTEXA5) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) || defined(CPU_CORTEXA17)
 #if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) || defined(CPU_CORTEXA17)
 	//
 	// Step 4a, set ACTLR.SMP=1



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

2015-02-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  7 00:08:34 UTC 2015

Modified Files:
src/sys/arch/arm/arm32: arm32_tlb.c

Log Message:
fix CPU_CORTEXA5 && !MULTIPROCESSOR build


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm32/arm32_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/arch/arm/arm32/arm32_tlb.c
diff -u src/sys/arch/arm/arm32/arm32_tlb.c:1.7 src/sys/arch/arm/arm32/arm32_tlb.c:1.8
--- src/sys/arch/arm/arm32/arm32_tlb.c:1.7	Thu Oct 30 10:45:17 2014
+++ src/sys/arch/arm/arm32/arm32_tlb.c	Sat Feb  7 00:08:34 2015
@@ -30,7 +30,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: arm32_tlb.c,v 1.7 2014/10/30 10:45:17 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_tlb.c,v 1.8 2015/02/07 00:08:34 jmcneill Exp $");
 
 #include 
 #include 
@@ -147,11 +147,11 @@ tlb_cortex_a5_record_asids(u_long *mapp)
 			const uint64_t d = ((uint64_t) armreg_tlbdata1_read())
 			| armreg_tlbdata0_read();
 			if (!(d & ARM_TLBDATA_VALID)
-			|| !(d & ARM_V5_TLBDATA_nG))
+			|| !(d & ARM_A5_TLBDATA_nG))
 continue;
 
 			const tlb_asid_t asid = __SHIFTOUT(d,
-			ARM_V5_TLBDATA_ASID);
+			ARM_A5_TLBDATA_ASID);
 			const u_long mask = 1L << (asid & 31);
 			const size_t idx = asid >> 5;
 			if (mapp[idx] & mask)



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

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  7 00:02:09 UTC 2015

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

Log Message:
disable preemption while scheduling the softint to configure the link.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.18 src/sys/dev/pci/ixgbe/ixgbe.c:1.19
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.18	Wed Feb  4 04:05:53 2015
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Feb  6 19:02:09 2015
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/
-/*$NetBSD: ixgbe.c,v 1.18 2015/02/04 09:05:53 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.19 2015/02/07 00:02:09 christos Exp $*/
 
 #include "opt_inet.h"
 
@@ -2710,13 +2710,19 @@ ixgbe_config_link(struct adapter *adapte
 	sfp = ixgbe_is_sfp(hw);
 
 	if (sfp) { 
+		void *ip;
+
 		if (hw->phy.multispeed_fiber) {
 			hw->mac.ops.setup_sfp(hw);
 			ixgbe_enable_tx_laser(hw);
-			softint_schedule(adapter->msf_si);
+			ip = adapter->msf_si;
 		} else {
-			softint_schedule(adapter->mod_si);
+			ip = adapter->mod_si;
 		}
+
+		kpreempt_disable();
+		softint_schedule(ip);
+		kpreempt_enable();
 	} else {
 		if (hw->mac.ops.check_link)
 			err = ixgbe_check_link(hw, &autoneg,



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

2015-02-06 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Fri Feb  6 22:24:15 UTC 2015

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Fix build when MKRUMP=no.


To generate a diff of this commit:
cvs rdiff -u -r1.611 -r1.612 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.611 src/distrib/sets/lists/tests/mi:1.612
--- src/distrib/sets/lists/tests/mi:1.611	Sat Jan 31 23:09:27 2015
+++ src/distrib/sets/lists/tests/mi	Fri Feb  6 22:24:15 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.611 2015/01/31 23:09:27 christos Exp $
+# $NetBSD: mi,v 1.612 2015/02/06 22:24:15 rjs Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3148,8 +3148,8 @@
 ./usr/tests/net/in_cksum/t_in_cksum		tests-net-tests		atf
 ./usr/tests/net/in_cksum/in_cksum		tests-net-tests		atf
 ./usr/tests/net/mcasttests-net-tests
-./usr/tests/net/mcast/Atffile			tests-net-tests		atf,rump
-./usr/tests/net/mcast/Kyuafile			tests-net-tests		atf,rump,kyua
+./usr/tests/net/mcast/Atffile			tests-net-tests		atf
+./usr/tests/net/mcast/Kyuafile			tests-net-tests		atf,kyua
 ./usr/tests/net/mcast/t_mcast			tests-net-tests		atf
 ./usr/tests/net/mplstests-net-tests
 ./usr/tests/net/mpls/Atffile			tests-net-tests		atf,rump



CVS commit: xsrc/external/mit/xorg-server/dist/include

2015-02-06 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri Feb  6 20:18:17 UTC 2015

Modified Files:
xsrc/external/mit/xorg-server/dist/include: regionstr.h

Log Message:
fix previous.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xorg-server/dist/include/regionstr.h

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/include/regionstr.h
diff -u xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.3 xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.4
--- xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.3	Fri Feb  6 14:29:06 2015
+++ xsrc/external/mit/xorg-server/dist/include/regionstr.h	Fri Feb  6 15:18:17 2015
@@ -108,7 +108,7 @@ static inline BoxPtr RegionEnd(RegionPtr
 }
 
 static inline size_t RegionSizeof(int n) {
-if (n < 0 || (size_t)n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
+if ((size_t)n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
 return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
 else
 return 0;



CVS commit: src/usr.bin/kdump

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  6 20:07:45 UTC 2015

Modified Files:
src/usr.bin/kdump: Makefile.ioctl-c

Log Message:
Extend the list of the headers processed to generate symbolic ioctls to
the X sets, and include the DRM ioctls. Unfortunately the DRM ioctls for
different cards overlap, so until I write some code to merge them, only
enable one (currently the i915).


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/kdump/Makefile.ioctl-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/kdump/Makefile.ioctl-c
diff -u src/usr.bin/kdump/Makefile.ioctl-c:1.25 src/usr.bin/kdump/Makefile.ioctl-c:1.26
--- src/usr.bin/kdump/Makefile.ioctl-c:1.25	Sat Apr  6 09:48:12 2013
+++ src/usr.bin/kdump/Makefile.ioctl-c	Fri Feb  6 15:07:45 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ioctl-c,v 1.25 2013/04/06 13:48:12 uebayasi Exp $
+#	$NetBSD: Makefile.ioctl-c,v 1.26 2015/02/06 20:07:45 christos Exp $
 
 # NOTE:  needs to be previously .included for NETBSDSRCDIR
 
@@ -7,16 +7,22 @@
 # and silently ignores any that don't exist in ${DESTDIR}.
 # NB: The compiler uses the .h files in ${NETBSDSRCDIR}.
 
-SETBASE=${NETBSDSRCDIR}/distrib/sets/lists/comp
-SETFILES:=${SETBASE}/mi
+SETBASES=	${NETBSDSRCDIR}/distrib/sets/lists/comp \
+		${NETBSDSRCDIR}/distrib/sets/lists/xcomp
+
+.for sb in ${SETBASES}
+.if exists(${sb}/mi)
+SETFILES:=${SETFILES} ${sb}/mi
+.endif
 .for md in md.${MACHINE} /md.${MACHINE}.${MACHINE_ARCH}
-.if exists(${SETBASE}/${md})
-SETFILES:= ${SETFILES} ${SETBASE}/${md}
+.if exists(${sb}/${md})
+SETFILES:= ${SETFILES} ${sb}/${md}
 .endif
 .endfor
+.endfor
 
 .if !make(cleandir) && !make(obj) && !make(includes) && !make(install)
-DEPFILEGLOB = ${TOOL_SED} -ne '/\/usr\/include\/.*\.h[ 	]/{s/[ 	]obsolete$$//;t' -e 's/xenio//;t' -e 's,\.\([^ 	]*\).*,${DESTDIR}\1,;p;}' ${SETFILES}
+DEPFILEGLOB = ${TOOL_SED} -ne '/\/usr\/.*include\/.*\.h[ 	]/{s/[ 	]obsolete$$//;t' -e 's/xenio//;t' -e 's,\.\([^ 	]*\).*,${DESTDIR}\1,;p;}' ${SETFILES}
 DEPFILES != ${DEPFILEGLOB} | xargs egrep -l '(_IO\(|_IOR\(|_IOW\(|_IOWR\()' 2>/dev/null || :
 .endif
 
@@ -29,5 +35,18 @@ ${PROG}-ioctl.c: mkioctls Makefile ${DEP
 SRCS+=		${PROG}-ioctl.c
 CLEANFILES+=	${PROG}-ioctl.c
 DPSRCS+=	${PROG}-ioctl.c
+CPPFLAGS+=	-I${DESTDIR}/usr/X11R7/include/libdrm
+CPPFLAGS+=	-I${DESTDIR}/usr/X11R7/include/pixman-1
+CPPFLAGS+=	-I${DESTDIR}/usr/X11R7/include
+CPPFLAGS+=	-D_ALTQ_ALTQ_JOBS_H_	# redefinition of inline
+# De-select one, dup ioctls
+CPPFLAGS+=	-D_VIA_DRM_H_		# Missing header
+#CPPFLAGS+=	-D_I915_DRM_H_		# Dup ioctls
+CPPFLAGS+=	-D__R128_DRM_H__	# Dup ioctls
+CPPFLAGS+=	-D__SIS_DRM_H__		# Dup ioctls
+CPPFLAGS+=	-D__SAVAGE_DRM_H__	# Dup ioctls
+CPPFLAGS+=	-D__RADEON_DRM_H__	# Dup ioctls
+CPPFLAGS+=	-D__MACH64_DRM_H__	# Dup ioctls
+CPPFLAGS+=	-D__MGA_DRM_H__		# Dup ioctls
 
 ${DEPFILES}: .PRECIOUS



CVS commit: src/usr.bin/kdump

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  6 20:08:23 UTC 2015

Modified Files:
src/usr.bin/kdump: mkioctls

Log Message:
Extend the scripts to handle the X drm ioctls.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/kdump/mkioctls

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/kdump/mkioctls
diff -u src/usr.bin/kdump/mkioctls:1.41 src/usr.bin/kdump/mkioctls:1.42
--- src/usr.bin/kdump/mkioctls:1.41	Thu Apr  4 18:32:12 2013
+++ src/usr.bin/kdump/mkioctls	Fri Feb  6 15:08:23 2015
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mkioctls,v 1.41 2013/04/04 22:32:12 dsl Exp $
+#	$NetBSD: mkioctls,v 1.42 2015/02/06 20:08:23 christos Exp $
 #
 # Copyright (c) 1994
 #	The Regents of the University of California.  All rights reserved.
@@ -48,6 +48,7 @@ echo "struct crap { int _xxx; };" # XXX 
 echo "typedef struct crap videomemory_t;" # XXX arm video lossage
 echo "typedef struct crap RF_AccTotals_t;" # XXX Raidframe lossage
 echo "struct rf_test_acc { int _xxx; };" # XXX Raidframe lossage
+echo "struct map_info { int _xxx[22]; };" # XXX Xorg lossage
 echo "#include "
 echo "#include "
 echo "#include "
@@ -82,7 +83,12 @@ do
 	echo "#include <$i>"
 done | ${SED} -e "s,${DESTDIR}/usr/include/,,g"
 
-${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include -dM ${1+"$@"} | \
+${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include \
+-I${DESTDIR}/usr/X11R7/include \
+-I${DESTDIR}/usr/X11R7/include/pixman-1 \
+-I${DESTDIR}/usr/X11R7/include/libdrm \
+-D_VIA_DRM_H_ \
+-dM ${1+"$@"} | \
 ${AWK} '
 BEGIN {
 	keep["SLIOCGUNIT"] = 1;	# Same as PPPIOCGASYNCMAP
@@ -170,7 +176,7 @@ BEGIN {
 	print "\tswitch (val) {\n"
 }
 
-/^#[ 	]*define[ 	]*[A-Z0-9_]*[ 	]*_IO[W]*[R]*[ 	]*\(/ {
+/^#[ 	]*define[ 	]*[A-Z0-9_]*[ 	]*[D]*[R]*[M]*_IO[W]*[R]*[ 	]*\(/ {
 	
 	# find where the name starts
 	for (i = 1; i <= NF; i++)



CVS commit: xsrc/external/mit/xorg-server/dist/include

2015-02-06 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri Feb  6 19:29:06 UTC 2015

Modified Files:
xsrc/external/mit/xorg-server/dist/include: regionstr.h

Log Message:
fix signed/unsigned comparison.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/include/regionstr.h

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/include/regionstr.h
diff -u xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.2 xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.3
--- xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.2	Tue Dec  9 14:26:18 2014
+++ xsrc/external/mit/xorg-server/dist/include/regionstr.h	Fri Feb  6 14:29:06 2015
@@ -108,7 +108,7 @@ static inline BoxPtr RegionEnd(RegionPtr
 }
 
 static inline size_t RegionSizeof(int n) {
-if (n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
+if (n < 0 || (size_t)n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
 return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
 else
 return 0;



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

2015-02-06 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri Feb  6 19:26:09 UTC 2015

Modified Files:
xsrc/external/mit/libdrm/dist/include/drm: i915_drm.h

Log Message:
fix cut-n-paste error


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 \
xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h
diff -u xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h:1.1.1.6 xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h:1.2
--- xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h:1.1.1.6	Sat Dec 13 16:33:25 2014
+++ xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h	Fri Feb  6 14:26:09 2015
@@ -268,7 +268,7 @@ typedef struct _drm_i915_sarea {
 #define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE	DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)
 #define DRM_IOCTL_I915_OVERLAY_ATTRS	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)
 #define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
-#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
+#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
 #define DRM_IOCTL_I915_GEM_WAIT		DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
 #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create)
 #define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY	DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)



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

2015-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  6 19:24:12 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/uapi/drm: i915_drm.h

Log Message:
fix ioctl cut-n-paste error


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/sys/external/bsd/drm2/dist/uapi/drm/i915_drm.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/external/bsd/drm2/dist/uapi/drm/i915_drm.h
diff -u src/sys/external/bsd/drm2/dist/uapi/drm/i915_drm.h:1.1.1.2 src/sys/external/bsd/drm2/dist/uapi/drm/i915_drm.h:1.2
--- src/sys/external/bsd/drm2/dist/uapi/drm/i915_drm.h:1.1.1.2	Wed Jul 16 15:35:30 2014
+++ src/sys/external/bsd/drm2/dist/uapi/drm/i915_drm.h	Fri Feb  6 14:24:12 2015
@@ -267,7 +267,7 @@ typedef struct _drm_i915_sarea {
 #define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE	DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)
 #define DRM_IOCTL_I915_OVERLAY_ATTRS	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)
 #define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
-#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
+#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
 #define DRM_IOCTL_I915_GEM_WAIT		DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
 #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create)
 #define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY	DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)



CVS commit: src/sys/kern

2015-02-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Feb  6 18:21:29 UTC 2015

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

Log Message:
Don't include 


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/kern/kern_malloc.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/kern_malloc.c
diff -u src/sys/kern/kern_malloc.c:1.144 src/sys/kern/kern_malloc.c:1.145
--- src/sys/kern/kern_malloc.c:1.144	Fri Feb  6 18:19:22 2015
+++ src/sys/kern/kern_malloc.c	Fri Feb  6 18:21:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_malloc.c,v 1.144 2015/02/06 18:19:22 maxv Exp $	*/
+/*	$NetBSD: kern_malloc.c,v 1.145 2015/02/06 18:21:29 maxv Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -70,14 +70,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.144 2015/02/06 18:19:22 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.145 2015/02/06 18:21:29 maxv Exp $");
 
 #include 
 #include 
 #include 
 
-#include 
-
 /*
  * Built-in malloc types.  Note: ought to be removed.
  */



CVS commit: src/sys

2015-02-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Feb  6 18:19:22 UTC 2015

Modified Files:
src/sys/kern: kern_malloc.c
src/sys/rump/librump/rumpkern: rump.c
src/sys/uvm: uvm_extern.h uvm_km.c

Log Message:
Kill kmeminit().


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/kern/kern_malloc.c
cvs rdiff -u -r1.315 -r1.316 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.192 -r1.193 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.138 -r1.139 src/sys/uvm/uvm_km.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/kern_malloc.c
diff -u src/sys/kern/kern_malloc.c:1.143 src/sys/kern/kern_malloc.c:1.144
--- src/sys/kern/kern_malloc.c:1.143	Mon May 19 02:51:24 2014
+++ src/sys/kern/kern_malloc.c	Fri Feb  6 18:19:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_malloc.c,v 1.143 2014/05/19 02:51:24 rmind Exp $	*/
+/*	$NetBSD: kern_malloc.c,v 1.144 2015/02/06 18:19:22 maxv Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.143 2014/05/19 02:51:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.144 2015/02/06 18:19:22 maxv Exp $");
 
 #include 
 #include 
@@ -200,11 +200,3 @@ kern_realloc(void *curaddr, unsigned lon
 	free(curaddr, ksp);
 	return newaddr;
 }
-
-/*
- * Initialize the kernel memory allocator
- */
-void
-kmeminit(void)
-{
-}

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.315 src/sys/rump/librump/rumpkern/rump.c:1.316
--- src/sys/rump/librump/rumpkern/rump.c:1.315	Wed Jan  7 22:24:04 2015
+++ src/sys/rump/librump/rumpkern/rump.c	Fri Feb  6 18:19:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.315 2015/01/07 22:24:04 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.316 2015/02/06 18:19:22 maxv Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.315 2015/01/07 22:24:04 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.316 2015/02/06 18:19:22 maxv Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -307,7 +307,6 @@ rump_init(void)
 	prop_kern_init();
 
 	kmem_init();
-	kmeminit();
 
 	uvm_ra_init();
 	uao_init();

Index: src/sys/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.192 src/sys/uvm/uvm_extern.h:1.193
--- src/sys/uvm/uvm_extern.h:1.192	Sun Dec 14 23:48:58 2014
+++ src/sys/uvm/uvm_extern.h	Fri Feb  6 18:19:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.192 2014/12/14 23:48:58 chs Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.193 2015/02/06 18:19:22 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -741,7 +741,6 @@ bool			uvn_needs_writefault_p(struct uvm
 
 /* kern_malloc.c */
 void			kmeminit_nkmempages(void);
-void			kmeminit(void);
 extern int		nkmempages;
 
 #endif /* _KERNEL */

Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.138 src/sys/uvm/uvm_km.c:1.139
--- src/sys/uvm/uvm_km.c:1.138	Tue Jan 29 21:29:40 2013
+++ src/sys/uvm/uvm_km.c	Fri Feb  6 18:19:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.138 2013/01/29 21:29:40 para Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.139 2015/02/06 18:19:22 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -152,7 +152,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.138 2013/01/29 21:29:40 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.139 2015/02/06 18:19:22 maxv Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -364,10 +364,7 @@ uvm_km_bootstrap(vaddr_t start, vaddr_t 
 void
 uvm_km_init(void)
 {
-
 	kmem_init();
-
-	kmeminit(); // killme
 }
 
 /*



CVS commit: src/lib/libc/gen

2015-02-06 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Fri Feb  6 17:35:46 UTC 2015

Modified Files:
src/lib/libc/gen: getdomainname.3

Log Message:
PR/49642: change processor to host

Use the wording used by FreeBSD, IRIX, and MacOSX (as a sample) rather
suggested wording in PR from Henning Petersen.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/getdomainname.3

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

Modified files:

Index: src/lib/libc/gen/getdomainname.3
diff -u src/lib/libc/gen/getdomainname.3:1.15 src/lib/libc/gen/getdomainname.3:1.16
--- src/lib/libc/gen/getdomainname.3:1.15	Thu Aug  7 16:42:49 2003
+++ src/lib/libc/gen/getdomainname.3	Fri Feb  6 17:35:46 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getdomainname.3,v 1.15 2003/08/07 16:42:49 agc Exp $
+.\"	$NetBSD: getdomainname.3,v 1.16 2015/02/06 17:35:46 ginsbach Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -46,7 +46,7 @@
 .Fn setdomainname "const char *name" "size_t namelen"
 .Sh DESCRIPTION
 .Fn getdomainname
-returns the standard domain name for the current processor, as
+returns the standard domain name for the current host, as
 previously set by
 .Fn setdomainname .
 The parameter



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

2015-02-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  6 17:15:31 UTC 2015

Modified Files:
src/distrib/sets/lists/debug: md.sparc64

Log Message:
Fix copy & pasto (libblacklist version)


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/distrib/sets/lists/debug/md.sparc64

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.sparc64
diff -u src/distrib/sets/lists/debug/md.sparc64:1.77 src/distrib/sets/lists/debug/md.sparc64:1.78
--- src/distrib/sets/lists/debug/md.sparc64:1.77	Sun Jan 25 15:50:30 2015
+++ src/distrib/sets/lists/debug/md.sparc64	Fri Feb  6 17:15:31 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.77 2015/01/25 15:50:30 christos Exp $
+# $NetBSD: md.sparc64,v 1.78 2015/02/06 17:15:31 martin Exp $
 ./usr/lib/sparc/i18n/libBIG5_g.a		comp-obsolete		obsolete
 ./usr/lib/sparc/i18n/libDECHanyu_g.a		comp-obsolete		obsolete
 ./usr/lib/sparc/i18n/libEUCTW_g.a		comp-obsolete		obsolete
@@ -197,7 +197,7 @@
 ./usr/libdata/debug/usr/lib/sparc/libatf-c.so.0.0.debug			comp-compat-shlib	compat,pic,atf,debug
 ./usr/libdata/debug/usr/lib/sparc/libbfd.so.13.0.debug			comp-compat-shlib	compat,pic,binutils,debug
 ./usr/libdata/debug/usr/lib/sparc/libbind9.so.8.1.debug			comp-compat-shlib	compat,pic,debug
-./usr/libdata/debug/usr/lib/sparc/libblacklist.so.4.2.debug		comp-compat-shlib	compat,pic,debug
+./usr/libdata/debug/usr/lib/sparc/libblacklist.so.0.0.debug		comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libbluetooth.so.4.2.debug		comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libbsdmalloc.so.0.0.debug		comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libbz2.so.1.1.debug			comp-compat-shlib	compat,pic,debug



CVS commit: src/distrib/utils/embedded/conf

2015-02-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb  6 15:15:02 UTC 2015

Modified Files:
src/distrib/utils/embedded/conf: rpi.conf

Log Message:
By default, RPI firmware sets the max CPU frequency to 600MHz. This can be
overridden by setting arm_freq in config.txt, but the default freq at boot
is still 600MHz.

Add logic to rc.local to compare the current vs. max CPU frequency; if they
differ, set the target frequency to the maximum.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/distrib/utils/embedded/conf/rpi.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/rpi.conf
diff -u src/distrib/utils/embedded/conf/rpi.conf:1.24 src/distrib/utils/embedded/conf/rpi.conf:1.25
--- src/distrib/utils/embedded/conf/rpi.conf:1.24	Thu Nov 28 13:39:18 2013
+++ src/distrib/utils/embedded/conf/rpi.conf	Fri Feb  6 15:15:01 2015
@@ -1,4 +1,4 @@
-# $NetBSD: rpi.conf,v 1.24 2013/11/28 13:39:18 skrll Exp $
+# $NetBSD: rpi.conf,v 1.25 2015/02/06 15:15:01 jmcneill Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
@@ -29,6 +29,22 @@ wscons=YES
 devpubd=YES
 EOF
 
+	#
+	# If arm_freq is specified in config.txt, set CPU frequency
+	# to match at boot time.
+	#
+	cp ${release}/etc/rc.local ${mnt}/etc/rc.local
+	cat > /tmp/a << EOF
+if /sbin/sysctl -q machdep.cpu.frequency.max; then
+	cpufreq_max=\$(/sbin/sysctl -n machdep.cpu.frequency.max)
+	cpufreq_cur=\$(/sbin/sysctl -n machdep.cpu.frequency.current)
+	if [ ! "\$cpufreq_max" = "\$cpufreq_cur" ]; then
+		/sbin/sysctl -w machdep.cpu.frequency.target=\$cpufreq_max
+	fi
+fi
+EOF
+	echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" \
+	>> "$tmp/selected_sets"
 }
 
 populate() {



CVS commit: src/share/misc

2015-02-06 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Fri Feb  6 14:48:24 UTC 2015

Modified Files:
src/share/misc: acronyms.comp

Log Message:
PR/49646: Nikolai Lifanov: Add LLDP - 802.1ab link layer discovery protocol


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.147 src/share/misc/acronyms.comp:1.148
--- src/share/misc/acronyms.comp:1.147	Fri Feb  6 14:39:14 2015
+++ src/share/misc/acronyms.comp	Fri Feb  6 14:48:24 2015
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.147 2015/02/06 14:39:14 ginsbach Exp $
+$NetBSD: acronyms.comp,v 1.148 2015/02/06 14:48:24 ginsbach Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -660,6 +660,7 @@ LKML	Linux kernel mailing list
 LL	load linked
 LL/SC	load linked/store conditional
 LLC	logical link control
+LLDP	link layer discovery protocol
 LLF	low level format
 LLMNR	link-local multicast name resolution
 LLVM	Low Level Virtual Machine



CVS commit: src/share/misc

2015-02-06 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Fri Feb  6 14:39:15 UTC 2015

Modified Files:
src/share/misc: acronyms.comp

Log Message:
Add Port Control Protocol (RFC 6887)


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.146 src/share/misc/acronyms.comp:1.147
--- src/share/misc/acronyms.comp:1.146	Thu Jan 29 06:53:28 2015
+++ src/share/misc/acronyms.comp	Fri Feb  6 14:39:14 2015
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.146 2015/01/29 06:53:28 plunky Exp $
+$NetBSD: acronyms.comp,v 1.147 2015/02/06 14:39:14 ginsbach Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -884,6 +884,7 @@ PCI	peripheral component interconnect
 PCM	phase change memory
 PCM	pulse code modulation
 PCMCIA	Personal Computer Memory Card International Association
+PCP	Port Control Protocol
 PD	public domain
 PDA	personal digital assistant
 PDA	pushdown automaton



CVS commit: src/sys/arch/usermode

2015-02-06 Thread Patrick Welche
Module Name:src
Committed By:   prlw1
Date:   Fri Feb  6 10:25:13 UTC 2015

Modified Files:
src/sys/arch/usermode/include: thunk.h
src/sys/arch/usermode/usermode: thunk.c

Log Message:
Take procfs_machdep.c rev 1.4 one step further and adjust signature of
thunk_getcpuinfo().


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/usermode/include/thunk.h
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/usermode/usermode/thunk.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/usermode/include/thunk.h
diff -u src/sys/arch/usermode/include/thunk.h:1.61 src/sys/arch/usermode/include/thunk.h:1.62
--- src/sys/arch/usermode/include/thunk.h:1.61	Sat Mar  3 21:15:16 2012
+++ src/sys/arch/usermode/include/thunk.h	Fri Feb  6 10:25:13 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.61 2012/03/03 21:15:16 reinoud Exp $ */
+/* $NetBSD: thunk.h,v 1.62 2015/02/06 10:25:13 prlw1 Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill 
@@ -156,7 +156,7 @@ int	thunk_idle(void);
 char *	thunk_getenv(const char *);
 vaddr_t	thunk_get_vm_min_address(void);
 
-int	thunk_getcpuinfo(char *, int *);
+int	thunk_getcpuinfo(char *, size_t *);
 
 int	thunk_getmachine(char *, size_t, char *, size_t);
 

Index: src/sys/arch/usermode/usermode/thunk.c
diff -u src/sys/arch/usermode/usermode/thunk.c:1.84 src/sys/arch/usermode/usermode/thunk.c:1.85
--- src/sys/arch/usermode/usermode/thunk.c:1.84	Sun Nov 10 19:51:00 2013
+++ src/sys/arch/usermode/usermode/thunk.c	Fri Feb  6 10:25:13 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.84 2013/11/10 19:51:00 jmcneill Exp $ */
+/* $NetBSD: thunk.c,v 1.85 2015/02/06 10:25:13 prlw1 Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 #ifdef __NetBSD__
-__RCSID("$NetBSD: thunk.c,v 1.84 2013/11/10 19:51:00 jmcneill Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.85 2015/02/06 10:25:13 prlw1 Exp $");
 #endif
 
 #include 
@@ -754,7 +754,7 @@ thunk_idle(void)
 }
 
 int
-thunk_getcpuinfo(char *cp, int *len)
+thunk_getcpuinfo(char *cp, size_t *len)
 {
 	ssize_t rlen;
 	int fd;



CVS commit: src/lib/libc/stdlib

2015-02-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb  6 08:37:39 UTC 2015

Modified Files:
src/lib/libc/stdlib: malloc.3 reallocarray.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libc/stdlib/malloc.3
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/reallocarray.3

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

Modified files:

Index: src/lib/libc/stdlib/malloc.3
diff -u src/lib/libc/stdlib/malloc.3:1.40 src/lib/libc/stdlib/malloc.3:1.41
--- src/lib/libc/stdlib/malloc.3:1.40	Thu Feb  5 20:02:28 2015
+++ src/lib/libc/stdlib/malloc.3	Fri Feb  6 08:37:39 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.40 2015/02/05 20:02:28 christos Exp $
+.\" $NetBSD: malloc.3,v 1.41 2015/02/06 08:37:39 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -175,18 +175,18 @@ if (size && number > SIZE_MAX / size) {
 The above test is not sufficient in all cases.
 For example, multiplying ints requires a different set of checks:
 .Bd -literal -offset indent
-int num, size; 
-\&.\&.\&. 
- 
-/* Avoid invalid requests */ 
-if (size < 0 || num < 0) 
-	errc(1, EOVERFLOW, "overflow"); 
- 
-/* Check for signed int overflow */ 
-if (size && num > INT_MAX / size) 
-	errc(1, EOVERFLOW, "overflow"); 
- 
-if ((p = malloc(size * num)) == NULL) 
+int num, size;
+\&.\&.\&.
+
+/* Avoid invalid requests */
+if (size < 0 || num < 0)
+	errc(1, EOVERFLOW, "overflow");
+
+/* Check for signed int overflow */
+if (size && num > INT_MAX / size)
+	errc(1, EOVERFLOW, "overflow");
+
+if ((p = malloc(size * num)) == NULL)
 	err(1, "malloc");
 .Ed
 .Pp
@@ -194,18 +194,18 @@ Assuming the implementation checks for i
 .Nx
 does, it is much easier to use
 .Fn calloc
-or 
+or
 .Xr reallocarr 3 .
 .Pp
 The above examples could be simplified to:
 .Bd -literal -offset indent
 ptr = NULL;
-if ((e = reallocarr(&ptr, num, size))) 
+if ((e = reallocarr(&ptr, num, size)))
 	errx(1, "reallocarr", strerror(e));
 .Ed
 .Bd -literal -offset indent
 or at the cost of initialization:
-if ((p = calloc(num, size)) == NULL) 
+if ((p = calloc(num, size)) == NULL)
 	err(1, "calloc");
 .Ed
 .Pp

Index: src/lib/libc/stdlib/reallocarray.3
diff -u src/lib/libc/stdlib/reallocarray.3:1.2 src/lib/libc/stdlib/reallocarray.3:1.3
--- src/lib/libc/stdlib/reallocarray.3:1.2	Thu Feb  5 22:05:33 2015
+++ src/lib/libc/stdlib/reallocarray.3	Fri Feb  6 08:37:39 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: reallocarray.3,v 1.2 2015/02/05 22:05:33 christos Exp $
+.\" $NetBSD: reallocarray.3,v 1.3 2015/02/06 08:37:39 wiz Exp $
 .\"
 .Dd February 5, 2015
 .Dt REALLOCARRAY 3
@@ -30,7 +30,7 @@ and making sure that overflow does not h
 .Dq "nmemb * size" .
 .Pp
 This function is provided for source compatibility with
-.Ox 
+.Ox
 and
 its use is discouraged in preference to
 .Xr reallocarr 3 .
@@ -50,7 +50,7 @@ or preserving the value from
 .Sh SEE ALSO
 .Xr malloc 3 ,
 .Xr realloc 3 ,
-.Xr reallocarr 3 
+.Xr reallocarr 3
 .Sh STANDARDS
 .Fn reallocarray
 is an
@@ -78,14 +78,14 @@ function was designed to facilitate safe
 robust programming and overcome the shortcomings of the
 .Xr malloc 3
 and
-.Xr realloc 3 
+.Xr realloc 3
 functions by centralizing the overflow check in the multiplication of
 .Fa nmemb
 and
 .Fa size .
 .Pp
 There are still portability issues (it does not solve
-the 
+the
 .Dv 0
 sized allocation return ambiguity in the C standard: does
 .Fn reallocarray