summaryrefslogtreecommitdiffstats
path: root/sys/dev/dcons
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2008-11-19 22:09:03 +0000
committermarius <marius@FreeBSD.org>2008-11-19 22:09:03 +0000
commitfd213ef8e29e5b912cedf5f66e5eb00c96893c00 (patch)
treee1e56b97926247afd1f8a10df81e58253fcabd65 /sys/dev/dcons
parent26ef99f3eb54f1828a50aceb37318f39cf3480ec (diff)
downloadFreeBSD-src-fd213ef8e29e5b912cedf5f66e5eb00c96893c00.zip
FreeBSD-src-fd213ef8e29e5b912cedf5f66e5eb00c96893c00.tar.gz
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
Diffstat (limited to 'sys/dev/dcons')
-rw-r--r--sys/dev/dcons/dcons_crom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c
index 290bb1e..0b2b707 100644
--- a/sys/dev/dcons/dcons_crom.c
+++ b/sys/dev/dcons/dcons_crom.c
@@ -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);
OpenPOWER on IntegriCloud