Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175361280
D60407.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
837 B
Referenced Files
None
Subscribers
None
D60407.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D60407: arm64: Relax memory barriers around DMA operations
Attached
Detach File
Event Timeline
Log In to Comment