From 3f378ea44aaa37fd54731539ca7c2248c03352b9 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 30 Oct 2003 04:08:22 +0000 Subject: [PATCH] MFi386: rev 1.451 (jhb): call pmap_kremove() rather than duplicate it --- sys/amd64/amd64/pmap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 0a7797dc7d07..f9a73f35059a 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -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); }