svn commit: r260373 - head/sys/arm/arm
Ian Lepore
ian at FreeBSD.org
Mon Jan 6 16:33:17 UTC 2014
Author: ian
Date: Mon Jan 6 16:33:16 2014
New Revision: 260373
URL: http://svnweb.freebsd.org/changeset/base/260373
Log:
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.
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 Mon Jan 6 16:07:27 2014 (r260372)
+++ head/sys/arm/arm/bus_space_generic.c Mon Jan 6 16:33:16 2014 (r260373)
@@ -62,16 +62,12 @@ generic_bs_map(void *t, bus_addr_t bpa,
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
More information about the svn-src-head
mailing list