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:
parent
c794881f8c
commit
ac00210525
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user