mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
- The address lies in the bus space handle, not in the cookie
- Use the right address when calling kva_free() (Is there any reason why the s3c2xx0 comes with its own version of bs_map/ bs_unmap ? It seems to be just the same as in bus_space_generic.c)
This commit is contained in:
parent
767cfe52cc
commit
e32c2d4742
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254171
@ -200,21 +200,21 @@ s3c2xx0_bs_map(void *t, bus_addr_t bpa, bus_size_t size,
|
|||||||
void
|
void
|
||||||
s3c2xx0_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size)
|
s3c2xx0_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size)
|
||||||
{
|
{
|
||||||
vm_offset_t va, endva;
|
vm_offset_t va, endva, origva;
|
||||||
|
|
||||||
if (pmap_devmap_find_va((vm_offset_t)t, size) != NULL) {
|
if (pmap_devmap_find_va((vm_offset_t)h, size) != NULL) {
|
||||||
/* Device was statically mapped; nothing to do. */
|
/* Device was statically mapped; nothing to do. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
endva = round_page((vm_offset_t)t + size);
|
endva = round_page((vm_offset_t)h + size);
|
||||||
va = trunc_page((vm_offset_t)t);
|
origva = va = trunc_page((vm_offset_t)h);
|
||||||
|
|
||||||
while (va < endva) {
|
while (va < endva) {
|
||||||
pmap_kremove(va);
|
pmap_kremove(va);
|
||||||
va += PAGE_SIZE;
|
va += PAGE_SIZE;
|
||||||
}
|
}
|
||||||
kva_free(va, endva - va);
|
kva_free(va, endva - origva);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user