pmap_kremove can no longer be used to remove the magic device mappings
installed with pmap_kenter_flags, since the physical addresses may not have an associated vm_page. Add a function to do this. Tested by: Tomi Vainio <Tomi.Vainio@Sun.COM>
This commit is contained in:
parent
7afbc0985e
commit
218fd301cd
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user