svn commit: r187240 - in stable/7/sys: . contrib/pf dev/cxgb dev/dcons

Marius Strobl marius at FreeBSD.org
Wed Jan 14 13:04:24 PST 2009


Author: marius
Date: Wed Jan 14 21:04:23 2009
New Revision: 187240
URL: http://svn.freebsd.org/changeset/base/187240

Log:
  MFC: r185108
  
  Given that the buffer dcons_crom(4) exposes is used for both input
  and output, set BUS_DMA_COHERENT when creating the DMA map used for
  loading the buffer. As a side-effect this solves locking issues on
  sparc64 when dcons(4) calls bus_dmamap_sync(9) while in an interrupt
  filter, which are executed in a critical section, and iommu(4) has
  to use a sleep lock when taking advantage of the streaming buffer.
  
  Reported and tested by:	kensmith
  Approved by:		simokawa

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/dcons/dcons_crom.c

Modified: stable/7/sys/dev/dcons/dcons_crom.c
==============================================================================
--- stable/7/sys/dev/dcons/dcons_crom.c	Wed Jan 14 20:53:46 2009	(r187239)
+++ stable/7/sys/dev/dcons/dcons_crom.c	Wed Jan 14 21:04:23 2009	(r187240)
@@ -229,7 +229,7 @@ dcons_crom_attach(device_t dev)
 		/*lockarg*/&Giant,
 #endif
 		&sc->dma_tag);
-	bus_dmamap_create(sc->dma_tag, 0, &sc->dma_map);
+	bus_dmamap_create(sc->dma_tag, BUS_DMA_COHERENT, &sc->dma_map);
 	bus_dmamap_load(sc->dma_tag, sc->dma_map,
 	    (void *)dcons_conf->buf, dcons_conf->size,
 	    dmamap_cb, sc, 0);


More information about the svn-src-stable mailing list