Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 take the pmap_lock in pmap_protect().
details: https://anonhg.NetBSD.org/src/rev/054e3bb820db
branches: trunk
changeset: 778198:054e3bb820db
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Mar 18 23:48:00 2012 +0000
description:
take the pmap_lock in pmap_protect().
hopefully this will avoid a problem in pmap_clear_reference()
detecting a reference remaining at the end.
when we remove most/all pmap_lock uses we probably need to remove
this check entirely, but for now this seems better.
diffstat:
sys/arch/sparc64/sparc64/pmap.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r b28257b1d102 -r 054e3bb820db sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c Sun Mar 18 21:49:08 2012 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c Sun Mar 18 23:48:00 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.276 2012/02/06 10:40:26 martin Exp $ */
+/* $NetBSD: pmap.c,v 1.277 2012/03/18 23:48:00 mrg Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.276 2012/02/06 10:40:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.277 2012/03/18 23:48:00 mrg Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@@ -2123,6 +2123,7 @@
}
sva = trunc_page(sva);
+ mutex_enter(&pmap_lock);
for (; sva < eva; sva += PAGE_SIZE) {
#ifdef DEBUG
/*
@@ -2130,6 +2131,7 @@
*/
if (pm == pmap_kernel() && sva >= ktext &&
sva < roundup(ekdata, 4 * MEG)) {
+ mutex_exit(&pmap_lock);
prom_printf("pmap_protect: va=%08x in locked TLB\n",
sva);
prom_abort();
@@ -2181,6 +2183,7 @@
tlb_flush_pte(sva, pm);
}
pv_check();
+ mutex_exit(&pmap_lock);
}
/*
Home |
Main Index |
Thread Index |
Old Index