Page MenuHomeFreeBSD

D60407.diff
No OneTemporary

D60407.diff

diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c
--- a/sys/arm64/arm64/busdma_bounce.c
+++ b/sys/arm64/arm64/busdma_bounce.c
@@ -1101,7 +1101,7 @@
/*
* Wait for any DMA operations to complete before the bcopy.
*/
- dsb(sy);
+ dmb(oshld);
}
if (map == NULL)
goto out;
@@ -1176,11 +1176,17 @@
}
out:
- if ((op & (BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE)) != 0) {
+ /*
+ * If the device is cache-coherent then the cache operation will
+ * have performed a dsb instruction so we don't need another
+ * barrier here.
+ */
+ if ((map == NULL || (map->flags & DMAMAP_COHERENT) != 0) &&
+ (op & (BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE)) != 0) {
/*
* Wait for the bcopy to complete before any DMA operations.
*/
- dsb(sy);
+ dmb(oshst);
}
if (map != NULL)

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 11, 7:11 AM (8 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40352069
Default Alt Text
D60407.diff (837 B)

Event Timeline