Initialize pools in pmap_init(); the low-water mark must be set when

it is safe to allocate pages via the normal mechanism.
This commit is contained in:
thorpej 2002-12-16 07:18:30 +00:00
parent 807b74c49c
commit 6ff0a8ba21

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.40 2002/05/09 12:28:08 uch Exp $ */
/* $NetBSD: pmap.c,v 1.41 2002/12/16 07:18:30 thorpej Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -118,13 +118,6 @@ pmap_bootstrap()
avail_end = ptoa(vm_physmem[vm_nphysseg - 1].end);
__pmap_kve = VM_MIN_KERNEL_ADDRESS;
/* Initialize pmap module */
pool_init(&__pmap_pmap_pool, sizeof(struct pmap), 0, 0, 0, "pmappl",
&pool_allocator_nointr);
pool_init(&__pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, "pvpl",
&pmap_pv_page_allocator);
pool_setlowat(&__pmap_pv_pool, 16);
pmap_kernel()->pm_refcnt = 1;
pmap_kernel()->pm_ptp = (pt_entry_t **)uvm_pageboot_alloc(PAGE_SIZE);
memset(pmap_kernel()->pm_ptp, 0, PAGE_SIZE);
@ -226,7 +219,12 @@ void
pmap_init()
{
/* Nothing to do */
/* Initialize pmap module */
pool_init(&__pmap_pmap_pool, sizeof(struct pmap), 0, 0, 0, "pmappl",
&pool_allocator_nointr);
pool_init(&__pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, "pvpl",
&pmap_pv_page_allocator);
pool_setlowat(&__pmap_pv_pool, 16);
}
pmap_t