Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building on 6.15 #45

Merged
merged 2 commits into from
Apr 13, 2025
Merged

Fix building on 6.15 #45

merged 2 commits into from
Apr 13, 2025

Conversation

Lawstorant
Copy link

@Lawstorant Lawstorant commented Apr 9, 2025

6.15 introduces breaking changes in timers: https://lkml.org/lkml/2025/4/6/101

After fix (no errors on 6.15 and previous versions):

(2/3) Install DKMS modules
==> dkms install --no-depmod xone/0.3.3 -k 6.14.1-arch1-1
==> dkms install --no-depmod xone/0.3.3 -k 6.12.22-1-lts
==> dkms install --no-depmod xone/0.3.3 -k 6.15.0-rc1-00060-ga24588245776
==> depmod 6.12.22-1-lts
==> depmod 6.15.0-rc1-00060-ga24588245776
==> depmod 6.14.1-arch1-1

Fixes #44

@tskaar
Copy link

tskaar commented Apr 12, 2025

FYI:
The "new" API for timer_*_sync() was introduced in kernel v6.2 [1], so you could instead do the conditional:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)

And the hrtimer_setup() was introduced in kernel v6.13 [2], so you could do the conditional:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,13,0)

This would make it easier to increase the "minimum kernel version" if that were to happen down the line.

Sources:
[1] - timer_delete_sync() - kernel v6.2
[2] - hrtimer_setup() - kernel v6.13

Other than that, thanks for the fix! 🚀

@Lawstorant
Copy link
Author

I know, but on the other hand you normally want to limit possible blast radius. If, for some reason, my PR actually would break the driver, this way it will only break it for 6.15 which already is broken. This won't break it for already known-working versions.

In software dev and all things IT better is the enemy of good.

@dlundqvist
Copy link
Owner

I know, but on the other hand you normally want to limit possible blast radius. If, for some reason, my PR actually would break the driver, this way it will only break it for 6.15 which already is broken. This won't break it for already known-working versions.

From kernel's point of view a NULL function is a bug since there's a WARN_ON_ONCE for that condition. So please pass in correct callback in hrtimer_setup.

@Lawstorant
Copy link
Author

Good catch, I now checked how to correctly handle this. I'll update in a moment

@dlundqvist dlundqvist merged commit 5e44361 into dlundqvist:master Apr 13, 2025
@dlundqvist
Copy link
Owner

Thanks.

@Lawstorant Lawstorant deleted the fix-6.15 branch April 13, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails on kernel 6.15
3 participants