Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 2020 09:55:55 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r367365 - head/sys/arm64/arm64
Message-ID:  <202011050955.0A59ttve044779@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011050955.0A59ttve044779>