Page MenuHomeFreeBSD

ofw_pcibus: Honor device proximity for DMA tags
ClosedPublic

Authored by kbowling on Aug 21 2026, 3:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 21, 1:39 AM
Unknown Object (File)
Sat, Sep 19, 8:14 AM
Unknown Object (File)
Fri, Sep 18, 7:02 AM
Unknown Object (File)
Fri, Sep 18, 4:23 AM
Unknown Object (File)
Sun, Sep 13, 10:38 AM
Unknown Object (File)
Sat, Sep 12, 9:23 AM
Unknown Object (File)
Sat, Sep 12, 9:04 AM
Unknown Object (File)
Fri, Sep 11, 8:11 PM
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