busdma: Add PRIVBZONE and ALLOCALL bus_dma_tag_create() flags.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 27 Dec 2010 07:44:23 +0000 (15:44 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 8 Jan 2011 15:14:50 +0000 (23:14 +0800)
commit7dbe273f94637e135182a3153c43b9d96a2a67ee
tree0a921a793547df19b4d3577de49d486d0246b993
parent9d0b624075d46ed6169fca67f99eb0918f5b92a1
busdma: Add PRIVBZONE and ALLOCALL bus_dma_tag_create() flags.

PRIVBZONE
  Use a private bounce zone instead of a shared one.  A private bounce
  zone will vanish if the dma_tag is destroyed.

ALLOCALL
  Allocate all required resources (mainly bounce buffer), if any
  allocation failes, bus_dmamap_create() will fail.

Using PRIVBZONE alone could possiblely reduce the contention between
driver instances.

Using PRIVBZONE and ALLOCALL could promise that the "defered dmamap
load callback" will not happen.  This could be used to ease some driver
work and reduce the work load to fix the existing drivers which may
(incorrectly) rely on or may not expect the "defered dmamap load
callback" semantic of bus_dmamap_load().
sys/platform/pc32/i386/busdma_machdep.c
sys/platform/pc64/x86_64/busdma_machdep.c
sys/sys/bus_dma.h