Don't try grow the entire kmem space but just do as needed in uvm_km_kmem_alloc
This commit is contained in:
parent
b36fbd92bc
commit
2825f5a997
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_km.c,v 1.129 2012/09/03 14:21:24 matt Exp $ */
|
||||
/* $NetBSD: uvm_km.c,v 1.130 2012/09/03 15:55:42 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
|
@ -152,7 +152,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.129 2012/09/03 14:21:24 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.130 2012/09/03 15:55:42 matt Exp $");
|
||||
|
||||
#include "opt_uvmhist.h"
|
||||
|
||||
|
@ -323,20 +323,6 @@ uvm_km_bootstrap(vaddr_t start, vaddr_t end)
|
|||
|
||||
kernel_map = &kernel_map_store;
|
||||
|
||||
#ifdef PMAP_GROWKERNEL
|
||||
/*
|
||||
* Since we just set kernel_map, the check in uvm_map_prepare to grow the
|
||||
* kernel's VA space never happened so we must do it here. If the kernel
|
||||
* pmap can't map the requested space, then allocate more resources for it.
|
||||
*/
|
||||
if (uvm_maxkaddr < kmembase + kmemsize) {
|
||||
uvm_maxkaddr = pmap_growkernel(kmembase + kmemsize);
|
||||
if (uvm_maxkaddr < kmembase + kmemsize)
|
||||
panic("%s: pmap_growkernel(%#"PRIxVADDR") failed",
|
||||
__func__, kmembase + kmemsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
pool_subsystem_init();
|
||||
vmem_bootstrap();
|
||||
|
||||
|
@ -794,6 +780,20 @@ again:
|
|||
if (rc != 0)
|
||||
return rc;
|
||||
|
||||
#ifdef PMAP_GROWKERNEL
|
||||
/*
|
||||
* Since we just set kernel_map, the check in uvm_map_prepare to grow the
|
||||
* kernel's VA space never happened so we must do it here. If the kernel
|
||||
* pmap can't map the requested space, then allocate more resources for it.
|
||||
*/
|
||||
if (uvm_maxkaddr < va + size) {
|
||||
uvm_maxkaddr = pmap_growkernel(va + size);
|
||||
if (uvm_maxkaddr < va + size)
|
||||
panic("%s: pmap_growkernel(%#"PRIxVADDR") failed",
|
||||
__func__, va + size);
|
||||
}
|
||||
#endif
|
||||
|
||||
loopva = va;
|
||||
loopsize = size;
|
||||
|
||||
|
|
Loading…
Reference in New Issue