Date: Fri, 20 Mar 2015 01:35:26 -0400 (EDT) From: John Wehle <john@feith.com> To: freebsd-arm@freebsd.org Subject: current meaning of BUS_DMA_COHERENT Message-ID: <201503200535.t2K5ZQdo011380@jwlab.FEITH.COM>
next in thread | raw e-mail | index | archive | help
The bus_dmamap_create manual page says: Attempt to map the memory loaded with this map such that cache sync operations are as cheap as possible. ... Use of this flag does not remove the requirement of using bus_dmamap_sync() However busdma_machdep-v6.c for ARM has the comment: * Create a cache of buffers in uncacheable memory, to implement the * BUS_DMA_COHERENT (and potentially BUS_DMA_NOCACHE) flag. Is the manual page out of date? Does FreeBSD now guarentee that memory allocated by bus_dmamem_alloc using BUS_DMA_COHERENT doesn't require bus_dmamap_sync operations? Part of my concern is that there appears to be existing FreeBSD device driver code that assumes BUS_DMA_COHERENT means uncacheable memory (i.e. bus_dmamap_sync is unnecessary) which I thought was indicated by BUS_DMA_NOCACHE, not BUS_DMA_COHERENT. -- John
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503200535.t2K5ZQdo011380>