summaryrefslogtreecommitdiffstats
path: root/sys/i386/xen/pmap.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-09-10 16:11:29 +0000
committeralc <alc@FreeBSD.org>2012-09-10 16:11:29 +0000
commit2bc702613a6a034002e63ec2926667c8fd734751 (patch)
treec0c16d639b622689599d8950777bdf9494d2edef /sys/i386/xen/pmap.c
parent5b91a53c47ba544b4faad274dd102bf36d576799 (diff)
downloadFreeBSD-src-2bc702613a6a034002e63ec2926667c8fd734751.zip
FreeBSD-src-2bc702613a6a034002e63ec2926667c8fd734751.tar.gz
Simplify pmap_unmapdev(). Since kmem_free() eventually calls pmap_remove(),
pmap_unmapdev()'s own direct efforts to destroy the page table entries are redundant, so eliminate them. Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS. Setting PTE_W on MIPS is inconsistent with the implementation of this function on other architectures. Moreover, PTE_W should not be set, unless the pmap's wired mapping count is incremented, which pmap_kenter{,_attr}() doesn't do. MFC after: 10 days
Diffstat (limited to 'sys/i386/xen/pmap.c')
-rw-r--r--sys/i386/xen/pmap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c
index b0e1624..e6702cd 100644
--- a/sys/i386/xen/pmap.c
+++ b/sys/i386/xen/pmap.c
@@ -3989,18 +3989,13 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size)
void
pmap_unmapdev(vm_offset_t va, vm_size_t size)
{
- vm_offset_t base, offset, tmpva;
+ vm_offset_t base, offset;
if (va >= KERNBASE && va + size <= KERNBASE + KERNLOAD)
return;
base = trunc_page(va);
offset = va & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
- critical_enter();
- for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE)
- pmap_kremove(tmpva);
- pmap_invalidate_range(kernel_pmap, va, tmpva);
- critical_exit();
kmem_free(kernel_map, base, size);
}
OpenPOWER on IntegriCloud