CVS commit: src/sys/dev/mscp

2016-03-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Mar 29 04:55:53 UTC 2016

Modified Files:
src/sys/dev/mscp: mscp_disk.c

Log Message:
Initialize disk_geom information, DIOCGPARTINFO relies on it.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/mscp/mscp_disk.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/mscp/mscp_disk.c
diff -u src/sys/dev/mscp/mscp_disk.c:1.88 src/sys/dev/mscp/mscp_disk.c:1.89
--- src/sys/dev/mscp/mscp_disk.c:1.88	Sun Apr 26 15:15:20 2015
+++ src/sys/dev/mscp/mscp_disk.c	Tue Mar 29 04:55:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp_disk.c,v 1.88 2015/04/26 15:15:20 mlelstv Exp $	*/
+/*	$NetBSD: mscp_disk.c,v 1.89 2016/03/29 04:55:53 mlelstv Exp $	*/
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.88 2015/04/26 15:15:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.89 2016/03/29 04:55:53 mlelstv Exp $");
 
 #include 
 #include 
@@ -724,6 +724,29 @@ raattach(device_t parent, device_t self,
 }
 
 /*
+ * Initialize drive geometry data from disklabel
+ */
+static void
+ra_set_geometry(struct ra_softc *ra)
+{
+	struct	disklabel *dl;
+	struct	disk_geom *dg;
+
+	dl = ra->ra_disk.dk_label;
+	dg = >ra_disk.dk_geom;
+
+	memset(dg, 0, sizeof(*dg));
+	dg->dg_secsize = dl->d_secsize;
+	dg->dg_nsectors = dl->d_nsectors;
+	dg->dg_ntracks = dl->d_ntracks;
+
+	dg->dg_ncylinders = dl->d_ncylinders;
+	dg->dg_secperunit = dl->d_secperunit;
+
+	disk_set_info(ra->ra_dev, >ra_disk, NULL);
+}
+
+/*
  * (Try to) put the drive online. This is done the first time the
  * drive is opened, or if it har fallen offline.
  */
@@ -968,6 +991,7 @@ rronline(device_t usc, struct mscp *mp)
 		dl->d_rpm = 300;
 	}
 	rrmakelabel(dl, ra->ra_mediaid);
+	ra_set_geometry(ra);
 
 	return (MSCP_DONE);
 }



CVS commit: src/sys/miscfs/procfs

2016-03-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Mar 28 17:23:47 UTC 2016

Modified Files:
src/sys/miscfs/procfs: procfs_linux.c

Log Message:
Align /proc//statm data with /proc//stat and
provide RSS information. There is no data about shared
pages.

Helps PR 50801.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/miscfs/procfs/procfs_linux.c

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

Modified files:

Index: src/sys/miscfs/procfs/procfs_linux.c
diff -u src/sys/miscfs/procfs/procfs_linux.c:1.71 src/sys/miscfs/procfs/procfs_linux.c:1.72
--- src/sys/miscfs/procfs/procfs_linux.c:1.71	Fri Jul 24 13:02:52 2015
+++ src/sys/miscfs/procfs/procfs_linux.c	Mon Mar 28 17:23:47 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: procfs_linux.c,v 1.71 2015/07/24 13:02:52 maxv Exp $  */
+/*  $NetBSD: procfs_linux.c,v 1.72 2016/03/28 17:23:47 mlelstv Exp $  */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.71 2015/07/24 13:02:52 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.72 2016/03/28 17:23:47 mlelstv Exp $");
 
 #include 
 #include 
