Summary: | x11-drivers/nvidia-drivers-450.51-r1 without CONFIG_MMU_NOTIFIER - .../work/kernel/nvidia-uvm/uvm8_va_space_mm.c:256:16: error: implicit declaration of function '__mmu_notifier_register'; did you mean 'uvm_mmu_notifier_register'? | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ionen Wolkens <ionen> |
Component: | Current packages | Assignee: | David Seifert <soap> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chris, gentoo, krinpaus, phils |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info and build.log
build.log |
Description
Ionen Wolkens
![]() (In reply to Ionen Wolkens from comment #0) > While it worked for me, I was able to reproduce by removing > CONFIG_MMU_NOTIFIER=y from my kernel. Versions below 450.51 are unaffected. Exactly, I did not have this option checked, and could not build nvidia-drivers. After checking it, it builds OK, but kwin-5.19.2 crashes all the time. I had to roll back to nvidia-drivers-440.100-r1. I could add a kernel check for CONFIG_MMU_NOTIFIER. Comment on attachment 646866 [details] emerge --info and build.log > CONFTEST: mmu_notifier_ops_invalidate_range This test succeeded and based on that, __mmu_notifier_register is used. (In reply to Jeroen Roovers from comment #2) > I could add a kernel check for CONFIG_MMU_NOTIFIER. This is not a configurable option - it depends on other options which might be hardware specific. (In reply to Jeroen Roovers from comment #4) > This is not a configurable option - it depends on other options which might > be hardware specific. Yeah, this is what I meant by can't just add a check. And telling users to enable something they may not want/need just so the dependency MMU_NOTIFIER is enabled doesn't seem right. Wish I had some idea to suggest but I don't know. User from the forum just selected amd IOMMU as module which added MMU_NOTIFIER, but well. Well, maybe nvidia's test should be patched instead? Then again, it is a beta driver which nvidia will likely fix themselves (been fine for me but likely has other issues too), so just masking for now doesn't sound so bad either. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfe74ecceb0d42a900759a0307e0173beed48f95 commit bfe74ecceb0d42a900759a0307e0173beed48f95 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-06-28 14:09:29 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-06-28 14:11:42 +0000 x11-drivers/nvidia-drivers: Drop ZONE_DMA kernel configuration check Package-Manager: Portage-2.3.103, Repoman-2.3.23 Bug: https://bugs.gentoo.org/729928 Signed-off-by: Jeroen Roovers <jer@gentoo.org> x11-drivers/nvidia-drivers/nvidia-drivers-390.138.ebuild | 8 +++++++- x11-drivers/nvidia-drivers/nvidia-drivers-430.64-r5.ebuild | 8 +++++++- x11-drivers/nvidia-drivers/nvidia-drivers-435.21-r5.ebuild | 8 +++++++- x11-drivers/nvidia-drivers/nvidia-drivers-440.100-r1.ebuild | 8 +++++++- x11-drivers/nvidia-drivers/nvidia-drivers-450.51-r1.ebuild | 8 +++++++- 5 files changed, 35 insertions(+), 5 deletions(-) (In reply to Ionen Wolkens from comment #6) > Well, maybe nvidia's test should be patched instead? Yes. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50dc6c4c1b89062ff7c06f2626900a76e4f72653 commit 50dc6c4c1b89062ff7c06f2626900a76e4f72653 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-07-09 17:17:45 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-07-09 17:18:58 +0000 x11-drivers/nvidia-drivers: Version 450.57 - Install nvidia_icd.json unconditionally (bug #730738) Package-Manager: Portage-2.3.103, Repoman-2.3.23 Closes: https://bugs.gentoo.org/729928 Closes: https://bugs.gentoo.org/730738 Signed-off-by: Jeroen Roovers <jer@gentoo.org> x11-drivers/nvidia-drivers/Manifest | 3 + .../nvidia-drivers/nvidia-drivers-450.57.ebuild | 593 +++++++++++++++++++++ 2 files changed, 596 insertions(+) Seen a user report that this was still happening with 450.57, gave it a try as well and could reproduce. Re-opening given I don't think this is fixed. It still happens to me with CONFIG_MMU_NOTIFIER disabled. I've attached the logfile ... Created attachment 649822 [details]
build.log
It still happens to me with CONFIG_MMU_NOTIFIER disabled ...
*** Bug 733094 has been marked as a duplicate of this bug. *** I have the same problem with kernel-5.8.0 and nvidia-drivers-450.57. As a consequence, I can't use the new kernel-5.8 until this issue is resolved. With kernel-5.8, nvidia-drivers-440.100 fails to build with a different error. However, I do not know about the state of CONFIG_MMU_NOTIFIER. That particular configuration does not appear in my kernel config file. *** Bug 736641 has been marked as a duplicate of this bug. *** I haven't updated to kernel 5.7 yet, I'm still on 5.6.19. The following are ALL occurences of 'MMU' in my kernel .config: CONFIG_IRQ_MSI_IOMMU=y CONFIG_MMU=y # CONFIG_GART_IOMMU is not set CONFIG_IOMMU_IOVA=y CONFIG_IOMMU_API=y CONFIG_IOMMU_SUPPORT=y # Generic IOMMU Pagetable Support # end of Generic IOMMU Pagetable Support # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set CONFIG_IOMMU_DMA=y CONFIG_AMD_IOMMU=y # CONFIG_AMD_IOMMU_V2 is not set # CONFIG_INTEL_IOMMU is not set CONFIG_MMU_NOTIFIER is not present at all. I'm about to try compiling against kernel 5.7.14 and see whether that works. (In reply to FR from comment #14) > With kernel-5.8, nvidia-drivers-440.100 fails to build with a different > error. You should definitely file a new bug report about that. (In reply to Phil Stracchino (Unix Ronin) from comment #16) > I haven't updated to kernel 5.7 yet, I'm still on 5.6.19. It doesn't matter what version you're on. If you see the same compiler error in the same file, then you have the same problem: .../work/kernel/nvidia-uvm/uvm8_va_space_mm.c:256:16: error: implicit declaration of function '__mmu_notifier_register'; did you mean 'uvm_mmu_notifier_register'? (In reply to Phil Stracchino (Unix Ronin) from comment #16) > CONFIG_MMU_NOTIFIER is not present at all. I'm about to try compiling > against kernel 5.7.14 and see whether that works. And nope, still no joy with 5.7.14. No CONFIG_MMU_NOTIFIER flag present in the .config at all, and nvidia-drivers-450.57-r1 fails to compile. This is a Heisenberg flag. You don't know whether you need it or not, but it doesn't matter, because you can't control whether it's set or not (or even exists). (In reply to Phil Stracchino (Unix Ronin) from comment #19) > (In reply to Phil Stracchino (Unix Ronin) from comment #16) > > CONFIG_MMU_NOTIFIER is not present at all. I'm about to try compiling > > against kernel 5.7.14 and see whether that works. > > And nope, still no joy with 5.7.14. You can stop trying new versions of kernels. I'm running 5.8.0-gentoo-r1 with CONFIG_MMU_NOTIFIER set and nvidia-drivers-450.57-r1 just fine. > This is a Heisenberg flag. You've just made that up, haven't you? No relation to anything the famous Heisenberg did or indeed the term "heisenbug". > You don't know whether you need it or not No, you absolutely do know you need it. Says right there in the Description of this bug report. > , but it doesn't matter, because you can't control whether it's set or not (or even exists). No, you can absolutely enable CONFIG_MMU_NOTIFIER in your kernel configuration; you just cannot do it in a direct, intuitive and convenient way. (In reply to Jeroen Roovers from comment #20) > No, you absolutely do know you need it. Says right there in the Description > of this bug report. Granted, I misread. > > , but it doesn't matter, because you can't control whether it's set or not (or even exists). > > No, you can absolutely enable CONFIG_MMU_NOTIFIER in your kernel > configuration; you just cannot do it in a direct, intuitive and convenient > way. If there is even an indirect and non-intuitive way, I do not see it described in this ticket. You said yourself, > This is not a configurable option - it depends on other options which might be hardware specific. So we need to enable a kernel config option that we can't enable directly, we don't know what options turn it on, and the options needed may be hardware specific. I went through my kernel config again, and I THINK I found it in my case: On my hardware (AMD PhenomII), it appears the crucial config option is CONFIG_AMD_IOMMU_V2. I'm building with that right now and hoping that PhenomII is actually supported by CONFIG_AMD_IOMMU_V2. The notes on CONFIG_AMD_IOMMU_V2 don't tell me. CONFIG_AMD_IOMMU is NOT sufficient. That enabled me to build nvidia-drivers-450.57. I'll report back in a few minutes on whether the kernel with that config option actually works on a PhenomII. (In reply to Phil Stracchino (Unix Ronin) from comment #21) > On my hardware (AMD PhenomII), it appears the crucial config option is > CONFIG_AMD_IOMMU_V2. > CONFIG_AMD_IOMMU is NOT sufficient. > > That enabled me to build nvidia-drivers-450.57. I'll report back in a few > minutes on whether the kernel with that config option actually works on a > PhenomII. And that appears to be working. So if you're on reasonably recent AMD hardware, the key option to enable is CONFIG_AMD_IOMMU_V2. You'll find it under Device Drivers/IOMMU Support. Presumably the Intel equivalent of that option if you're on recent Intel hardware. If those two cases don't cover you, sorry, I have no further insights. (In reply to Phil Stracchino (Unix Ronin) from comment #22) > > You'll find it > under Device Drivers/IOMMU Support. Presumably the Intel equivalent of that > option if you're on recent Intel hardware. > On my Intel system, I enabled "IOMMU Hardware Support" and "Support for Intel IOMMU using DMA Remapping Devices" and then re-compiled kernel-5.8. Nvidia-drivers now fails with a NEW error: In function 'uvm_mmu_notifier_unregister': error: implicit declaration of function 'mmu_notifier_unregister' At this point I am stuck with kernel-5.7 and nvidia-440.82. This needs to be reported to Nvidia. They have a tendency to suddenly incorporate all sorts of irrelevant stuff. Several versions back they had a dependency on NUMA which is not relevant to a desktop workstation. After someone pointed it out they removed it. SOLVED After posting a description of this issue on the Nvidia forum, a patch has been provided. With this patch, both nvidia-450.57 and nvidia-450.66 build and run without the "implicit declaration of function '__mmu_notifier_register'" error. Furthermore, CONFIG_MMU_NOTIFIER does *not* have to be enabled in the kernel configuration. The patch is found here: https://forums.developer.nvidia.com/t/build-failure-450-57-and-450-66-with-kernel-5-8-implicit-declaration-mmu-notifier-register/147977/3 Thanks to Nvidia for their quick response. (In reply to FR from comment #24) > SOLVED > > After posting a description of this issue on the Nvidia forum, a patch has > been provided. > > With this patch, both nvidia-450.57 and nvidia-450.66 build and run without > the "implicit declaration of function '__mmu_notifier_register'" error. > > Furthermore, CONFIG_MMU_NOTIFIER does *not* have to be enabled in the kernel > configuration. > > The patch is found here: > > https://forums.developer.nvidia.com/t/build-failure-450-57-and-450-66-with- > kernel-5-8-implicit-declaration-mmu-notifier-register/147977/3 > > > Thanks to Nvidia for their quick response. I can confirm this patch works with x11-drivers/nvidia-drivers-455.28 sys-kernel/gentoo-sources-5.8.16 thanks ! *** Bug 750485 has been marked as a duplicate of this bug. *** I'm hearing reports that this now works properly in 460.39 (or at least with 5.10.16) even with CONFIG_MMU_NOTIFIER unset. As aforementioned this looks fixed, so I'll just close my own bug. |