Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm When allocating a page for a kernel stack and PMAP_A...
details: https://anonhg.NetBSD.org/src/rev/688d1123f117
branches: trunk
changeset: 771487:688d1123f117
user: matt <matt%NetBSD.org@localhost>
date: Wed Nov 23 01:07:50 2011 +0000
description:
When allocating a page for a kernel stack and PMAP_ALLOC_POOLPAGE is
defined, use it. (allows a MIPS N32 kernel to boot when there is memory
outside of KSEG0).
diffstat:
sys/uvm/uvm_glue.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r c33740d5225d -r 688d1123f117 sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Wed Nov 23 01:00:52 2011 +0000
+++ b/sys/uvm/uvm_glue.c Wed Nov 23 01:07:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.151 2011/07/02 01:26:29 matt Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.152 2011/11/23 01:07:50 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.151 2011/07/02 01:26:29 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.152 2011/11/23 01:07:50 matt Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -245,8 +245,13 @@
struct vm_page *pg;
vaddr_t va;
+#if defined(PMAP_ALLOC_POOLPAGE)
+ pg = PMAP_ALLOC_POOLPAGE(
+ ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
+#else
pg = uvm_pagealloc(NULL, 0, NULL,
((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
+#endif
if (pg == NULL)
return NULL;
va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg));
Home |
Main Index |
Thread Index |
Old Index