diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-08-12 10:35:32 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-08-12 10:35:32 +0000 |
commit | 734de6403924cbb479826bf1b4f1bd97572ac1f3 (patch) | |
tree | fee91acd1849a2fee4abafacf6e2bc8f9fd08368 | |
parent | 58bc3221a411320c74d814c989aa24f9a640f1aa (diff) | |
download | FreeBSD-src-734de6403924cbb479826bf1b4f1bd97572ac1f3.zip FreeBSD-src-734de6403924cbb479826bf1b4f1bd97572ac1f3.tar.gz |
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
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 8caf415..6aa0475 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -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); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 8caf415..6aa0475 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -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); |