Module Name: src
Committed By: matt
Date: Wed Apr 4 00:26:26 UTC 2012
Modified Files:
src/sys/uvm [matt-nb5-mips64]: uvm_init.c uvm_swap.c
Log Message:
Move the uvm_scheduler_mutex and cv init to uvm_init since they are
independent of VMSWAP.
To generate a diff of this commit:
cvs rdiff -u -r1.34.12.1 -r1.34.12.2 src/sys/uvm/uvm_init.c
cvs rdiff -u -r1.140.4.1 -r1.140.4.1.4.1 src/sys/uvm/uvm_swap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_init.c
diff -u src/sys/uvm/uvm_init.c:1.34.12.1 src/sys/uvm/uvm_init.c:1.34.12.2
--- src/sys/uvm/uvm_init.c:1.34.12.1 Thu Feb 9 03:04:59 2012
+++ src/sys/uvm/uvm_init.c Wed Apr 4 00:26:25 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_init.c,v 1.34.12.1 2012/02/09 03:04:59 matt Exp $ */
+/* $NetBSD: uvm_init.c,v 1.34.12.2 2012/04/04 00:26:25 matt Exp $ */
/*
*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.34.12.1 2012/02/09 03:04:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.34.12.2 2012/04/04 00:26:25 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -190,4 +190,12 @@ uvm_init(void)
*/
uvm_ra_init();
+
+ /*
+ * Init scheduler mutex/cv.
+ */
+ cv_init(&uvm.scheduler_cv, "schedule");
+ /* XXXSMP should be at IPL_VM, but for audio interrupt handlers. */
+ mutex_init(&uvm_scheduler_mutex, MUTEX_SPIN, IPL_SCHED);
+
}
Index: src/sys/uvm/uvm_swap.c
diff -u src/sys/uvm/uvm_swap.c:1.140.4.1 src/sys/uvm/uvm_swap.c:1.140.4.1.4.1
--- src/sys/uvm/uvm_swap.c:1.140.4.1 Sat Dec 27 18:22:49 2008
+++ src/sys/uvm/uvm_swap.c Wed Apr 4 00:26:25 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.140.4.1 2008/12/27 18:22:49 snj Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.140.4.1.4.1 2012/04/04 00:26:25 matt Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.140.4.1 2008/12/27 18:22:49 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.140.4.1.4.1 2012/04/04 00:26:25 matt Exp $");
#include "fs_nfs.h"
#include "opt_uvmhist.h"
@@ -249,12 +249,8 @@ uvm_swap_init(void)
LIST_INIT(&swap_priority);
uvmexp.nswapdev = 0;
rw_init(&swap_syscall_lock);
- cv_init(&uvm.scheduler_cv, "schedule");
mutex_init(&uvm_swap_data_lock, MUTEX_DEFAULT, IPL_NONE);
- /* XXXSMP should be at IPL_VM, but for audio interrupt handlers. */
- mutex_init(&uvm_scheduler_mutex, MUTEX_SPIN, IPL_SCHED);
-
if (bdevvp(swapdev, &swapdev_vp))
panic("uvm_swap_init: can't get vnode for swap device");
if (vn_lock(swapdev_vp, LK_EXCLUSIVE | LK_RETRY))