Remove critical_enter() and critical_exit(): pmap_growkernel is called

with kernel_map->system_mtx held so these aren't needed.  Add an
assertion to make sure this is the case.

Also, fix a minor style(9) nit.

Reviewed by:	alc@
This commit is contained in:
Warner Losh 2008-10-01 05:47:17 +00:00
parent be38e61a52
commit 9e035bb343
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183510

View File

@ -452,9 +452,8 @@ void
pmap_init(void)
{
if (need_wired_tlb_page_pool) {
if (need_wired_tlb_page_pool)
pmap_init_fpage();
}
/*
* Initialize the address space (zone) for the pv entries. Set a
* high water mark so that the system can recover from excessive
@ -1203,7 +1202,7 @@ pmap_growkernel(vm_offset_t addr)
pt_entry_t *pte;
int i, req;
critical_enter();
mtx_assert(&kernel_map->system_mtx, MA_OWNED);
if (kernel_vm_end == 0) {
kernel_vm_end = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET;
nkpt = 0;
@ -1276,7 +1275,6 @@ pmap_growkernel(vm_offset_t addr)
break;
}
}
critical_exit();
}
/***************************************************