@@ -366,10 +366,10 @@ procfs_do_pid_statm(struct lwp *curl, st
 {
 	struct vmspace	*vm;
 	struct proc	*p = l->l_proc;
-	struct rusage	*ru = >p_stats->p_ru;
 	char		*bf;
 	int	 	 error;
 	int	 	 len;
+	struct kinfo_proc2 ki;
 
 	bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
 
@@ -379,18 +379,27 @@ procfs_do_pid_statm(struct lwp *curl, st
 		goto out;
 	}
 
-	len = snprintf(bf, LBFSZ,
-	"%lu %lu %lu %lu %lu %lu %lu\n",
-		(unsigned long)(vm->vm_tsize + vm->vm_dsize + vm->vm_ssize), /* size */
-		(unsigned long)(vm->vm_rssize),	/* resident */
-		(unsigned long)(ru->ru_ixrss),	/* shared */
-		(unsigned long)(vm->vm_tsize),	/* text size in pages */
-		(unsigned long)(vm->vm_dsize),	/* data size in pages */
-		(unsigned long)(vm->vm_ssize),	/* stack size in pages */
-		(unsigned long) 0);
+	mutex_enter(proc_lock);
+	mutex_enter(p->p_lock);
+
+	/* retrieve RSS size */
+	fill_kproc2(p, , false);
+
+	mutex_exit(p->p_lock);
+	mutex_exit(proc_lock);
 
 	uvmspace_free(vm);
 
+	len = snprintf(bf, LBFSZ,
+	"%lu %lu %lu %lu %lu %lu %lu\n",
+		(unsigned long)(ki.p_vm_msize),	/* size */
+		(unsigned long)(ki.p_vm_rssize),/* resident */
+		(unsigned long)(ki.p_uru_ixrss),/* shared */
+		(unsigned long)(ki.p_vm_tsize),	/* text */
+		(unsigned long) 0,		/* library (unused) */
+		(unsigned long)(ki.p_vm_dsize + ki.p_vm_ssize),	/* data+stack */
+		(unsigned long) 0);		/* dirty */
+
 	if (len == 0)
 		goto out;
 



CVS commit: src/sys/kern

2016-03-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon Mar 28 16:45:44 UTC 2016

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

Log Message:
fix this properly.
uap is supposed to hold init's argv[], so it's 3 * sizeof(char *), the bug
was to copyout(..., sizeof(args)) which is an array of syscallargs, not argv
*


To generate a diff of this commit:
cvs rdiff -u -r1.478 -r1.479 src/sys/kern/init_main.c

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.478 src/sys/kern/init_main.c:1.479
--- src/sys/kern/init_main.c:1.478	Mon Mar 28 15:45:18 2016
+++ src/sys/kern/init_main.c	Mon Mar 28 16:45:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.478 2016/03/28 15:45:18 macallan Exp $	*/
+/*	$NetBSD: init_main.c,v 1.479 2016/03/28 16:45:44 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.478 2016/03/28 15:45:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.479 2016/03/28 16:45:44 macallan Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -1035,7 +1035,7 @@ start_init(void *arg)
 		 * Move out the arg pointers.
 		 */
 		ucp = (void *)STACK_ALIGN(ucp, STACK_ALIGNBYTES);
-		uap = (char **)STACK_ALLOC(ucp, sizeof(args));
+		uap = (char **)STACK_ALLOC(ucp, sizeof(argv));
 		SCARG(, path) = arg0;
 		SCARG(, argp) = uap;
 		SCARG(, envp) = NULL;
@@ -1044,7 +1044,7 @@ start_init(void *arg)
 		argv[0] = slash ? arg0 + (slash + 1 - path) : arg0;
 		argv[1] = arg1;
 		argv[2] = NULL;
-		if ((error = copyout(argv, uap, sizeof(args))) != 0)
+		if ((error = copyout(argv, uap, sizeof(argv))) != 0)
 			goto copyerr;
 
 		/*



CVS commit: src/sys/kern

2016-03-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon Mar 28 15:45:18 UTC 2016

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

Log Message:
do not assume that syscallarg(const char *) and (char *) are the same size
first step to make n32 kernels run binaries again


To generate a diff of this commit:
cvs rdiff -u -r1.477 -r1.478 src/sys/kern/init_main.c

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.477 src/sys/kern/init_main.c:1.478
--- src/sys/kern/init_main.c:1.477	Tue Dec  8 20:36:15 2015
+++ src/sys/kern/init_main.c	Mon Mar 28 15:45:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.477 2015/12/08 20:36:15 christos Exp $	*/
+/*	$NetBSD: init_main.c,v 1.478 2016/03/28 15:45:18 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.477 2015/12/08 20:36:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.478 2016/03/28 15:45:18 macallan Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -1035,7 +1035,7 @@ start_init(void *arg)
 		 * Move out the arg pointers.
 		 */
 		ucp = (void *)STACK_ALIGN(ucp, STACK_ALIGNBYTES);
-		uap = (char **)STACK_ALLOC(ucp, sizeof(char *) * 3);
+		uap = (char **)STACK_ALLOC(ucp, sizeof(args));
 		SCARG(, path) = arg0;
 		SCARG(, argp) = uap;
 		SCARG(, envp) = NULL;



CVS commit: src/sys/lib/libkern

2016-03-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar 28 15:20:16 UTC 2016

Modified Files:
src/sys/lib/libkern: rngtest.c

Log Message:
Fix relation in rngtest failure message to match reality.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/rngtest.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/lib/libkern/rngtest.c
diff -u src/sys/lib/libkern/rngtest.c:1.2 src/sys/lib/libkern/rngtest.c:1.3
--- src/sys/lib/libkern/rngtest.c:1.2	Fri Nov 25 12:45:00 2011
+++ src/sys/lib/libkern/rngtest.c	Mon Mar 28 15:20:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rngtest.c,v 1.2 2011/11/25 12:45:00 joerg Exp $ */
+/*	$NetBSD: rngtest.c,v 1.3 2016/03/28 15:20:16 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@ the GNU Public License.
 #include 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rngtest.c,v 1.2 2011/11/25 12:45:00 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rngtest.c,v 1.3 2016/03/28 15:20:16 riastradh Exp $");
 
 #ifndef _KERNEL
 static inline int
@@ -263,13 +263,13 @@ rngtest(rngtest_t *const rc)
 		for (last = 0; last <= 1; ++last) {
 			if (rc->rt_runs[last][run] <= minrun[run]) {
 printf("Kernel RNG \"%s\" runs test FAILURE: "
-   "too few runs of %d %ds (%d < %d)\n",
+   "too few runs of %d %ds (%d <= %d)\n",
    rc->rt_name, run, last,
    rc->rt_runs[last][run], minrun[run]);
 ++rc->rt_nerrs;
 			} else if (rc->rt_runs[last][run] >= maxrun[run]) {
 printf("Kernel RNG \"%s\" runs test FAILURE: "
-   "too many runs of %d %ds (%d > %d)\n",
+   "too many runs of %d %ds (%d >= %d)\n",
    rc->rt_name, run, last,
    rc->rt_runs[last][run], maxrun[run]);
 ++rc->rt_nerrs;



CVS commit: src/sys/arch/playstation2/playstation2

2016-03-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 28 10:35:36 UTC 2016

Modified Files:
src/sys/arch/playstation2/playstation2: cpu.c

Log Message:
Add missing include


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/playstation2/playstation2/cpu.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/playstation2/playstation2/cpu.c
diff -u src/sys/arch/playstation2/playstation2/cpu.c:1.9 src/sys/arch/playstation2/playstation2/cpu.c:1.10
--- src/sys/arch/playstation2/playstation2/cpu.c:1.9	Fri Jul  4 08:33:08 2014
+++ src/sys/arch/playstation2/playstation2/cpu.c	Mon Mar 28 10:35:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.9 2014/07/04 08:33:08 martin Exp $	*/
+/*	$NetBSD: cpu.c,v 1.10 2016/03/28 10:35:36 martin Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -26,13 +26,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.9 2014/07/04 08:33:08 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10 2016/03/28 10:35:36 martin Exp $");
 
 #include 
 #include 
 #include 
 
 #include 
+#include 
 
 static int cpumatch(device_t, cfdata_t, void *);
 static void cpuattach(device_t, device_t, void *);



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

2016-03-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 28 10:31:45 UTC 2016

Modified Files:
src/sys/arch/playstation2/conf: Makefile.playstation2.inc

Log Message:
Simplify now that we have an internal toolchain


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/arch/playstation2/conf/Makefile.playstation2.inc

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/playstation2/conf/Makefile.playstation2.inc
diff -u src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.9 src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.10
--- src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.9	Mon Apr  6 10:49:13 2015
+++ src/sys/arch/playstation2/conf/Makefile.playstation2.inc	Mon Mar 28 10:31:45 2016
@@ -1,25 +1,5 @@
-#	$NetBSD: Makefile.playstation2.inc,v 1.9 2015/04/06 10:49:13 martin Exp $
-
-.if !defined(EXTERNAL_TOOLCHAIN) || ${EXTERNAL_TOOLCHAIN}==""
-.error please do not run "make" directly, use sh ../../conf/build.playstation2.sh instead
-.endif
-
-# working around makesystem bugs: redefine CC and friends here or it does
-# not properly get picked up by mkdep in sub-makes for "make depend" of
-# libkern and friends - XXX fix this
-PREFIX=${EXTERNAL_TOOLCHAIN}
-PLATFORM=mipsel--netbsd
-
-CC=${PREFIX}/bin/${PLATFORM}-gcc
-CPP=${PREFIX}/bin/${PLATFORM}-cpp
-AS=${PREFIX}/bin/${PLATFORM}-as
-AR=${PREFIX}/bin/${PLATFORM}-ar
-LD=${PREFIX}/bin/${PLATFORM}-ld
-RANLIB=${PREFIX}/bin/${PLATFORM}-ranlib
-NM=${PREFIX}/bin/${PLATFORM}-nm
-SIZE=${PREFIX}/bin/${PLATFORM}-size
-STRIP=${PREFIX}/bin/${PLATFORM}-strip
+#	$NetBSD: Makefile.playstation2.inc,v 1.10 2016/03/28 10:31:45 martin Exp $
 
 # Playstation2 uses 128 bit access, which currently requires n32 ABI
-CFLAGS+= -mabi=n32 -march=r5900 -fno-pic -msoft-float -Wa,-msoft-float
+CFLAGS+= -mabi=n32 -march=r5900 -fno-pic -msoft-float
 AFLAGS+= -mabi=n32 -march=r5900 -fno-pic -msoft-float



CVS commit: src/sys/kern

2016-03-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Mar 28 09:50:40 UTC 2016

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

Log Message:
Simplify.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/kern/subr_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/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.240 src/sys/kern/subr_autoconf.c:1.241
--- src/sys/kern/subr_autoconf.c:1.240	Sun Mar 13 10:07:22 2016
+++ src/sys/kern/subr_autoconf.c	Mon Mar 28 09:50:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.240 2016/03/13 10:07:22 mlelstv Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.241 2016/03/28 09:50:40 skrll Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.240 2016/03/13 10:07:22 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.241 2016/03/28 09:50:40 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -172,8 +172,6 @@ static void config_devdelete(device_t);
 static void config_devunlink(device_t, struct devicelist *);
 static void config_makeroom(int, struct cfdriver *);
 static void config_devlink(device_t);
-static void config_alldevs_unlock(int);
-static int config_alldevs_lock(void);
 static void config_alldevs_enter(struct alldevs_foray *);
 static void config_alldevs_exit(struct alldevs_foray *);
 static void config_add_attrib_dict(device_t);
@@ -1220,9 +1218,8 @@ config_makeroom(int n, struct cfdriver *
 static void
 config_devlink(device_t dev)
 {
-	int s;
 
-	s = config_alldevs_lock();
+	mutex_enter(_mtx);
 
 	KASSERT(device_cfdriver(dev)->cd_devs[dev->dv_unit] == dev);
 
@@ -1231,7 +1228,7 @@ config_devlink(device_t dev)
 	 * readers and writers are in the list.
 	 */
 	TAILQ_INSERT_TAIL(, dev, dv_list);
-	config_alldevs_unlock(s);
+	mutex_exit(_mtx);
 }
 
 static void
@@ -1715,7 +1712,7 @@ config_detach(device_t dev, int flags)
 #ifdef DIAGNOSTIC
 	device_t d;
 #endif
-	int rv = 0, s;
+	int rv = 0;
 
 #ifdef DIAGNOSTIC
 	cf = dev->dv_cfdata;
@@ -1730,9 +1727,9 @@ config_detach(device_t dev, int flags)
 	ca = dev->dv_cfattach;
 	KASSERT(ca != NULL);
 
-	s = config_alldevs_lock();
+	mutex_enter(_mtx);
 	if (dev->dv_del_gen != 0) {
-		config_alldevs_unlock(s);
+		mutex_exit(_mtx);
 #ifdef DIAGNOSTIC
 		printf("%s: %s is already detached\n", __func__,
 		device_xname(dev));
@@ -1740,7 +1737,7 @@ config_detach(device_t dev, int flags)
 		return ENOENT;
 	}
 	alldevs_nwrite++;
-	config_alldevs_unlock(s);
+	mutex_exit(_mtx);
 
 	if (!detachall &&
 	(flags & (DETACH_SHUTDOWN|DETACH_FORCE)) == DETACH_SHUTDOWN &&
@@ -2204,33 +2201,19 @@ config_twiddle_fn(void *cookie)
 	mutex_exit(_misc_lock);
 }
 
-static int
-config_alldevs_lock(void)
-{
-	mutex_enter(_mtx);
-	return 0;
-}
-
 static void
 config_alldevs_enter(struct alldevs_foray *af)
 {
 	TAILQ_INIT(>af_garbage);
-	af->af_s = config_alldevs_lock();
+	mutex_enter(_mtx);
 	config_collect_garbage(>af_garbage);
 } 
 
 static void
 config_alldevs_exit(struct alldevs_foray *af)
 {
-	config_alldevs_unlock(af->af_s);
-	config_dump_garbage(>af_garbage);
-}
-
-/*ARGSUSED*/
-static void
-config_alldevs_unlock(int s)
-{
 	mutex_exit(_mtx);
+	config_dump_garbage(>af_garbage);
 }
 
 /*
@@ -2242,15 +2225,13 @@ device_t
 device_lookup(cfdriver_t cd, int unit)
 {
 	device_t dv;
-	int s;
 
-	s = config_alldevs_lock();
-	KASSERT(mutex_owned(_mtx));
+	mutex_enter(_mtx);
 	if (unit < 0 || unit >= cd->cd_ndevs)
 		dv = NULL;
 	else if ((dv = cd->cd_devs[unit]) != NULL && dv->dv_del_gen != 0)
 		dv = NULL;
-	config_alldevs_unlock(s);
+	mutex_exit(_mtx);
 
 	return dv;
 }
@@ -2789,11 +2770,10 @@ void
 deviter_init(deviter_t *di, deviter_flags_t flags)
 {
 	device_t dv;
-	int s;
 
 	memset(di, 0, sizeof(*di));
 
-	s = config_alldevs_lock();
+	mutex_enter(_mtx);
 	if ((flags & DEVITER_F_SHUTDOWN) != 0)
 		flags |= DEVITER_F_RW;
 
@@ -2802,7 +2782,7 @@ deviter_init(deviter_t *di, deviter_flag
 	else
 		alldevs_nread++;
 	di->di_gen = alldevs_gen++;
-	config_alldevs_unlock(s);
+	mutex_exit(_mtx);
 
 	di->di_flags = flags;
 
@@ -2909,15 +2889,14 @@ void
 deviter_release(deviter_t *di)
 {
 	bool rw = (di->di_flags & DEVITER_F_RW) != 0;
-	int s;
 
-	s = config_alldevs_lock();
+	mutex_enter(_mtx);
 	if (rw)
 		--alldevs_nwrite;
 	else
 		--alldevs_nread;
 	/* XXX wake a garbage-collection thread */
-	config_alldevs_unlock(s);
+	mutex_exit(_mtx);
 }
 
 const char *



