Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2009 21:08:43 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
Subject:   svn commit: r187242 - in stable/6/sys: . dev/dcons
Message-ID:  <200901142108.n0EL8hZj054012@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Wed Jan 14 21:08:43 2009
New Revision: 187242
URL: http://svn.freebsd.org/changeset/base/187242

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/6/sys/   (props changed)
  stable/6/sys/dev/dcons/dcons_crom.c

Modified: stable/6/sys/dev/dcons/dcons_crom.c
==============================================================================
--- stable/6/sys/dev/dcons/dcons_crom.c	Wed Jan 14 21:08:19 2009	(r187241)
+++ stable/6/sys/dev/dcons/dcons_crom.c	Wed Jan 14 21:08:43 2009	(r187242)
@@ -196,7 +196,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);



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