Use roundup2() to avoid a problem where pmap_growkernel was unable

to extend the kernel VM to the maximum possible address of 4G-4M.

PR:		i386/22441
Submitted by:	Bill Carpenter <carp@world.std.com>
Reviewed by:	alc
This commit is contained in:
Ian Dowse 2002-08-12 10:35:32 +00:00
parent e179b40f14
commit d8a0d0795b
2 changed files with 2 additions and 2 deletions

View File

@ -1501,7 +1501,7 @@ pmap_growkernel(vm_offset_t addr)
nkpt++;
}
}
addr = (addr + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
addr = roundup2(addr, PAGE_SIZE * NPTEPG);
while (kernel_vm_end < addr) {
if (pdir_pde(PTD, kernel_vm_end)) {
kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);

View File

@ -1501,7 +1501,7 @@ pmap_growkernel(vm_offset_t addr)
nkpt++;
}
}
addr = (addr + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
addr = roundup2(addr, PAGE_SIZE * NPTEPG);
while (kernel_vm_end < addr) {
if (pdir_pde(PTD, kernel_vm_end)) {
kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);