Kernel – 5.0-rc1 Released – Breaks NVIDIA and VMware..
Kernel 5.0-rc1 is out, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/1901.0/02536.html
Compiling NVIDIA 410.93 fails:
.......................... CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.o /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c: In function ‘os_get_current_time’: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:434:5: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘efi_gettimeofday’? [-Werror=implicit-function-declaration] do_gettimeofday(&tm); ^~~~~~~~~~~~~~~ efi_gettimeofday cc1: some warnings being treated as errors make[3]: *** [/usr/src/linux-5.0-rc1/scripts/Makefile.build:277: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.o] Error 1 make[2]: *** [/usr/src/linux-5.0-rc1/Makefile:1553: _module_/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel] Error 2 make[2]: Leaving directory '/usr/src/linux-5.0-rc1' make[1]: *** [Makefile:152: sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-5.0-rc1' make: *** [Makefile:79: modules] Error 2
Change do_gettimeofday
to efi_gettimeofday
)
in NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c
(multiple occurrences..)
Then:
............................ CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/nv-vtophys.o CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.o /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c: In function ‘os_get_current_time’: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:434:22: error: passing argument 1 of ‘efi_gettimeofday’ from incompatible pointer type [-Werror=incompatible-pointer-types] efi_gettimeofday(&tm); ^~~ In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/common/inc/nv-linux.h:196, from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:15: /usr/src/linux-5.0-rc1/include/linux/efi.h:1025:50: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timeval *’ extern void efi_gettimeofday (struct timespec64 *ts); ~~~~~~~~~~~~~~~~~~~^~ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c: In function ‘os_delay’: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:549:22: error: passing argument 1 of ‘efi_gettimeofday’ from incompatible pointer type [-Werror=incompatible-pointer-types] efi_gettimeofday(&tm_aux); ^~~~~~~ In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/common/inc/nv-linux.h:196, from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:15: /usr/src/linux-5.0-rc1/include/linux/efi.h:1025:50: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timeval *’ extern void efi_gettimeofday (struct timespec64 *ts); ~~~~~~~~~~~~~~~~~~~^~ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:583:30: error: passing argument 1 of ‘efi_gettimeofday’ from incompatible pointer type [-Werror=incompatible-pointer-types] efi_gettimeofday(&tm_aux); ^~~~~~~ In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/common/inc/nv-linux.h:196, from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.c:15: /usr/src/linux-5.0-rc1/include/linux/efi.h:1025:50: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timeval *’ extern void efi_gettimeofday (struct timespec64 *ts); ~~~~~~~~~~~~~~~~~~~^~ cc1: some warnings being treated as errors make[3]: *** [/usr/src/linux-5.0-rc1/scripts/Makefile.build:277: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel/nvidia/os-interface.o] Error 1 make[2]: *** [/usr/src/linux-5.0-rc1/Makefile:1553: _module_/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-410.93/kernel] Error 2 make[2]: Leaving directory '/usr/src/linux-5.0-rc1' make[1]: *** [Makefile:152: sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-5.0-rc1' make: *** [Makefile:79: modules] Error 2
Similar error with 415.25..
.............................. CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-415.25/kernel/nvidia/nv-vtophys.o CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-415.25/kernel/nvidia/os-interface.o /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-415.25/kernel/nvidia/os-interface.c: In function ‘os_get_current_time’: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-415.25/kernel/nvidia/os-interface.c:432:5: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘efi_gettimeofday’? [-Werror=implicit-function-declaration] do_gettimeofday(&tm); ^~~~~~~~~~~~~~~ efi_gettimeofday cc1: some warnings being treated as errors .................................
With VMware 15.0.2:
................................. Makefile:189: ================= WARNING ================ Makefile:190: 'SUBDIRS' will be removed after Linux 5.3 Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:192: ==========================================
Then, many warnings (more than with Kernel 4.20..) and then:
................................. CC [M] /tmp/modconfig-Jp8XVA/vmmon-only/common/cpuid.o /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c: In function ‘HostIF_EstimateLockedPageLimit’: /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c:1641:25: error: ‘totalram_pages’ redeclared as different kind of symbol extern unsigned long totalram_pages; ^~~~~~~~~~~~~~ In file included from /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c:42: ./include/linux/mm.h:52:29: note: previous definition of ‘totalram_pages’ was here static inline unsigned long totalram_pages(void) ^~~~~~~~~~~~~~ /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c: In function ‘HostIFReadUptimeWork’: /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c:1787:4: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘do_settimeofday64’? [-Werror=implicit-function-declaration] do_gettimeofday(&tv); ^~~~~~~~~~~~~~~ do_settimeofday64 /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c: In function ‘HostIF_MapUserMem’: /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c:3408:40: error: macro "access_ok" passed 3 arguments, but takes just 2 if (!access_ok(VERIFY_WRITE, p, size)) { ^ /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c:3408:9: error: ‘access_ok’ undeclared (first use in this function) if (!access_ok(VERIFY_WRITE, p, size)) { ^~~~~~~~~ /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.c:3408:9: note: each undeclared identifier is reported only once for each function it appears in cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:277: /tmp/modconfig-Jp8XVA/vmmon-only/linux/hostif.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /tmp/modconfig-Jp8XVA/vmmon-only/./common/vmx86.h:32, from /tmp/modconfig-Jp8XVA/vmmon-only/linux/driver.h:32, from /tmp/modconfig-Jp8XVA/vmmon-only/linux/driver.c:47: /tmp/modconfig-Jp8XVA/vmmon-only/./include/x86msr.h:130: warning: "MSR_MISC_FEATURES_ENABLES" redefined #define MSR_MISC_FEATURES_ENABLES 0x140 .................................. < more warnings follow... >
And, for VMNET:
.................................. CC [M] /tmp/modconfig-Jp8XVA/vmnet-only/netif.o /tmp/modconfig-Jp8XVA/vmnet-only/userif.c: In function ‘VNetUserIfMapPtr’: /tmp/modconfig-Jp8XVA/vmnet-only/userif.c:145:52: error: macro "access_ok" passed 3 arguments, but takes just 2 if (!access_ok(VERIFY_WRITE, (void *)uAddr, size) || ^ /tmp/modconfig-Jp8XVA/vmnet-only/userif.c:145:9: error: ‘access_ok’ undeclared (first use in this function) if (!access_ok(VERIFY_WRITE, (void *)uAddr, size) || ^~~~~~~~~ /tmp/modconfig-Jp8XVA/vmnet-only/userif.c:145:9: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.build:277: /tmp/modconfig-Jp8XVA/vmnet-only/userif.o] Error 1 make[2]: *** Waiting for unfinished jobs.... ............................ < more warnings follow... >
So .. More investigation needed!
Robert Gadsdon. January 6, 2019.
Patches for VMware 15.0.2, 14.1.5 and 12.5.9 are ready in https://github.com/mkubecek/vmware-host-modules (they have been, in fact, available in a testing branch (workstation-15.0.2-test) for few days already but I didn’t want to push them into the “official” branch as I didn’t know if the version is going to be 4.21-rc1 or 5.0-rc1).
Change do_gettimeofday to efi_gettimeofday)
in NVIDIA-Linux-x86_64-410.25…9x/kernel/nvidia/os-interface.c is not work..
better is :
+#include
+ void do_gettimeofday(struct timeval *tv);
do_gettimeofday is remove for Kernel 5 timekeeper…h
NVIDIA-Linux-x86_64-410….
— Change do_gettimeofday to efi_gettimeofday)
— in NVIDIA-Linux-x86_64-410.25…93/kernel/nvidia/os-interface.c not work..
In kernel 5 remove do_gettimeofday from timekeep…h
#include
void do_gettimeofday(struct timeval *tv); ..work..
-nv_drm_gem_object_unreference_unlocked….. to
+nv_drm_gem_object_put_unlocked….
I’m quite sure that I’ve probably over-complicated this patch but I threw it together quite haphazardly when trying out the new 5.0-rc1 back on release.
And note that there could very well be some calculation errors to the time code, though I’ve not noticed anything odd yet.
I made the patch for 415.25, but the patch also seems to work with 415.27 just fine.
Here’s the patch: https://gitlab.com/snippets/1799795
And please excuse me if there’s already a fix out there, I checked but didn’t find anything after some light searching.
Many thanks for this.. I can’t find any other fixes, so far.
Tested OK on 415.27 and Kernel 5.0-rc3 (see latest article..)
RG.