Page MenuHomeFreeBSD

LinuxKPI: implement dmam_free_coherent()
ClosedPublic

Authored by bz on Jan 21 2026, 2:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 22, 3:34 AM
Unknown Object (File)
Sun, Feb 8, 12:43 AM
Unknown Object (File)
Mon, Feb 2, 2:00 AM
Unknown Object (File)
Sat, Jan 31, 12:03 AM
Unknown Object (File)
Fri, Jan 30, 2:03 AM
Unknown Object (File)
Jan 26 2026, 9:53 AM
Unknown Object (File)
Jan 25 2026, 1:19 AM
Unknown Object (File)
Jan 24 2026, 9:32 PM
Subscribers

Details

Summary

dmam_free_coherent() is used by an updated mt76 driver at v6.19-rc6.
We need to surgically find the devres information and destroy it before
calling dma_free_coherent.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

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

Event Timeline

bz requested review of this revision.Jan 21 2026, 2:00 PM

Why do we use linuxkpi prefix sometimes and lkpi others?

But looks fine

Why do we use linuxkpi prefix sometimes and lkpi others?

But looks fine

Historically this was mixed. We are trying to use linuxkpi_ for official public LinuxKPi functions now and lkpi_ for internal. Historically there's also linux_ which we shoudl leave to the Linuxolator. Doing the full sweep one day will be tough but at least trying to keep it consistent for new stuff.

Should we add a README somewhere in sys/compat/linuxkpi/ and start writing these things down?

In D54810#1253014, @bz wrote:

Why do we use linuxkpi prefix sometimes and lkpi others?

But looks fine

Historically this was mixed. We are trying to use linuxkpi_ for official public LinuxKPi functions now and lkpi_ for internal. Historically there's also linux_ which we shoudl leave to the Linuxolator. Doing the full sweep one day will be tough but at least trying to keep it consistent for new stuff.

Should we add a README somewhere in sys/compat/linuxkpi/ and start writing these things down?

I love that idea

Should we add a README somewhere in sys/compat/linuxkpi/ and start writing these things down?

I love that idea

Great. I'll find the version I wrote in ~2021, when people didn't like, the next days it and update it and put it up here.

This revision is now accepted and ready to land.Jan 21 2026, 8:12 PM
sys/compat/linuxkpi/common/src/linux_pci.c
1822

= &dma_handle ; will do before commit.

This revision was automatically updated to reflect the committed changes.