Page MenuHomeFreeBSD

LinuxKPI: implement dma_set_coherent_mask()
ClosedPublic

Authored by bz on Sep 27 2021, 10:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 20, 5:04 AM
Unknown Object (File)
Jan 12 2025, 6:44 PM
Unknown Object (File)
Jan 12 2025, 1:41 PM
Unknown Object (File)
Jan 11 2025, 6:46 PM
Unknown Object (File)
Jan 1 2025, 10:40 AM
Unknown Object (File)
Dec 3 2024, 7:45 PM
Unknown Object (File)
Nov 8 2024, 9:46 AM
Unknown Object (File)
Nov 8 2024, 7:36 AM

Details

Summary

Coherent is lower 32bit only by default in Linux and our only default
dma mask is 64bit currently which violates expectations unless
dma_set_coherent_mask() was called explicitly with a different mask.

Implement coherent by creating a second tag, and storing the tag in the
objects and use the tag from the object wherever possible.
This currently does not update the scatterlist or pool (both could be
converted but S/G cannot be MFCed as easily).

There is a 2nd change embedded in the updated logic of
linux_dma_alloc_coherent() to always zero the allocation as
otherwise some drivers get cranky on uninialised garbage.

Sponsored by: The FreeBSD Foundation
MFC after: 7 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41788
Build 38677: arc lint + arc unit