commit 17e4eb48b8e11b8638233e1cb5aad2ec32c695cc
Author: Leigh Scott <leigh123linux(a)googlemail.com>
Date: Mon Dec 24 08:55:07 2018 +0000
Build fix for 4.20 kernel (untested)
4.20_kernel.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-390xx-kmod.spec | 7 ++++++-
2 files changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/4.20_kernel.patch b/4.20_kernel.patch
new file mode 100644
index 0000000..546ea5a
--- /dev/null
+++ b/4.20_kernel.patch
@@ -0,0 +1,57 @@
+--- a/kernel/nvidia/os-interface.c
++++ b/kernel/nvidia/os-interface.c
+@@ -13,6 +13,7 @@
+
+ #include "os-interface.h"
+ #include "nv-linux.h"
++#include <linux/version.h>
+
+ #include "nv-gpu-numa.h"
+
+@@ -1697,7 +1698,11 @@ void NV_API_CALL os_free_pages_phys
+
+ struct nv_ipmi_softc
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+ ipmi_user_t p_user; // ptr to ipmi_msghandler user structure
++#else
++ struct ipmi_user *p_user;
++#endif
+ spinlock_t msg_lock;
+ struct list_head msgs;
+ NvU32 seqNum; //request sequence number
+@@ -1706,7 +1711,11 @@ struct nv_ipmi_softc
+ static inline int
+ nv_ipmi_set_my_address
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+ ipmi_user_t user,
++#else
++ struct ipmi_user *user,
++#endif
+ unsigned char address
+ )
+ {
+--- a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
++++ b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
+@@ -20,6 +20,8 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
++
+ #include "nvidia-drm-conftest.h"
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+@@ -237,7 +239,11 @@ static int __nv_drm_vma_fault(struct vm_
+
+ page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+ ret = vm_insert_pfn(vma, address, pfn + page_offset);
++#else
++ ret = vmf_insert_pfn(vma, address, pfn + page_offset);
++#endif
+
+ switch (ret) {
+ case 0:
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 5e4c14d..74125f1 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -10,7 +10,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.87
# Taken over by kmodtool
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -20,6 +20,7 @@ Source11: nvidia-390xx-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
Patch2: 4.19_kernel.patch
+Patch3: 4.20_kernel.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -46,6 +47,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -73,6 +75,9 @@ done
%changelog
+* Mon Dec 24 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 3:390.87-4
+- Build fix for 4.20 kernel (untested)
+
* Thu Oct 25 2018 Nicolas Chauvet <kwizart(a)gmail.com> - 3:390.87-3
- Drop obsoletes nvidia-kmod
Show replies by date