summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-01-06 16:33:16 +0000
committerian <ian@FreeBSD.org>2014-01-06 16:33:16 +0000
commit5ffa5b0b13788d35f1e6b272fcea31c3a0b577c7 (patch)
tree575880535d3e9ca87d134bead54322323196fcea
parent51e107617a53e1828528a5be8e0f4159b8a526c1 (diff)
downloadFreeBSD-src-5ffa5b0b13788d35f1e6b272fcea31c3a0b577c7.zip
FreeBSD-src-5ffa5b0b13788d35f1e6b272fcea31c3a0b577c7.tar.gz
Don't try to find a static mapping before calling pmap_mapdev(), that logic
is now part of pmap_mapdev() and doesn't need to be duplicated here. Likewise for unmapping.
-rw-r--r--sys/arm/arm/bus_space_generic.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/arm/arm/bus_space_generic.c b/sys/arm/arm/bus_space_generic.c
index 551d956..8d272c4 100644
--- a/sys/arm/arm/bus_space_generic.c
+++ b/sys/arm/arm/bus_space_generic.c
@@ -62,16 +62,12 @@ generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
void *va;
/*
- * Look up the address in the static device mappings. If it's not
- * there, establish a new dynamic mapping.
- *
* We don't even examine the passed-in flags. For ARM, the CACHEABLE
* flag doesn't make sense (we create PTE_DEVICE mappings), and the
* LINEAR flag is just implied because we use kva_alloc(size).
*/
- if ((va = arm_devmap_ptov(bpa, size)) == NULL)
- if ((va = pmap_mapdev(bpa, size)) == NULL)
- return (ENOMEM);
+ if ((va = pmap_mapdev(bpa, size)) == NULL)
+ return (ENOMEM);
*bshp = (bus_space_handle_t)va;
return (0);
}
@@ -90,12 +86,7 @@ void
generic_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size)
{
- /*
- * If the region is static-mapped do nothing, otherwise remove the
- * dynamic mapping.
- */
- if (arm_devmap_vtop((void*)h, size) == DEVMAP_PADDR_NOTFOUND)
- pmap_unmapdev((vm_offset_t)h, size);
+ pmap_unmapdev((vm_offset_t)h, size);
}
void
OpenPOWER on IntegriCloud