From 4f9ffa42b01e1ea986e89c36fd7a76a2477c90f4 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Mon, 6 Jan 2014 16:33:16 +0000 Subject: [PATCH] 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. --- sys/arm/arm/bus_space_generic.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sys/arm/arm/bus_space_generic.c b/sys/arm/arm/bus_space_generic.c index 551d956255db..8d272c406029 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