mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
pmap_alloc_vhpt() doesn't need the pages that it allocates to be mapped
into the kernel map, so vm_page_alloc_contig() can be used in place of contigmalloc(). Reviewed by: marcel
This commit is contained in:
parent
b33fdab5e0
commit
2865094134
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236375
@ -289,21 +289,23 @@ pmap_initialize_vhpt(vm_offset_t vhpt)
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
MALLOC_DECLARE(M_SMP);
|
||||
|
||||
vm_offset_t
|
||||
pmap_alloc_vhpt(void)
|
||||
{
|
||||
vm_offset_t vhpt;
|
||||
vm_page_t m;
|
||||
vm_size_t size;
|
||||
|
||||
size = 1UL << pmap_vhpt_log2size;
|
||||
vhpt = (uintptr_t)contigmalloc(size, M_SMP, 0, 0UL, ~0UL, size, 0UL);
|
||||
if (vhpt != 0) {
|
||||
vhpt = IA64_PHYS_TO_RR7(ia64_tpa(vhpt));
|
||||
m = vm_page_alloc_contig(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ |
|
||||
VM_ALLOC_WIRED, atop(size), 0UL, ~0UL, size, 0UL,
|
||||
VM_MEMATTR_DEFAULT);
|
||||
if (m != NULL) {
|
||||
vhpt = IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(m));
|
||||
pmap_initialize_vhpt(vhpt);
|
||||
return (vhpt);
|
||||
}
|
||||
return (vhpt);
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user