Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 817764 - x11-drivers/nvidia-drivers-460.91.03 does not compile for kernel 5.10.61 (nv-pat.c:53:5: error: implicit declaration of function '__flush_tlb')
Summary: x11-drivers/nvidia-drivers-460.91.03 does not compile for kernel 5.10.61 (nv-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-11 06:25 UTC by thomas
Modified: 2021-10-11 13:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,77.26 KB, text/x-log)
2021-10-11 06:27 UTC, thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thomas 2021-10-11 06:25:14 UTC
I wanted to switch from kernel 5.4.80-r1 to 5.10.61, but the mentioned nvidia driver does not compile for this kernel.
I do not want to use a 470.* driver because switching monitor input programmatically does not work there for my gfx card.
But 460.91.03 is still available in portage, so it should compile.

Reproducible: Always

Steps to Reproduce:
1. Try to compile nvidia driver for kernel 5.10.61
2.
3.
Actual Results:  
Compile fails.

Expected Results:  
Should compile.

Going to attach the build log.
Comment 1 thomas 2021-10-11 06:27:24 UTC
Created attachment 744423 [details]
build.log
Comment 2 Ionen Wolkens gentoo-dev 2021-10-11 12:49:39 UTC
Seems nvidia's own fallback PAT implementation is broken with newer kernels.

But it's using this fallback most likely because you don't have CONFIG_X86_PAT=y in your kernel's .config (normally this is default and only visible with EXPERT=y), please check.

I'll update the ebuild to check for this option after more testing.
Comment 3 thomas 2021-10-11 13:24:59 UTC
Yes, you are right. CONFIG_X86_PAT was not set, I don't know why.

After setting this option, the driver compiled.

Thanks for the quick response and help!
Comment 4 Larry the Git Cow gentoo-dev 2021-10-11 13:59:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7e8fd33216e094df447d2b5a1a20d15616f8fd9

commit b7e8fd33216e094df447d2b5a1a20d15616f8fd9
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2021-10-11 13:27:28 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2021-10-11 13:58:06 +0000

    x11-drivers/nvidia-drivers: check for CONFIG_X86_PAT
    
    NVIDIA has a fallback implementation if unset, but it uses
    __flush_tlb removed on x86 since >=5.8 kernels (albeit fairly
    unlikely to be unset given default and gated behind EXPERT=y).
    
    All versions are affected.
    
    Closes: https://bugs.gentoo.org/817764
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 x11-drivers/nvidia-drivers/nvidia-drivers-390.144.ebuild   | 2 ++
 x11-drivers/nvidia-drivers/nvidia-drivers-460.91.03.ebuild | 2 ++
 x11-drivers/nvidia-drivers/nvidia-drivers-470.62.05.ebuild | 2 ++
 x11-drivers/nvidia-drivers/nvidia-drivers-470.63.01.ebuild | 2 ++
 x11-drivers/nvidia-drivers/nvidia-drivers-470.74.ebuild    | 2 ++
 5 files changed, 10 insertions(+)