Module Name:    src
Committed By:   matt
Date:           Wed Nov 23 01:07:50 UTC 2011

Modified Files:
        src/sys/uvm: uvm_glue.c

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/uvm/uvm_glue.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_glue.c
diff -u src/sys/uvm/uvm_glue.c:1.151 src/sys/uvm/uvm_glue.c:1.152
--- src/sys/uvm/uvm_glue.c:1.151	Sat Jul  2 01:26:29 2011
+++ src/sys/uvm/uvm_glue.c	Wed Nov 23 01:07:50 2011
@@ -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 @@ uarea_poolpage_alloc(struct pool *pp, in
 		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));

Reply via email to