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 pages for kernel map entries and PMA...
details: https://anonhg.NetBSD.org/src/rev/c33740d5225d
branches: trunk
changeset: 771486:c33740d5225d
user: matt <matt%NetBSD.org@localhost>
date: Wed Nov 23 01:00:52 2011 +0000
description:
When allocating pages for kernel map entries 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_map.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 6a0c21960519 -r c33740d5225d sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Wed Nov 23 00:56:56 2011 +0000
+++ b/sys/uvm/uvm_map.c Wed Nov 23 01:00:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.305 2011/09/27 01:02:39 jym Exp $ */
+/* $NetBSD: uvm_map.c,v 1.306 2011/11/23 01:00:52 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.305 2011/09/27 01:02:39 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.306 2011/11/23 01:00:52 matt Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -4710,8 +4710,13 @@
* for simplicity, always allocate one page chunk of them at once.
*/
+#ifdef PMAP_ALLOC_POOLPAGE
+ pg = PMAP_ALLOC_POOLPAGE(
+ (flags & UVM_KMF_NOWAIT) != 0 ? UVM_PGA_USERESERVE : 0);
+#else
pg = uvm_pagealloc(NULL, 0, NULL,
(flags & UVM_KMF_NOWAIT) != 0 ? UVM_PGA_USERESERVE : 0);
+#endif
if (__predict_false(pg == NULL)) {
if (flags & UVM_FLAG_NOWAIT)
return NULL;
Home |
Main Index |
Thread Index |
Old Index