Remove invalid cast to vm_offset_t to avoid truncating a physical address

when doing pmap_kextract on a 2MB page.

Spotted by:	peter
Sponsored by:	DARPA, Network Associates Laboratories
This commit is contained in:
Jake Burkholder 2003-04-08 18:22:41 +00:00
parent c794881f8c
commit ac00210525
2 changed files with 2 additions and 2 deletions

View File

@ -195,7 +195,7 @@ pmap_kextract(vm_offset_t va)
{
vm_paddr_t pa;
if ((pa = (vm_offset_t) PTD[va >> PDRSHIFT]) & PG_PS) {
if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) {
pa = (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1));
} else {
pa = *vtopte(va);

View File

@ -195,7 +195,7 @@ pmap_kextract(vm_offset_t va)
{
vm_paddr_t pa;
if ((pa = (vm_offset_t) PTD[va >> PDRSHIFT]) & PG_PS) {
if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) {
pa = (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1));
} else {
pa = *vtopte(va);