commit 1ed67e12273888ed39b6ab87e29c8e69450108bb
Author: Henrik Nordström <henrik(a)hno.se>
Date: Sat May 9 23:11:47 2020 +0200
Update kernel-5.6 patch
....5.patch => kernel-5.5-390.132-nomanifest.patch | 12 -----
kernel-5.6.patch => kernel-5.6-390.132.patch | 53 ++++++++++++++++------
nvidia-390xx-kmod.spec | 11 +++--
3 files changed, 44 insertions(+), 32 deletions(-)
---
diff --git a/kernel-5.5.patch b/kernel-5.5-390.132-nomanifest.patch
similarity index 97%
rename from kernel-5.5.patch
rename to kernel-5.5-390.132-nomanifest.patch
index 3fe41dd..2f66396 100644
--- a/kernel-5.5.patch
+++ b/kernel-5.5-390.132-nomanifest.patch
@@ -1,15 +1,3 @@
-#diff --git a/.manifest b/.manifest
-#index 56186f6..82ed5a4 100644
-#--- a/.manifest
-#+++ b/.manifest
-#@@ -397,6 +397,7 @@ kernel/nvidia-drm/nvidia-drm.c 0644 KERNEL_MODULE_SRC
INHERIT_PATH_DEPTH:1 MODUL
-# kernel/nvidia-drm/nvidia-drm.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
-# kernel/nvidia-drm/nvidia-drm-helper.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
-# kernel/nvidia-drm/nvidia-dma-fence-helper.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
-#+kernel/nvidia-drm/nvidia-dma-resv-helper.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
-# kernel/nvidia-drm/nvidia-drm-priv.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
-# kernel/nvidia-drm/nvidia-drm-connector.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
-# kernel/nvidia-drm/nvidia-drm-crtc.h 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
MODULE:nvidia_drm
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index cc25806..ec9e093 100755
--- a/kernel/conftest.sh
diff --git a/kernel-5.6.patch b/kernel-5.6-390.132.patch
similarity index 90%
rename from kernel-5.6.patch
rename to kernel-5.6-390.132.patch
index bc1968d..d1f44a2 100644
--- a/kernel-5.6.patch
+++ b/kernel-5.6-390.132.patch
@@ -80,24 +80,25 @@ index 3c812ea..e57c4f9 100644
#endif /* CONFIG_PROC_FS */
diff --git a/kernel/common/inc/nv-time.h b/kernel/common/inc/nv-time.h
-index 2c799c9..0206062 100644
+index 2c799c9..b005363 100644
--- a/kernel/common/inc/nv-time.h
+++ b/kernel/common/inc/nv-time.h
-@@ -30,7 +30,12 @@
+@@ -30,7 +30,13 @@
#include <linux/ktime.h>
#endif
-static inline void nv_gettimeofday(struct timeval *tv)
-+struct nv_timeval {
-+ __kernel_long_t tv_sec;
-+ __kernel_suseconds_t tv_usec;
-+};
++#if defined(NV_HAVE_TIMEVAL)
++#define nv_timeval timeval
++#else
++#define nv_timeval __kernel_old_timeval
++#endif
+
+static inline void nv_gettimeofday(struct nv_timeval *tv)
{
#ifdef NV_DO_GETTIMEOFDAY_PRESENT
do_gettimeofday(tv);
-@@ -39,7 +44,7 @@ static inline void nv_gettimeofday(struct timeval *tv)
+@@ -39,7 +45,7 @@ static inline void nv_gettimeofday(struct timeval *tv)
ktime_get_real_ts64(&now);
@@ -107,7 +108,7 @@ index 2c799c9..0206062 100644
.tv_usec = now.tv_nsec/1000,
};
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
-index ec9e093..463a464 100755
+index ec9e093..e0f937d 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -1197,6 +1197,22 @@ compile_test() {
@@ -133,7 +134,7 @@ index ec9e093..463a464 100755
ioremap_wc)
#
# Determine if the ioremap_wc() function is present.
-@@ -1430,6 +1446,31 @@ compile_test() {
+@@ -1430,6 +1446,45 @@ compile_test() {
compile_check_conftest "$CODE"
"NV_SG_ALLOC_TABLE_FROM_PAGES_PRESENT" "" "functions"
;;
@@ -147,16 +148,30 @@ index ec9e093..463a464 100755
+ compile_check_conftest "$CODE" "NV_HAVE_PROC_OPS"
"" "types"
+ ;;
+
++ timeval)
++ CODE="
++ #include <linux/time.h>
++ #if defined(NV_LINUX_KTIME_H_PRESENT)
++ #include <linux/ktime.h>
++ #endif
++ int conftest_timeval(void) {
++ return offsetof(struct timeval, tv_sec);
++ }"
++
++ compile_check_conftest "$CODE" "NV_HAVE_TIMEVAL"
"" "types"
++ ;;
++
+ ktime_get_raw_ts64)
+ #
+ # Determine if the ktime_get_raw_ts64() function is present.
+ #
+ CODE="
++ #include <linux/time.h>
++ #if defined(NV_LINUX_KTIME_H_PRESENT)
+ #include <linux/ktime.h>
++ #endif
+ int conftest_ktime_get_raw_ts64(void) {
-+ struct timespec64 ts = {0};
-+
-+ ktime_get_raw_ts64(&ts64);
++ ktime_get_raw_ts64();
+ }"
+
+ compile_check_conftest "$CODE"
"NV_KTIME_GET_RAW_TS64_PRESENT" "" "functions"
@@ -283,7 +298,7 @@ index 5808a88..bc60a08 100644
static int
nv_procfs_read_text_file(
diff --git a/kernel/nvidia/nvidia.Kbuild b/kernel/nvidia/nvidia.Kbuild
-index 8ae1016..da7f135 100644
+index 8ae1016..dea8d10 100644
--- a/kernel/nvidia/nvidia.Kbuild
+++ b/kernel/nvidia/nvidia.Kbuild
@@ -117,6 +117,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += on_each_cpu
@@ -294,13 +309,21 @@ index 8ae1016..da7f135 100644
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioremap_wc
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_walk_namespace
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_domain_nr
-@@ -169,7 +170,9 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += outer_flush_all
+@@ -125,6 +126,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += sg_alloc_table
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += sg_init_table
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_get_domain_bus_and_slot
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_num_physpages
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_raw_ts64
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += efi_enabled
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
+@@ -169,7 +171,9 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += outer_flush_all
NV_CONFTEST_TYPE_COMPILE_TESTS += proc_dir_entry
NV_CONFTEST_TYPE_COMPILE_TESTS += scatterlist
NV_CONFTEST_TYPE_COMPILE_TESTS += sg_table
+NV_CONFTEST_TYPE_COMPILE_TESTS += proc_ops
NV_CONFTEST_TYPE_COMPILE_TESTS += file_operations
-+NV_CONFTEST_TYPE_COMPILE_TESTS += ktime_get_raw_ts64
++NV_CONFTEST_TYPE_COMPILE_TESTS += timeval
NV_CONFTEST_TYPE_COMPILE_TESTS += vm_operations_struct
NV_CONFTEST_TYPE_COMPILE_TESTS += atomic_long_type
NV_CONFTEST_TYPE_COMPILE_TESTS += pci_save_state
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index cd07250..6f34839 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.132
# Taken over by kmodtool
-Release: 4%{?dist}.1
+Release: 5%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -21,10 +21,8 @@ URL:
http://www.nvidia.com/
Source11: nvidia-390xx-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
-#
https://gitlab.com/snippets/1943814
-Patch2: kernel-5.5.patch
-#
https://gitlab.com/snippets/1943873
-Patch3: kernel-5.6.patch
+Patch2:
https://gitlab.com/EULA/snippets/-/raw/master/NVIDIA/kernel-5.5-390.132-n...
+Patch3:
https://gitlab.com/EULA/snippets/-/raw/master/NVIDIA/kernel-5.6-390.132.p...
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64
@@ -81,6 +79,9 @@ done
%changelog
+* Sat May 09 2020 Henrik Nordstrom <henrik(a)henriknordstrom.net> - 3:390.132-5
+- Update kernel-5.6 patch
+
* Tue Mar 10 2020 Nicolas Chauvet <kwizart(a)gmail.com> - 3:390.132-4.1
- Conditionlize arched patches