Polarbear Cuddlebunny
Viziam Amarr Empire
1
|
Posted - 2017.02.10 19:19:43 -
[1] - Quote
All,
Updated my kernel to 4.9.8-201fc25 today and found out the NVIDIA-Linux-x86_64-375.26 drivers do not compile.
Supposedly this shouldn't be a problem according to some forums, but for me it is. There is a patch available at https://devtalk.nvidia.com/default/topic/972761/linux/linux-4-9-git-rc1-375-10-build-errors/, the relevant bits are included in the code block below.
If you have "nvidia-installer" hanging at 20% when compiling, this issue is likely the cause.
There was also some bugger-up for me in the Makefile shipped with the installer ("$(RM) -r conftest" needing commenting out in ./kernel/Makefile). Everything worked fine after commenting out the mentioned line and patching the code.
- Extract the package with: "./NVIDIA-Linux-x86_64-375.26.run -x"
- Check the issue is the same via "cd ./NVIDIA-Linux-x86_64-375.26/kernel" and "make" (GET_USER_PAGES errors)
- Use "make clean" to get to a decent state.
- Put the patch below somewhere sane (e.g. /tmp/nvpatch) and apply it with: "patch -p1 < /tmp/nvpatch"
- Run "make" to save time later.
- Re-run the installer: "cd ../ && ./nvidia-installer -a"
If you're still finding the installer is crap, manually deploy the nvidia-drm.ko kernel module compiled in ./kernel/ and reboot.
# Issue Gäû1 diff -Naur kernel/common/inc/nv-mm.h b/kernel/common/inc/nv-mm.h --- kernel/common/inc/nv-mm.h 2016-10-22 13:42:48.220791689 +0300 +++ b/kernel/common/inc/nv-mm.h 2016-10-22 13:51:23.906406480 +0300 @@ -45,8 +45,8 @@ #define NV_GET_USER_PAGES get_user_pages #define NV_GET_USER_PAGES_REMOTE get_user_pages_remote #else - #define NV_GET_USER_PAGES(start, nr_pages, write, force, pages, vmas) \ - get_user_pages(current, current->mm, start, nr_pages, write, force, pages, vmas) + #define NV_GET_USER_PAGES(start, nr_pages, gup_flags, pages, vmas) \ + get_user_pages(current, current->mm, start, nr_pages, gup_flags, pages, vmas) #define NV_GET_USER_PAGES_REMOTE get_user_pages #endif diff -Naur kernel/nvidia/os-mlock.c b/kernel/nvidia/os-mlock.c --- kernel/nvidia/os-mlock.c 2016-10-22 13:42:48.222791633 +0300 +++ b/kernel/nvidia/os-mlock.c 2016-10-22 13:51:23.908406424 +0300 @@ -117,7 +117,7 @@ down_read(&mm->mmap_sem); ret = NV_GET_USER_PAGES((unsigned long)address, - page_count, write, force, user_pages, NULL); + page_count, write ? FOLL_WRITE : 0, user_pages, NULL); up_read(&mm->mmap_sem); pinned = ret; diff -Naur kernel/nvidia-drm/nvidia-drm-linux.c b/kernel/nvidia-drm/nvidia-drm-linux.c --- kernel/nvidia-drm/nvidia-drm-linux.c 2016-10-22 13:42:48.243791048 +0300 +++ b/kernel/nvidia-drm/nvidia-drm-linux.c 2016-10-22 13:51:23.931405780 +0300 @@ -137,7 +137,7 @@ down_read(&mm->mmap_sem); - pages_pinned = NV_GET_USER_PAGES(address, pages_count, write, force, + pages_pinned = NV_GET_USER_PAGES(address, pages_count, write ? FOLL_WRITE :0, user_pages, NULL); up_read(&mm->mmap_sem); diff -Naur kernel/nvidia-uvm/uvm8_tools.c b/kernel/nvidia-uvm/uvm8_tools.c --- kernel/nvidia-uvm/uvm8_tools.c 2016-10-22 13:42:48.251790826 +0300 +++ b/kernel/nvidia-uvm/uvm8_tools.c 2016-10-22 13:51:23.938405584 +0300 @@ -224,7 +224,7 @@ } down_read(¤t->mm->mmap_sem); - ret = NV_GET_USER_PAGES(user_va, num_pages, 1, 0, *pages, vmas); + ret = NV_GET_USER_PAGES(user_va, num_pages, 1 ? FOLL_WRITE : 0, *pages, vmas); up_read(¤t->mm->mmap_sem); if (ret != num_pages) { status = NV_ERR_INVALID_ARGUMENT;
|