diff options
-rw-r--r-- | sys/uvm/uvm.h | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_extern.h | 3 | ||||
-rw-r--r-- | sys/uvm/uvm_page.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_page_i.h | 12 |
4 files changed, 10 insertions, 13 deletions
diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h index 3cfb93737f8..ec01125d36e 100644 --- a/sys/uvm/uvm.h +++ b/sys/uvm/uvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm.h,v 1.21 2007/06/18 21:51:15 pedro Exp $ */ +/* $OpenBSD: uvm.h,v 1.22 2007/11/29 00:26:41 tedu Exp $ */ /* $NetBSD: uvm.h,v 1.24 2000/11/27 08:40:02 chs Exp $ */ /* @@ -81,7 +81,7 @@ struct uvm { struct pglist page_inactive_swp;/* pages inactive (reclaim or free) */ struct pglist page_inactive_obj;/* pages inactive (reclaim or free) */ simple_lock_data_t pageqlock; /* lock for active/inactive page q */ - simple_lock_data_t fpageqlock; /* lock for free page q */ + struct mutex fpageqlock; /* lock for free page q */ boolean_t page_init_done; /* TRUE if uvm_page_init() finished */ boolean_t page_idle_zero; /* TRUE if we should try to zero pages in the idle loop */ diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 0149621943a..05328406d93 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.67 2007/09/10 18:49:45 miod Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.68 2007/11/29 00:26:41 tedu Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -372,6 +372,7 @@ extern struct uvmexp uvmexp; #include <sys/tree.h> #include <uvm/uvm_param.h> #include <sys/lock.h> +#include <sys/mutex.h> #include <uvm/uvm_page.h> #include <uvm/uvm_pmap.h> #include <uvm/uvm_map.h> diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 0390a1b9e46..65452708bdf 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.61 2007/06/18 21:51:15 pedro Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.62 2007/11/29 00:26:41 tedu Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -241,7 +241,7 @@ uvm_page_init(kvm_startp, kvm_endp) TAILQ_INIT(&uvm.page_inactive_swp); TAILQ_INIT(&uvm.page_inactive_obj); simple_lock_init(&uvm.pageqlock); - simple_lock_init(&uvm.fpageqlock); + mtx_init(&uvm.fpageqlock, IPL_VM); /* * init the <obj,offset> => <page> hash table. for now diff --git a/sys/uvm/uvm_page_i.h b/sys/uvm/uvm_page_i.h index b993e652220..680f2e2ee0d 100644 --- a/sys/uvm/uvm_page_i.h +++ b/sys/uvm/uvm_page_i.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page_i.h,v 1.17 2007/04/13 18:57:49 art Exp $ */ +/* $OpenBSD: uvm_page_i.h,v 1.18 2007/11/29 00:26:42 tedu Exp $ */ /* $NetBSD: uvm_page_i.h,v 1.14 2000/11/27 07:47:42 chs Exp $ */ /* @@ -91,11 +91,8 @@ PAGE_INLINE int uvm_lock_fpageq(void) { - int s; - - s = splvm(); - simple_lock(&uvm.fpageqlock); - return (s); + mtx_enter(&uvm.fpageqlock); + return (0); } /* @@ -109,8 +106,7 @@ PAGE_INLINE void uvm_unlock_fpageq(int s) { - simple_unlock(&uvm.fpageqlock); - splx(s); + mtx_leave(&uvm.fpageqlock); } /* |