svn commit: r367365 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Thu Nov 5 09:55:55 UTC 2020
Author: andrew
Date: Thu Nov 5 09:55:55 2020
New Revision: 367365
URL: https://svnweb.freebsd.org/changeset/base/367365
Log:
Stop trying to bounce in memory allocated by bus dma
Memory allocated by bus_dmamem_alloc will take into account any alignment
requirements of the CPU it's running on. Stop trying to bounce in this case
as there is no bounce zone allocated.
Reported by: manu, tuexen
Tested by: manu
Sponsored by: Innovate UK
Modified:
head/sys/arm64/arm64/busdma_bounce.c
Modified: head/sys/arm64/arm64/busdma_bounce.c
==============================================================================
--- head/sys/arm64/arm64/busdma_bounce.c Thu Nov 5 08:58:21 2020 (r367364)
+++ head/sys/arm64/arm64/busdma_bounce.c Thu Nov 5 09:55:55 2020 (r367365)
@@ -206,6 +206,10 @@ might_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus
bus_size_t size)
{
+ /* Memory allocated by bounce_bus_dmamem_alloc won't bounce */
+ if ((map->flags & DMAMAP_FROM_DMAMEM) != 0)
+ return (false);
+
if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0)
return (true);
More information about the svn-src-all
mailing list