diff options
author | alc <alc@FreeBSD.org> | 2004-10-03 00:16:43 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-10-03 00:16:43 +0000 |
commit | c4db706631d6435563c38ac0b9ba4acbbfddccb6 (patch) | |
tree | 27b4e9b53e3574041a395765b40e28254a7d3fc3 /sys | |
parent | 7ac950b1172f3d9213061f3918e5cd1c96ef5c43 (diff) | |
download | FreeBSD-src-c4db706631d6435563c38ac0b9ba4acbbfddccb6.zip FreeBSD-src-c4db706631d6435563c38ac0b9ba4acbbfddccb6.tar.gz |
The physical address stored in the vm_page is page aligned. There is no
need to mask off the page offset bits. (This operation made some sense
prior to i386/i386/pmap.c revision 1.254 when we passed a physical address
rather than a vm_page pointer to pmap_enter().)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/pmap.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/pmap.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index bb6a723..9a2cbd6 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -1686,7 +1686,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, } origpte = *pte; - pa = VM_PAGE_TO_PHYS(m) & ~PAGE_MASK; + pa = VM_PAGE_TO_PHYS(m); managed = 0; opa = pmap_pte_pa(pte); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a941673..3fb6cd9 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1880,7 +1880,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if (pte == NULL) panic("pmap_enter: invalid page directory va=%#lx\n", va); - pa = VM_PAGE_TO_PHYS(m) & PG_FRAME; + pa = VM_PAGE_TO_PHYS(m); origpte = *pte; opa = origpte & PG_FRAME; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 680b8dd..e1fd67b 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1938,7 +1938,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, (uintmax_t)pmap->pm_pdir[PTDPTDI], va); } - pa = VM_PAGE_TO_PHYS(m) & PG_FRAME; + pa = VM_PAGE_TO_PHYS(m); origpte = *pte; opa = origpte & PG_FRAME; diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 1eb2578..15ade60 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -1526,7 +1526,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, origpte = *pte; opa = (pmap_lpte_present(&origpte)) ? pmap_lpte_ppn(&origpte) : 0UL; managed = FALSE; - pa = VM_PAGE_TO_PHYS(m) & ~PAGE_MASK; + pa = VM_PAGE_TO_PHYS(m); /* * Mapping has not changed, must be protection or wiring change. |