CVS commit: src/external/gpl3/binutils/dist/bfd

2016-03-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Mar 28 09:01:24 UTC 2016

Modified Files:
src/external/gpl3/binutils/dist/bfd: config.bfd

Log Message:
Add some more mips targets for martin


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/binutils/dist/bfd/config.bfd

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

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/config.bfd
diff -u src/external/gpl3/binutils/dist/bfd/config.bfd:1.21 src/external/gpl3/binutils/dist/bfd/config.bfd:1.22
--- src/external/gpl3/binutils/dist/bfd/config.bfd:1.21	Fri Mar 25 09:27:43 2016
+++ src/external/gpl3/binutils/dist/bfd/config.bfd	Mon Mar 28 09:01:24 2016
@@ -1082,11 +1082,11 @@ case "${targ}" in
 ;;
   mips*el-*-netbsd*)
 targ_defvec=mips_elf32_trad_le_vec
-targ_selvecs="mips_elf32_trad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
+targ_selvecs="mips_elf32_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
 ;;
   mips*-*-netbsd*)
 targ_defvec=mips_elf32_trad_be_vec
-targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
+targ_selvecs="mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec mips_ecoff_be_vec mips_ecoff_le_vec"
 ;;
   mips64*-*-openbsd*)
 targ_defvec=mips_elf64_trad_be_vec



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

