MFi386: rev 1.451 (jhb): call pmap_kremove() rather than duplicate it
This commit is contained in:
parent
10d9b64384
commit
3f378ea44a
@ -2695,7 +2695,6 @@ pmap_unmapdev(va, size)
|
||||
vm_size_t size;
|
||||
{
|
||||
vm_offset_t base, offset, tmpva;
|
||||
pt_entry_t *pte;
|
||||
|
||||
/* If we gave a direct map region in pmap_mapdev, do nothing */
|
||||
if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS)
|
||||
@ -2703,10 +2702,8 @@ pmap_unmapdev(va, size)
|
||||
base = va & PG_FRAME;
|
||||
offset = va & PAGE_MASK;
|
||||
size = roundup(offset + size, PAGE_SIZE);
|
||||
for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) {
|
||||
pte = vtopte(tmpva);
|
||||
pte_clear(pte);
|
||||
}
|
||||
for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE)
|
||||
pmap_kremove(tmpva);
|
||||
pmap_invalidate_range(kernel_pmap, va, tmpva);
|
||||
kmem_free(kernel_map, base, size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user