bus_dma(9): Is it allowed to load an already-loaded map?

Pratyush Yadav pratyush at freebsd.org
Fri Aug 17 08:44:52 UTC 2018


Hi,

I am writing an implementation of the bus_dma(9) interface for use
with the Xen drivers, and I have a question:

Is it allowed to load a dma map with an active mapping?

The bus_dma(9) man page says:
map     A DMA map without a currently active mapping

But, looking at the busdma_bounce (sys/x86/x86/busdma_bounce.c) code,
it has no checks against this. On the contrary, it seems to support
loading already-loaded maps. Maybe the interface allowed it earlier
but removed support later. Or maybe it did not allow this earlier, and
now it does, but the man page is just not updated.

Can someone familiar with the details of the busdma system confirm?

--
Regards,
Pratyush Yadav


More information about the freebsd-hackers mailing list