2016-03-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 28 08:10:57 UTC 2016

Modified Files:
src/sys/arch/mips/conf: Makefile.mips

Log Message:
Restrict float format hacks to gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mips/conf/Makefile.mips

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/conf/Makefile.mips
diff -u src/sys/arch/mips/conf/Makefile.mips:1.63 src/sys/arch/mips/conf/Makefile.mips:1.64
--- src/sys/arch/mips/conf/Makefile.mips:1.63	Thu Feb 18 20:50:44 2016
+++ src/sys/arch/mips/conf/Makefile.mips	Mon Mar 28 08:10:57 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mips,v 1.63 2016/02/18 20:50:44 macallan Exp $
+#	$NetBSD: Makefile.mips,v 1.64 2016/03/28 08:10:57 martin Exp $
 
 # Makefile for NetBSD
 #
@@ -47,6 +47,7 @@ CPPFLAGS+=	-D${MACHINE}
 DEFGP?=		-G 0
 GP?=		${DEFGP}
 
+.if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC} == "48"
 # XXX
 # gcc does not pass floating point options to the assembler
 # by default, because it is afraid that the stricter tests
@@ -57,6 +58,7 @@ GP?=		${DEFGP}
 
 CFLAGS+=	-Wa,-msoft-float
 COPTS.mips_fpu.c+=	-Wa,-mhard-float
+.endif
 
 CFLAGS+=	${GP} -mno-abicalls -msoft-float -ffixed-24
 .if defined(LP64) && ${LP64} == "yes"