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
Unknown Object (File)
Mon, Aug 4, 5:56 PM
Unknown Object (File)
Sat, Aug 2, 8:55 AM
Unknown Object (File)
Fri, Jul 11, 3:09 PM
Unknown Object (File)
Jul 8 2025, 3:07 AM
Unknown Object (File)
Jul 7 2025, 10:02 AM
Unknown Object (File)
Jun 27 2025, 5:22 AM
Unknown Object (File)
Jun 26 2025, 3:19 PM
Unknown Object (File)
Jun 25 2025, 8:12 PM
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 Skipped
Unit
Tests Skipped

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