Re: RFC bus_dma_tag_parent

看板DFBSD_kernel作者時間21年前 (2004/11/13 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/12 (看更多)
ok, I'm confused ... On Fri, Nov 12, 2004 at 07:40:42PM +0100, Joerg Sonnenberger wrote: > On Fri, Nov 12, 2004 at 09:44:39AM -0800, Chuck Tuffli wrote: > > parent_dmat = bus_dma_tag_parent(dev); > > parent_dmat = bus_dma_tag_parent(dev, lowaddr, highaddr, maxsegments); is the intent of the {low,high}addr and maxsegments parameters to define the properties of the parent tag? the object oriented nature of bus_dma would have made me think the bus (PCI, ISA, USB, etc), being the "base class", would define the {low,high}addr and maxsegments values and not burden each driver with knowing the specifics of the bus hierarchy. > > bus_dma_tag_create(parent_dmat, ..., &mybuffer_dmat); > > > > What kind of situations would specifying the max number of segments be > > useful? > > This is useful if the bus DMA engine supports scatter/gather itself. > This can be done IIRC on the Alpha, maybe on other architectures too. > I don't mind if we have a UNKNOWN value, e.g. 0. This is not a problem > here, but for many drivers we know this in advantage and it might be > used to allocate the segment maps in the parent tag. > > Joerg so what you are saying is on these architectures there can be multiple parent tags differentiated by the address range and number of segments? even in this case, wouldn't there be an advantage to lazy allocation of segment maps? in this case, the maps aren't committed until the driver makes the subsequent calls to bus_dma_tag_create(parent_dmat, ...) don't take any of the above as an objection to adding the parameters - it's more my way of making sure i understand what to code. -- Chuck Tuffli Agilent Technologies
文章代碼(AID): #11bKx000 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11bKx000 (DFBSD_kernel)