diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 40d97b817d42..801a9a84cfed 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1846,8 +1846,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) va = i386_ptob(sindex); anyvalid++; - if (pmap_remove_pte(pmap, - ptbase + sindex, va)) + if (pmap_remove_pte(pmap, ptbase + sindex, va)) break; } } @@ -3235,7 +3234,6 @@ pmap_mapdev(pa, size) vm_size_t size; { vm_offset_t va, tmpva, offset; - pt_entry_t *pte; offset = pa & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); @@ -3248,8 +3246,7 @@ pmap_mapdev(pa, size) pa = pa & PG_FRAME; for (tmpva = va; size > 0; ) { - pte = vtopte(tmpva); - *pte = pa | PG_RW | PG_V | pgeflag; + pmap_kenter(tmpva, pa); size -= PAGE_SIZE; tmpva += PAGE_SIZE; pa += PAGE_SIZE; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 40d97b817d42..801a9a84cfed 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1846,8 +1846,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) va = i386_ptob(sindex); anyvalid++; - if (pmap_remove_pte(pmap, - ptbase + sindex, va)) + if (pmap_remove_pte(pmap, ptbase + sindex, va)) break; } } @@ -3235,7 +3234,6 @@ pmap_mapdev(pa, size) vm_size_t size; { vm_offset_t va, tmpva, offset; - pt_entry_t *pte; offset = pa & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); @@ -3248,8 +3246,7 @@ pmap_mapdev(pa, size) pa = pa & PG_FRAME; for (tmpva = va; size > 0; ) { - pte = vtopte(tmpva); - *pte = pa | PG_RW | PG_V | pgeflag; + pmap_kenter(tmpva, pa); size -= PAGE_SIZE; tmpva += PAGE_SIZE; pa += PAGE_SIZE;