diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2016-08-26 21:14:59 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2016-08-26 21:14:59 +0000 |
commit | a78ef9935c7271dc137baacac2db19f33af0ecde (patch) | |
tree | bc977b0d1c79a933fcfa27f08608684aa32fe58e /sys/arch | |
parent | 4101403b28fa6aa477436b50bf05446867ca8812 (diff) |
Since the caller already checks and handles COHERENT we don't need
to explicitly check for the flag.
ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm/arm/bus_dma.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c index bfdbf4c9772..d0c37dcdb0e 100644 --- a/sys/arch/arm/arm/bus_dma.c +++ b/sys/arch/arm/arm/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.32 2016/08/22 01:41:59 jsg Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.33 2016/08/26 21:14:58 patrick Exp $ */ /* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */ /*- @@ -454,8 +454,7 @@ _bus_dmamap_sync_linear(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, paddr_t pa = _bus_dma_busaddr_to_paddr(t, ds->ds_addr + offset); size_t seglen = min(len, ds->ds_len - offset); - if ((map->_dm_flags & ARM32_DMAMAP_COHERENT) == 0) - _bus_dmamap_sync_segment(va + offset, pa, seglen, ops); + _bus_dmamap_sync_segment(va + offset, pa, seglen, ops); offset += seglen; len -= seglen; @@ -507,9 +506,8 @@ _bus_dmamap_sync_mbuf(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, * this ever becomes non-true (e.g. Physically Indexed * cache), this will have to be revisited. */ + _bus_dmamap_sync_segment(va, pa, seglen, ops); - if ((map->_dm_flags & ARM32_DMAMAP_COHERENT) == 0) - _bus_dmamap_sync_segment(va, pa, seglen, ops); voff += seglen; ds_off += seglen; len -= seglen; @@ -547,8 +545,7 @@ _bus_dmamap_sync_uio(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, vaddr_t va = (vaddr_t) iov->iov_base + voff; paddr_t pa = _bus_dma_busaddr_to_paddr(t, ds->ds_addr + ds_off); - if ((map->_dm_flags & ARM32_DMAMAP_COHERENT) == 0) - _bus_dmamap_sync_segment(va, pa, seglen, ops); + _bus_dmamap_sync_segment(va, pa, seglen, ops); voff += seglen; ds_off += seglen; |