Page MenuHomeFreeBSD

ofw_pcibus: Honor device proximity for DMA tags
ClosedPublic

Authored by kbowling on Fri, Aug 21, 3:58 AM.
Tags
None
Referenced Files
F168290881: D59065.diff
Thu, Aug 27, 10:59 AM
F168265833: D59065.id184712.diff
Thu, Aug 27, 6:51 AM
F168226241: D59065.id184712.diff
Thu, Aug 27, 1:10 AM
F168225704: D59065.id184628.diff
Thu, Aug 27, 1:05 AM
F168225655: D59065.id184628.diff
Thu, Aug 27, 1:04 AM
F168225081: D59065.diff
Thu, Aug 27, 12:57 AM
F168136662: D59065.id184628.diff
Wed, Aug 26, 1:20 PM
Unknown Object (File)
Wed, Aug 26, 3:05 AM
Subscribers

Details

Summary
BUS_GET_DOMAIN can report a PCI function's firmware locality, including
an SR-IOV VF's inherited PF locality, but ordinary OFW PCI functions
still use the shared bus DMA tag.  Consequently, busdma metadata and
coherent memory can be allocated from the bus's domain instead of the
function's domain.

Create and cache a child tag for each function that requests a DMA tag
and apply its reported domain without modifying the shared parent tag.
Apply the same domain to the private IOMMU tag already created by the
pSeries PCI bus.  Destroy cached tags when PCI children are removed so
VF create and destroy cycles do not leak them.

MFC after:      2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kbowling retitled this revision from ofw_pcibus: Inherit PF locality for SR-IOV VFs to ofw_pcibus: Honor device proximity for DMA tags.
kbowling edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Fri, Aug 21, 1:12 PM