Page MenuHomeFreeBSD

linuxkpi: Add `pm_runtime_get_if_active()` variant from Linux 6.9
ClosedPublic

Authored by dumbbell on Jun 23 2025, 9:34 PM.
Tags
None
Referenced Files
F144288059: D50991.id157482.diff
Sat, Feb 7, 4:10 PM
Unknown Object (File)
Fri, Jan 30, 6:04 PM
Unknown Object (File)
Sun, Jan 11, 1:23 AM
Unknown Object (File)
Sat, Jan 10, 2:23 AM
Unknown Object (File)
Sat, Jan 10, 1:09 AM
Unknown Object (File)
Dec 11 2025, 6:35 PM
Unknown Object (File)
Nov 24 2025, 9:00 PM
Unknown Object (File)
Nov 23 2025, 8:57 AM
Subscribers

Details

Summary

With Linux 6.9, pm_runtime_get_if_active() lost its second bool argument.

This change is put behind a check of LINUXKPI_VERSION to keep compatibility.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

bz added inline comments.
sys/compat/linuxkpi/common/include/linux/pm_runtime.h
37

I would always keep the current version in the default and the legacy version under ifdef. Question is, does drm-kmod define LINUXKPI_VERSION for each release it is doing. If so, I see see no in-kernel consumers so should be fine.

dumbbell added inline comments.
sys/compat/linuxkpi/common/include/linux/pm_runtime.h
37

You already told me something similar but couldn’t remember the advice… It took an example in another file and replicated it.

drm-kmod always define LINUXKPI_VERSION. At least, that’s the first commit I make when I start a new port.

Address comment from @bz: default the #if/#else logic to the latest version. A user has to define LINUXKPI_VERSION to request the older variant.

This revision is now accepted and ready to land.Jun 23 2025, 10:08 PM