Date: Mon, 6 Jan 2014 16:33:16 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260373 - head/sys/arm/arm Message-ID: <201401061633.s06GXGFf036626@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401061633.s06GXGFf036626>