Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode Only activate pages that are in a...
details: https://anonhg.NetBSD.org/src/rev/686fbb71be5f
branches: trunk
changeset: 769594:686fbb71be5f
user: reinoud <reinoud%NetBSD.org@localhost>
date: Thu Sep 15 14:45:22 2011 +0000
description:
Only activate pages that are in active pmaps
diffstat:
sys/arch/usermode/usermode/pmap.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r 4331939565ae -r 686fbb71be5f sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Thu Sep 15 12:50:00 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Thu Sep 15 14:45:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.63 2011/09/15 12:25:25 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.64 2011/09/15 14:45:22 reinoud Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <reinoud%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.63 2011/09/15 12:25:25 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.64 2011/09/15 14:45:22 reinoud Exp $");
#include "opt_memsize.h"
#include "opt_kmempages.h"
@@ -465,7 +465,7 @@
}
/* If this mapping exists already, use that. */
for (pv = pv; pv != NULL; pv = pv->pv_next) {
- if (pv->pv_pmap == pmap && pv->pv_lpn == lpn) {
+ if ((pv->pv_pmap == pmap) && (pv->pv_lpn == lpn)) {
return pv;
}
}
@@ -676,7 +676,11 @@
ppn, pv->pv_pmap);
if (pv->pv_pmap != NULL) {
pv_update(pv);
- pmap_page_activate(pv);
+ if (pv->pv_pmap->pm_flags & PM_ACTIVE)
+ pmap_page_activate(pv);
+ else
+ pmap_page_deactivate(pv)
+ ;
}
}
}
Home |
Main Index |
Thread Index |
Old Index