diff options
author | alc <alc@FreeBSD.org> | 2007-04-13 16:07:29 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2007-04-13 16:07:29 +0000 |
commit | 02ed5ecf42528b32dd76961407e2b484990f4797 (patch) | |
tree | 7af5317232cfeeb0b11da375b1b2cc86279fd592 /sys/i386 | |
parent | 9d7fe0d4726b159513c36ced3e0975533ec4845a (diff) | |
download | FreeBSD-src-02ed5ecf42528b32dd76961407e2b484990f4797.zip FreeBSD-src-02ed5ecf42528b32dd76961407e2b484990f4797.tar.gz |
Eliminate the misuse of PG_FRAME to truncate a virtual address to a virtual
page boundary.
Reviewed by: ru@
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/pmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 3f0c603..e3201af 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2284,7 +2284,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, om; boolean_t invlva; - va &= PG_FRAME; + va = trunc_page(va); #ifdef PMAP_DIAGNOSTIC if (va > VM_MAX_KERNEL_ADDRESS) panic("pmap_enter: toobig"); @@ -3346,7 +3346,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) if (va >= KERNBASE && va + size <= KERNBASE + KERNLOAD) return; - base = va & PG_FRAME; + base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) @@ -3366,7 +3366,7 @@ pmap_change_attr(va, size, mode) u_int opte, npte; pd_entry_t *pde; - base = va & PG_FRAME; + base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); |