diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h index d347fc84a260..1a8803ad4b4d 100644 --- a/sys/sparc64/include/pmap.h +++ b/sys/sparc64/include/pmap.h @@ -76,6 +76,7 @@ void pmap_bootstrap(vm_offset_t ekva); void pmap_context_rollover(void); vm_offset_t pmap_kextract(vm_offset_t va); void pmap_kenter_flags(vm_offset_t va, vm_offset_t pa, u_long flags); +void pmap_kremove_flags(vm_offset_t va); void pmap_qenter_flags(vm_offset_t va, vm_page_t *m, int count, u_long fl); int pmap_cache_enter(vm_page_t m, vm_offset_t va); diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c index ab53c8a09acd..897e04d36b6d 100644 --- a/sys/sparc64/sparc64/bus_machdep.c +++ b/sys/sparc64/sparc64/bus_machdep.c @@ -580,7 +580,7 @@ sparc64_bus_mem_unmap(void *bh, bus_size_t size) sva = trunc_page((vm_offset_t)bh); endva = sva + round_page(size); for (va = sva; va < endva; va += PAGE_SIZE) - pmap_kremove(va); + pmap_kremove_flags(va); tlb_range_demap(kernel_pmap, sva, sva + size - 1); kmem_free(kernel_map, sva, size); return (0); diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 97f085e09037..6df4225d1e82 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -717,6 +717,20 @@ pmap_kremove(vm_offset_t va) TTE_ZERO(tp); } +/* + * Inverse of pmap_kenter_flags, used by bus_space_unmap(). + */ +void +pmap_kremove_flags(vm_offset_t va) +{ + struct tte *tp; + + tp = tsb_kvtotte(va); + CTR3(KTR_PMAP, "pmap_kremove: va=%#lx tp=%p data=%#lx", va, tp, + tp->tte_data); + TTE_ZERO(tp); +} + /* * Map a range of physical addresses into kernel virtual address space. *