Skip to content

Conversation

@jwrdegoede
Copy link
Contributor

Fix compilation with kernels >= 6.10.

Cc: @vicamo @smallorange (FYI)

Fix compilation with kernels >= 6.10.

Signed-off-by: Hans de Goede <[email protected]>

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
/* Dropped from 6.10, use our own copy for now */
static int follow_pfn(struct vm_area_struct *vma, unsigned long address, unsigned long *pfn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think usually it's preferred to use the new API call and fix backward compatibility. While hopefully there won't too many revisions left for IPU6 out-of-tree driver, I think either way works and of course the decision goes to Intel developers.

This fails the build against v6.10-rc1..v6.10-rc3 because follow_pfn is only removed after v6.10-rc4 by the way. Declared without static but implemented as static.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no new API, follow_pfn() is removed and there is no replacement. follow_pte() has existed all along.

As for not building against 6.10-rc1 - 6.10-rc3 I did not realize that, but there is no way to check for the RC level and AFAIK we only care about building against the actual final .0 release and not against RC releases.


#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
/* Dropped from 6.10, use our own copy for now */
static int follow_pfn(struct vm_area_struct *vma, unsigned long address, unsigned long *pfn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While nvidia driver depends on this as well, Ubuntu kernel decided to revert that commit. Therefore we will add a line before the owning copy:

#define follow_pfn backport__follow_pfn

This pull request will be integrated into Ubuntu's next ipu6-drivers dkms update.

@vicamo
Copy link
Contributor

vicamo commented Oct 11, 2024

follow_pte is removed in v6.12-rc1, too. A revised revision is available in Ubuntu's experimental-dkms PPA.

@kupietz
Copy link

kupietz commented Oct 13, 2024

follow_pte is removed in v6.12-rc1, too. A revised revision is available in Ubuntu's experimental-dkms PPA.

Thanks! The Ubuntu source works also fine on Fedora 40 with mainline kernel 6.12-rc2 and brings back my ov2740 camera on ThinkPad X1 Carbon Gen 11.

@Rob-van-B
Copy link

Is there any update on this issue? I would love to see the cam work again on Kernel >= 6.10 as e.g. in Ubuntu 24.10

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.

4 participants