svn commit: r254165 - head/sys/arm/arm
Olivier Houchard
cognet at FreeBSD.org
Fri Aug 9 21:56:29 UTC 2013
Author: cognet
Date: Fri Aug 9 21:56:28 2013
New Revision: 254165
URL: http://svnweb.freebsd.org/changeset/base/254165
Log:
- The address lies in the bus space handle, not in the cookie
- Use the right address when calling kva_free()
Modified:
head/sys/arm/arm/bus_space_generic.c
Modified: head/sys/arm/arm/bus_space_generic.c
==============================================================================
--- head/sys/arm/arm/bus_space_generic.c Fri Aug 9 21:53:02 2013 (r254164)
+++ head/sys/arm/arm/bus_space_generic.c Fri Aug 9 21:56:28 2013 (r254165)
@@ -104,21 +104,21 @@ generic_bs_alloc(void *t, bus_addr_t rst
void
generic_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. */
return;
}
- endva = round_page((vm_offset_t)t + size);
- va = trunc_page((vm_offset_t)t);
+ endva = round_page((vm_offset_t)h + size);
+ origva = va = trunc_page((vm_offset_t)h);
while (va < endva) {
pmap_kremove(va);
va += PAGE_SIZE;
}
- kva_free(va, endva - va);
+ kva_free(origva, endva - origva);
}
void
More information about the svn-src-all
mailing list