Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Deal with case when kmembase == kmemstart.
details: https://anonhg.NetBSD.org/src/rev/ffa4854bb669
branches: trunk
changeset: 773328:ffa4854bb669
user: matt <matt%NetBSD.org@localhost>
date: Tue Jan 31 00:30:52 2012 +0000
description:
Deal with case when kmembase == kmemstart.
Use KASSERTMSG for a few KASSERTs
Make sure to match the color of the VA when we are allocating a physical page.
diffstat:
sys/uvm/uvm_km.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r d23b851a0ac8 -r ffa4854bb669 sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c Mon Jan 30 23:34:58 2012 +0000
+++ b/sys/uvm/uvm_km.c Tue Jan 31 00:30:52 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_km.c,v 1.113 2012/01/29 12:37:01 para Exp $ */
+/* $NetBSD: uvm_km.c,v 1.114 2012/01/31 00:30:52 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -120,7 +120,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.113 2012/01/29 12:37:01 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.114 2012/01/31 00:30:52 matt Exp $");
#include "opt_uvmhist.h"
@@ -222,6 +222,8 @@
if (error)
panic(
"uvm_km_bootstrap: could not reserve kernel kmem");
+ } else {
+ kmembase = base;
}
/*
@@ -528,7 +530,8 @@
if (flags & UVM_KMF_EXEC)
prot |= VM_PROT_EXECUTE;
while (loopsize) {
- KASSERT(!pmap_extract(pmap_kernel(), loopva, NULL));
+ KASSERTMSG(!pmap_extract(pmap_kernel(), loopva, NULL),
+ "loopva=%#"PRIxVADDR, loopva);
pg = uvm_pagealloc_strat(NULL, offset, NULL, pgaflags,
#ifdef UVM_KM_VMFREELIST
@@ -662,10 +665,13 @@
loopsize = size;
while (loopsize) {
- KASSERT(!pmap_extract(pmap_kernel(), loopva, NULL));
+ KASSERTMSG(!pmap_extract(pmap_kernel(), loopva, NULL),
+ "loopva=%#"PRIxVADDR" loopsize=%#"PRIxVSIZE" vmem=%p",
+ loopva, loopsize, vm);
- pg = uvm_pagealloc(NULL, 0, NULL,
- (flags & VM_SLEEP) ? 0 : UVM_PGA_USERESERVE);
+ pg = uvm_pagealloc(NULL, loopva, NULL,
+ UVM_KMF_COLORMATCH
+ | ((flags & VM_SLEEP) ? 0 : UVM_PGA_USERESERVE));
if (__predict_false(pg == NULL)) {
if (flags & VM_SLEEP) {
uvm_wait("plpg");
Home |
Main Index |
Thread Index |
Old Index