API change for bus_dma

Andrew Gallatin gallatin at cs.duke.edu
Tue Jul 1 05:22:17 PDT 2003


Bernd Walter writes:
 > On Mon, Jun 30, 2003 at 10:03:46AM -0400, Andrew Gallatin wrote:
 > > The idea is that I want to establish a mapping that can be used many
 > > times without any driver or kernel attention.  I don't want to do
 > > anything in terms of a system call, or interrupt, etc, to sync the
 > > cache with the state of the DMA'ed page before a DMA read or after a DMA
 > > write.
 > > 
 > > For example, scatter gather mapping on alphas (if FreeBSD supported it
 > > for PCI devices) would be fine with me since its cache-coherent and
 > > doesn't require any ddi_dma_sync() operations.
 > 
 > What makes you shure about alpha dma to be cache-coherent?

7 years of sometimes painful experience with Myrinet on alpha ;)

 > I'm not shure that the current implementation of _bus_dmamap_sync()
 > without barriers is correct.

Barriers, if present, would be used to flush write buffers in the CPU
so they're seen by the cache, not to flush the cache itself.  I agree they
should be present.

Drew




More information about the freebsd-arch mailing list