summaryrefslogtreecommitdiff
path: root/sys/arch/arm64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-08-11 22:01:10 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-08-11 22:01:10 +0000
commit8a0d3db2d2a432f3970edbcb0cc1915feb24c52a (patch)
treeee97bab8e8ddba2dd8a5840c6d7c76e3174ef6d3 /sys/arch/arm64
parent98a66bca2b9c8052e2abad448ae75d80b70665d5 (diff)
Have bus_dmamem_map() store the virtual address of the mapping such that
we can use it to flush the cache in bus_dmamap_sync() if necessary. ok patrick@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r--sys/arch/arm64/arm64/bus_dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/arm64/arm64/bus_dma.c b/sys/arch/arm64/arm64/bus_dma.c
index fdb065a9fa9..74876fe04e6 100644
--- a/sys/arch/arm64/arm64/bus_dma.c
+++ b/sys/arch/arm64/arm64/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.8 2017/05/10 21:58:55 kettenis Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.9 2017/08/11 22:01:09 kettenis Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -506,6 +506,7 @@ _dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, size_t size,
(flags & BUS_DMA_COHERENT)) || (flags & BUS_DMA_NOCACHE))
cache = PMAP_CACHE_CI;
for (curseg = 0; curseg < nsegs; curseg++) {
+ segs[curseg]._ds_vaddr = va;
for (addr = segs[curseg].ds_addr;
addr < (segs[curseg].ds_addr + segs[curseg].ds_len);
addr += NBPG, va += NBPG, size -= NBPG) {