Create bus_dma_tag_create_device as a method to create a device DMA tag.
This will allow the bus_dma to adjust the tag based on the device, e.g.
on arm64 the IOMMU will need to get an ID used by the hardware to
find which page tables to use.
Details
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 33078 Build 30455: arc lint + arc unit
Event Timeline
I expect to commit this in multiple commits, but need to figure out where the best places to split are.
Do you have an update to BUS_DMA(9)? Sorry if I'm missing it just because there are so many files in the review..
Adding scottl@ as I know he has interest in this area. I think he had a reworked bus_dma_tag_create already that took an argument structure that could easily be amended to include the device_t.
This change isn't bad, but I've wanted FreeBSD to get away from the 14 argument bus_dma_tag_create() and friends and move to the more compact bus_dma_template_tag(). Would it be possible to take this patch in that direction instead? Maybe add bus_dma_template_init_dev(&t, dev) to go alongside the existing bus_dma_template_init(&t, parent)