Re: memory barriers in bus_dmamap_sync() ?

看板FB_current作者時間14年前 (2012/01/11 06:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/13 (看更多)
On 10 January 2012 13:37, Luigi Rizzo <rizzo@iet.unipi.it> wrote: > I was glancing through manpages and implementations of bus_dma(9) > and i am a bit unclear on what this API (in particular, bus_dmamap_sync() ) > does in terms of memory barriers. > > I see that the x86/amd64 and ia64 code only does the bounce buffers. > The mips seems to do some coherency-related calls. > > How do we guarantee, say, that a recently built packet is > to memory before issuing the tx command to the NIC ? The drivers should be good examples of doing the right thing. You just do pre-map and post-map calls as appropriate. Some devices don't bother with this on register accesses and this is a bug. (eg, ath/ath_hal.) Others (eg iwn) do explicit flushes where needed. Adrian _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1F3BKU6n (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1F3BKU6n (FB_current)