Page MenuHomeFreeBSD

linuxkpi: `list_sort()`'s callback now takes list arguments
ClosedPublic

Authored by dumbbell on Jan 16 2023, 7:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 14, 1:17 AM
Unknown Object (File)
Dec 25 2024, 3:15 PM
Unknown Object (File)
Nov 27 2024, 8:04 AM
Unknown Object (File)
Oct 11 2024, 7:29 AM
Unknown Object (File)
Oct 11 2024, 7:29 AM
Unknown Object (File)
Oct 11 2024, 7:28 AM
Unknown Object (File)
Oct 11 2024, 7:26 AM
Unknown Object (File)
Oct 1 2024, 4:48 PM

Details

Summary

This change breaks the API of list_sort() and thus the compilation of existing drivers. Does anyone have a suggestion on how to handle this change beside a bump of FreeBSD_version?

This is part of the update of the DRM drivers to Linux 5.13.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Did the API changed in Linux at some point ?
We used to have LINUXKPI_VERSION at some point, maybe we can use this again if this is a change in Linux API.

Support old and new list_sort() API.

manu requested changes to this revision.Jan 28 2023, 8:52 AM
manu added inline comments.
sys/compat/linuxkpi/common/src/linux_compat.c
39 ↗(On Diff #115768)

No sure that we should define it here now.
Let's start by supporting both version, we can define LINUXKPI_VERSION in drm-kmod starting from the 5.13 branch.
And when old consumer (drm-kmod 5.10-lts branch) are deprecated we can remove the check.

This revision now requires changes to proceed.Jan 28 2023, 8:52 AM
sys/compat/linuxkpi/common/src/linux_compat.c
39 ↗(On Diff #115768)

Ok, I will modify the patch to define the new header (if LINUXKPI_VERSION >= 51300), but leave linux_compat.c unmodified (it will deconstify the arguments as today).

Leave linux_compat.c unmodify (to use the old header). The KBI doesn't change anyway.

This revision is now accepted and ready to land.Jan 31 2023, 7:15 AM