[rpmfusion-nonfree-appstream-data] Regenerate for F40
by Leigh Scott
commit 7e37277447a730903c291d6ba8dea8732b109b05
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat Apr 20 00:28:57 2024 +0100
Regenerate for F40
.gitignore | 2 ++
rpmfusion-nonfree-appstream-data.spec | 7 +++++--
sources | 4 ++--
update-appdata-rpmfusion-nonfree.sh | 2 +-
4 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fe7e9c3..c4314f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,5 @@ rpmfusion-nonfree/
/rpmfusion-nonfree-38.xml.gz
/rpmfusion-nonfree-39-icons.tar.gz
/rpmfusion-nonfree-39.xml.gz
+/rpmfusion-nonfree-40-icons.tar.gz
+/rpmfusion-nonfree-40.xml.gz
diff --git a/rpmfusion-nonfree-appstream-data.spec b/rpmfusion-nonfree-appstream-data.spec
index b6f0bc7..f724f2e 100644
--- a/rpmfusion-nonfree-appstream-data.spec
+++ b/rpmfusion-nonfree-appstream-data.spec
@@ -2,8 +2,8 @@
%global repoversion nonfree
Name: %{reponame}-%{repoversion}-appstream-data
-Version: 39
-Release: 2%{?dist}
+Version: 40
+Release: 1%{?dist}
Summary: Appstream metadata for the RPM Fusion nonfree repository
BuildArch: noarch
@@ -39,6 +39,9 @@ DESTDIR=%{buildroot} appstream-util install %{SOURCE0} %{SOURCE1}
%dir %{_datadir}/app-info/xmls
%changelog
+* Fri Apr 19 2024 Leigh Scott <leigh123linux(a)gmail.com> - 40-1
+- Regenerate for F40
+
* Fri Nov 03 2023 Leigh Scott <leigh123linux(a)gmail.com> - 39-2
- Regenerate
diff --git a/sources b/sources
index 645b469..2c92a08 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (rpmfusion-nonfree-39-icons.tar.gz) = 8a6765e7b75902fdc28515b868aaffdb8dedaabff89f0b8a841707b3f81eeb0b17f33febe733c8262c68b17744cc3ac38abbe1a69f62554f402404b827d88a50
-SHA512 (rpmfusion-nonfree-39.xml.gz) = a0c90e2b901a13f41b1bdc4007e9dd686454a2dfc13322bba7293e5c39a651ef148e21753fdf3aecdd39cc7a8baf917b1f065972ca9532066ad5c7a94bdcd8c2
+SHA512 (rpmfusion-nonfree-40-icons.tar.gz) = 6f8d2af17b87d4002a0e9c70b00dcf889655f803943511fb4ba1999d6d05f34e5a427f6f4c317315e221aa6fe78c7d6eaedff299173c324d2ffc09852302dad5
+SHA512 (rpmfusion-nonfree-40.xml.gz) = bfe68c1393946de7811da17ed4a6d1830cbd688fa7308042450b4591352f0f4dd0cb1b9325b994c2d9c684b801458f6d1422b9b3dfc7c672dd5a15d06e416eba
diff --git a/update-appdata-rpmfusion-nonfree.sh b/update-appdata-rpmfusion-nonfree.sh
index 53eee73..8a6ec26 100755
--- a/update-appdata-rpmfusion-nonfree.sh
+++ b/update-appdata-rpmfusion-nonfree.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-RAWHIDE="40"
+RAWHIDE="41"
RELEASE=""
URL_DEV=""
URL_RELEASE=""
7 months
[rpmfusion-free-appstream-data] Regenerate for F40
by Leigh Scott
commit 03baf3128f9b63de0b93119b3c0a0122c072ee45
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat Apr 20 00:16:59 2024 +0100
Regenerate for F40
.gitignore | 2 ++
rpmfusion-free-appstream-data.spec | 5 ++++-
sources | 4 ++--
update-appdata-rpmfusion-free.sh | 2 +-
4 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cf7215d..7bc3652 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@ tags
/rpmfusion-free-38.xml.gz
/rpmfusion-free-39-icons.tar.gz
/rpmfusion-free-39.xml.gz
+/rpmfusion-free-40-icons.tar.gz
+/rpmfusion-free-40.xml.gz
diff --git a/rpmfusion-free-appstream-data.spec b/rpmfusion-free-appstream-data.spec
index 1dd2627..b3b0d02 100644
--- a/rpmfusion-free-appstream-data.spec
+++ b/rpmfusion-free-appstream-data.spec
@@ -2,7 +2,7 @@
%global repoversion free
Name: %{reponame}-%{repoversion}-appstream-data
-Version: 39
+Version: 40
Release: 1%{?dist}
Summary: Appstream metadata for the RPM Fusion free repository
BuildArch: noarch
@@ -40,6 +40,9 @@ DESTDIR=%{buildroot} appstream-util install %{SOURCE0} %{SOURCE1}
%dir %{_datadir}/app-info/xmls
%changelog
+* Fri Apr 19 2024 Leigh Scott <leigh123linux(a)gmail.com> - 40-1
+- Regenerate for F40
+
* Thu Oct 19 2023 Leigh Scott <leigh123linux(a)gmail.com> - 39-1
- Regenerate for F39
diff --git a/sources b/sources
index b279f93..05b5507 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (rpmfusion-free-39-icons.tar.gz) = cb5fd9363eacaf030291ab7f16d9d79770175182785f765e918b44e7083190fd8f3eda5ecadd79b183ebaddc38be0d981c562f6a185af4ae553affbc188f0a02
-SHA512 (rpmfusion-free-39.xml.gz) = 2b573c33044fa0290b21b56028f1b62a878572ba09fe1b3917f2910a97c018ee7790cd137fd3e7bd1153e23327daec21e83b0a65d3b7bf9fd38c784395f4eedb
+SHA512 (rpmfusion-free-40-icons.tar.gz) = 69c970b71e4bb84214c17ccf2374da1148bf51296beb7a068e81211abc4a896927b4f6cec0d4d876de88a149284aee91b5e86807b2da20c29c906bf39a27db5e
+SHA512 (rpmfusion-free-40.xml.gz) = e9fa9aa887cbe5457330ca45ae6a1c50c6889958962d5aadb7662777be8a4b541094835aa2e609036a62eb96ac1775743b2ffc7b21fa65df01d3342a3440867a
diff --git a/update-appdata-rpmfusion-free.sh b/update-appdata-rpmfusion-free.sh
index c4b608f..94bfa6a 100755
--- a/update-appdata-rpmfusion-free.sh
+++ b/update-appdata-rpmfusion-free.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-RAWHIDE="40"
+RAWHIDE="41"
RELEASE=""
URL_DEV=""
URL_RELEASE=""
7 months
[nvidia-390xx-kmod] Update and fix for Fedora 40 and gcc14 Update Release number and changelog in SPEC file
by Nicolas Viéville
commit 8aac772cbeeae00685eb9f128c7dfdac5edf28e2
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Fri Apr 19 19:56:44 2024 +0200
Update and fix for Fedora 40 and gcc14
Update Release number and changelog in SPEC file
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
nvidia-390xx-kmod.spec | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 1d7f217..9eb6a23 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -18,7 +18,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.157
# Taken over by kmodtool
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -252,6 +252,19 @@ done
%changelog
+* Fri Apr 19 2024 Nicolas Viéville <nicolas.vieville(a)uphf.fr> - 3:390.157-9
+- Try to fix errors and warnings for Fedora 40 and gcc14 - RFBZ#6905
+ Can't fix "Please avoid flushing system-wide workqueues" warning as
+ destroy_workqueue and alloc_workqueue functions are GPL only symbols
+- Fixed previous patches - Hunk offsets
+- SPEC file clean-up
+- Added CVE warning to description in SPEC file
+- Important warning: this module has reached the end of support from NVidia
+ It is therefore exposed to Common Vulnerabilities and Exposures (CVE).
+ More information on the concerned CVE could be obtained here:
+ https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=NVIDIA+390.157+linux
+ https://www.nvidia.com/en-us/security/
+
* Sat Apr 06 2024 Nicolas Viéville <nicolas.vieville(a)uphf.fr> - 3:390.157-8
- Add patch for kernel >= 6.8
7 months
[nvidia-390xx-kmod] Add CVE warning in SPEC file description
by Nicolas Viéville
commit d36d6efe3096e99d38cda74d1acd0c4cfa19b5b2
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Fri Apr 19 19:54:59 2024 +0200
Add CVE warning in SPEC file description
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
nvidia-390xx-kmod.spec | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index ada4579..1d7f217 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -130,6 +130,12 @@ BuildRequires: %{AkmodsBuildRequires}
%description
The nvidia 390xx %{version} display driver kernel module for kernel %{kversion}.
+Important warning: this module has reached the end of support from NVidia.
+It is therefore exposed to Common Vulnerabilities and Exposures (CVE).
+More information on the concerned CVE could be obtained here:
+https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=NVIDIA+390.157+linux
+https://www.nvidia.com/en-us/security/
+
%prep
# error out if there was something wrong with kmodtool
7 months
[nvidia-390xx-kmod] SPEC file clean-up
by Nicolas Viéville
commit 97b7f320c6ba8c2dffd6c6404f71403c0725b91f
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Fri Apr 19 19:53:51 2024 +0200
SPEC file clean-up
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
nvidia-390xx-kmod.spec | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index d8e5e6d..ada4579 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -126,9 +126,11 @@ BuildRequires: %{AkmodsBuildRequires}
# kmodtool does its magic here
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile %{SOURCE11} --obsolete-name nvidia --obsolete-version "%{?epoch}:%{version}" %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
+
%description
The nvidia 390xx %{version} display driver kernel module for kernel %{kversion}.
+
%prep
# error out if there was something wrong with kmodtool
%{?kmodtool_check}
@@ -221,6 +223,7 @@ for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
done
+
%build
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/
@@ -232,6 +235,7 @@ for kernel_version in %{?kernel_versions}; do
popd
done
+
%install
for kernel_version in %{?kernel_versions}; do
mkdir -p $RPM_BUILD_ROOT/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
@@ -241,7 +245,6 @@ done
%{?akmod_install}
-
%changelog
* Sat Apr 06 2024 Nicolas Viéville <nicolas.vieville(a)uphf.fr> - 3:390.157-8
- Add patch for kernel >= 6.8
@@ -1002,7 +1005,7 @@ done
* Thu Jun 17 2010 Nicolas Chaubvet <kwizart(a)gmail.com> - 1:195.36.31-1
- Update to 195.36.31
- Fix acpi_walk_namespace call with kernel 2.6.33 and later.
- http://bugs.gentoo.org/show_bug.cgi?id=301318
+ http://bugs.gentoo.org/show_bug.cgi?id=301318
* Sun Jun 13 2010 Nicolas Chauvet <kwizart(a)gmail.com> - 1:195.36.24-2
- Backport IOMMU - http://www.nvnews.net/vbulletin/showthread.php?t=151791
@@ -1017,7 +1020,7 @@ done
- Bump Epoch - Fan problem in recent release
* Mon Mar 08 2010 Nicolas Chauvet <kwizart(a)fedoraproject.org> - 1:190.53-2
-- Revert to 190.53 version
+- Revert to 190.53 version
http://www.nvnews.net/vbulletin/announcement.php?f=14
* Sat Feb 27 2010 Nicolas Chauvet <kwizart(a)fedoraproject.org> - 195.36.08-1
@@ -1337,7 +1340,7 @@ done
* Tue Oct 09 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> 100.14.19-5
- rebuilt for latest kernels
-* Sun Oct 07 2007 Thorsten Leemhuis <fedora AT leemhuis DOT info>
+* Sun Oct 07 2007 Thorsten Leemhuis <fedora AT leemhuis DOT info>
- build for rawhide kernels as of today
* Thu Oct 04 2007 Thorsten Leemhuis <fedora AT leemhuis DOT info> - 100.14.19-3
@@ -1422,7 +1425,7 @@ done
- include xen patch (thx to Bob Richmond)
* Wed Nov 01 2006 Thorsten Leemhuis <fedora AT leemhuis DOT info> - 1.0.9626-2
-- include patch from
+- include patch from
http://www.nvnews.net/vbulletin/showpost.php?p=996233&postcount=20
* Sun Oct 22 2006 Stewart Adam <s.adam AT diffingo DOT com> - 1.0.9626-1
7 months
[nvidia-390xx-kmod] Try to fix errors and warnings for Fedora 40 and gcc14 - RFBZ#6905
by Nicolas Viéville
commit 0742ac76b8953763a3c773614675b62093c80f1d
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Fri Apr 19 19:46:54 2024 +0200
Try to fix errors and warnings for Fedora 40 and gcc14 - RFBZ#6905
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
...32-kernel-6.8-conftest_h-wait_on_bit_lock.patch | 46 +++++++
...d-0033-kernel-5.6-ioremap_nocache_removed.patch | 32 +++++
...mod-0034-kernel-5.9-dma_is_direct-removed.patch | 31 +++++
...prototype-for-nv_load_dma_map_scatterlist.patch | 29 +++++
...CPI_BUS_GET_DEVICE_PRESENT-in-conftest_sh.patch | 23 ++++
...-0037-add-RPM_CFLAGS-setup-in-conftest_sh.patch | 14 +++
...kmod-0038-workaround-NV_EFI_ENABLED-macro.patch | 13 ++
...-incompatible-function-type-nv_gpu_numa_c.patch | 33 +++++
...od-0040-fix-fallthrough-warning-nv_mmap_c.patch | 12 ++
...rototype-for-exercise_error_forwarding_va.patch | 13 ++
...NV_DO_GETTIMEOFDAY_PRESENT-in-conftest_sh.patch | 27 +++++
...ET_MEMORY_ARRAY_UC_PRESENT-in-conftest_sh.patch | 29 +++++
...CQUIRE_CONSOLE_SEM_PRESENT-in-conftest_sh.patch | 24 ++++
..._UNSAFE_FOLLOW_PFN_PRESENT-in-conftest_sh.patch | 24 ++++
...IFFIES_TO_TIMESPEC_PRESENT-in-conftest_sh.patch | 23 ++++
..._NPU2_INIT_CONTEXT_PRESENT-in-conftest_sh.patch | 27 +++++
...-0048-fix-atomic64-include-in-conftest_sh.patch | 17 +++
...0049-fix-dma_buf_map-renamed-to-iosys_map.patch | 19 +++
...ious-prototype-for-nv_pci_register_driver.patch | 12 ++
...otype-for-nvidia_init_exit_module-in-nv_c.patch | 20 ++++
...52-no-previous-prototype-for-on_nv_assert.patch | 13 ++
...53-no-previous-prototype-for-_raw_q_flush.patch | 13 ++
...revious-prototype-for-nv-ibmnpu-functions.patch | 14 +++
...revious-prototype-for-uvm_tools_init_exit.patch | 12 ++
...type-for-uvm8_test_set_prefetch_filtering.patch | 12 ++
...-no-previous-prototype-in-uvm8_va_space_c.patch | 13 ++
...-uvm_channel_manager_print_pending_pushes.patch | 13 ++
...-no-previous-prototype-in-uvm8_va_range_c.patch | 13 ++
...-previous-prototype-in-uvm8_range_group_c.patch | 37 ++++++
...prototype-in-uvm8_gpu_replayable_faults_c.patch | 12 ++
...-0062-no-previous-prototype-for-block_map.patch | 13 ++
...63-no-previous-prototype-for-try_get_ptes.patch | 13 ++
...o-previous-prototype-in-uvm8_pushbuffer_c.patch | 22 ++++
...o-previous-prototype-in-uvm8_kepler_mmu_c.patch | 12 ++
...o-previous-prototype-in-uvm8_pascal_mmu_c.patch | 12 ++
...us-prototype-for-parse_fault_entry_common.patch | 13 ++
...ype-in-uvm8_volta_access_counter_buffer_c.patch | 11 ++
...-for-va_block_set_read_duplication_locked.patch | 13 ++
...no-previous-prototype-for-map_rm_pt_range.patch | 13 ++
...previous-prototype-in-uvm8_user_channel_c.patch | 12 ++
...evious-prototype-in-uvm8_perf_thrashing_c.patch | 12 ++
...revious-prototype-in-uvm8_perf_prefetch_c.patch | 12 ++
...4-no-previous-prototype-for-test_tracking.patch | 13 ++
...evious-prototype-in-uvm8_page_tree_test_c.patch | 41 +++++++
...previous-prototype-in-uvm8_tracker_test_c.patch | 22 ++++
...no-previous-prototype-in-uvm8_push_test_c.patch | 22 ++++
...previous-prototype-in-uvm8_channel_test_c.patch | 46 +++++++
...vious-prototype-in-nvidia-modeset-linux_c.patch | 31 +++++
...vm_fault_access_type_t-in-uvm8_va_range_c.patch | 13 ++
...lt_type_t-in-uvm8_gpu_replayable_faults_c.patch | 22 ++++
...ype_t-in-uvm8_gpu_non_replayable_faults_c.patch | 13 ++
..._t-to-uvm_fault_type_t-in-uvm8_va_block_c.patch | 13 ++
...4-no-previous-prototype-in-nvlink_linux_c.patch | 11 ++
..._OBJECT_PUT_UNLOCK_PRESENT-in-conftest_sh.patch | 30 +++++
...OR_FUNCS_HAVE_MODE_IN_NAME-in-conftest_sh.patch | 24 ++++
...PRIMARY_MODE_GROUP_PRESENT-in-conftest_sh.patch | 26 ++++
...PER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch | 26 ++++
nvidia-390xx-kmod.spec | 133 +++++++++++++++++++--
58 files changed, 1255 insertions(+), 9 deletions(-)
---
diff --git a/nvidia-390xx-kmod-0032-kernel-6.8-conftest_h-wait_on_bit_lock.patch b/nvidia-390xx-kmod-0032-kernel-6.8-conftest_h-wait_on_bit_lock.patch
new file mode 100644
index 0000000..f4ed057
--- /dev/null
+++ b/nvidia-390xx-kmod-0032-kernel-6.8-conftest_h-wait_on_bit_lock.patch
@@ -0,0 +1,46 @@
+From f920ddf40d2df460ab822778117bcd06e3c0ba33 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= <nicolas.vieville(a)uphf.fr>
+Date: Mon, 8 Apr 2024 15:43:34 +0200
+Subject: [PATCH] Linux 6.8: conftest.h fix wait_on_bit_lock function not found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
+---
+ conftest.sh | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/conftest.sh b/conftest.sh
+index f00a42e..beaae93 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -2792,7 +2792,12 @@ compile_test() {
+ # 2014-07-07 743162013d40ca612b4cb53d3a200dff2d9ab26e
+ #
+ echo "$CONFTEST_PREAMBLE
++ #include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ #include <linux/wait.h>
++#else
++ #include <linux/wait_bit.h>
++#endif
+ void conftest_wait_on_bit_lock(void) {
+ wait_on_bit_lock(NULL, 0, 0);
+ }" > conftest$$.c
+@@ -2807,7 +2812,12 @@ compile_test() {
+ fi
+
+ echo "$CONFTEST_PREAMBLE
++ #include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ #include <linux/wait.h>
++#else
++ #include <linux/wait_bit.h>
++#endif
+ void conftest_wait_on_bit_lock(void) {
+ wait_on_bit_lock(NULL, 0, NULL, 0);
+ }" > conftest$$.c
+--
+2.44.0
+
diff --git a/nvidia-390xx-kmod-0033-kernel-5.6-ioremap_nocache_removed.patch b/nvidia-390xx-kmod-0033-kernel-5.6-ioremap_nocache_removed.patch
new file mode 100644
index 0000000..2ca6397
--- /dev/null
+++ b/nvidia-390xx-kmod-0033-kernel-5.6-ioremap_nocache_removed.patch
@@ -0,0 +1,32 @@
+From 78d25bd87d5ec4a509d37131defe100804afbf41 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= <nicolas.vieville(a)uphf.fr>
+Date: Mon, 8 Apr 2024 16:04:49 +0200
+Subject: [PATCH] Linux 5.6: nv-linux.h ioremap_nocache replaced with ioremap
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
+---
+ common/inc/nv-linux.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/common/inc/nv-linux.h b/common/inc/nv-linux.h
+index 2c4cb7b..295d5a8 100644
+--- a/common/inc/nv-linux.h
++++ b/common/inc/nv-linux.h
+@@ -565,7 +565,11 @@ static inline void *nv_ioremap(NvU64 phys, NvU64 size)
+ static inline void *nv_ioremap_nocache(NvU64 phys, NvU64 size)
+ {
+ #if defined(NV_IOREMAP_NOCACHE_PRESENT)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+ void *ptr = ioremap_nocache(phys, size);
++#else
++ void *ptr = ioremap(phys, size);
++#endif
+ #else
+ void *ptr = ioremap(phys, size);
+ #endif
+--
+2.44.0
+
diff --git a/nvidia-390xx-kmod-0034-kernel-5.9-dma_is_direct-removed.patch b/nvidia-390xx-kmod-0034-kernel-5.9-dma_is_direct-removed.patch
new file mode 100644
index 0000000..a0f6725
--- /dev/null
+++ b/nvidia-390xx-kmod-0034-kernel-5.9-dma_is_direct-removed.patch
@@ -0,0 +1,31 @@
+From c36f010b25237eda4919950f622f0a39ec5cf4c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= <nicolas.vieville(a)uphf.fr>
+Date: Mon, 8 Apr 2024 17:42:05 +0200
+Subject: [PATCH] Linux 5.9: nv-linux.h dma_is_direct no longer available
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
+---
+ common/inc/nv-linux.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/common/inc/nv-linux.h b/common/inc/nv-linux.h
+index 295d5a8..d35d064 100644
+--- a/common/inc/nv-linux.h
++++ b/common/inc/nv-linux.h
+@@ -1298,8 +1298,10 @@ static inline NvBool nv_is_dma_direct(struct device *dev)
+ NvBool is_direct = NV_FALSE;
+
+ #if defined(NV_DMA_IS_DIRECT_PRESENT)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ if (dma_is_direct(get_dma_ops(dev)))
+ is_direct = NV_TRUE;
++#endif
+ #endif
+
+ return is_direct;
+--
+2.44.0
+
diff --git a/nvidia-390xx-kmod-0035-gcc14-no-previous-prototype-for-nv_load_dma_map_scatterlist.patch b/nvidia-390xx-kmod-0035-gcc14-no-previous-prototype-for-nv_load_dma_map_scatterlist.patch
new file mode 100644
index 0000000..5c967d1
--- /dev/null
+++ b/nvidia-390xx-kmod-0035-gcc14-no-previous-prototype-for-nv_load_dma_map_scatterlist.patch
@@ -0,0 +1,29 @@
+From ed6fe9cb91526948f3de903d8ad866f2fda4ef91 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= <nicolas.vieville(a)uphf.fr>
+Date: Mon, 8 Apr 2024 17:48:38 +0200
+Subject: [PATCH] gcc14: no previous prototype for nv_load_dma_map_scatterlist
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
+---
+ nvidia/nv-dma.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nvidia/nv-dma.c b/nvidia/nv-dma.c
+index a06c12c..343e878 100644
+--- a/nvidia/nv-dma.c
++++ b/nvidia/nv-dma.c
+@@ -221,7 +221,7 @@ void nv_destroy_dma_map_scatterlist(nv_dma_map_t *dma_map)
+ os_free_mem(dma_map->mapping.discontig.submaps);
+ }
+
+-void nv_load_dma_map_scatterlist(
++static void nv_load_dma_map_scatterlist(
+ nv_dma_map_t *dma_map,
+ NvU64 *va_array
+ )
+--
+2.44.0
+
diff --git a/nvidia-390xx-kmod-0036-undef-NV_ACPI_BUS_GET_DEVICE_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0036-undef-NV_ACPI_BUS_GET_DEVICE_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..5631379
--- /dev/null
+++ b/nvidia-390xx-kmod-0036-undef-NV_ACPI_BUS_GET_DEVICE_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,23 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..96b289b 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -4451,12 +4451,13 @@ compile_test() {
+ # ("ACPI: bus: Eliminate acpi_bus_get_device()") in
+ # v5.18-rc2 (2022-04-05).
+ #
+- CODE="
++ #CODE="
+ #include <linux/acpi.h>
+- int conftest_acpi_bus_get_device(void) {
+- return acpi_bus_get_device();
+- }"
+- compile_check_conftest "$CODE" "NV_ACPI_BUS_GET_DEVICE_PRESENT" "" "functions"
++ #int conftest_acpi_bus_get_device(void) {
++ # return acpi_bus_get_device();
++ #}"
++ #compile_check_conftest "$CODE" "NV_ACPI_BUS_GET_DEVICE_PRESENT" "" "functions"
++ echo "#undef NV_ACPI_BUS_GET_DEVICE_PRESENT" | append_conftest "functions"
+ ;;
+
+ dma_resv_add_fence)
diff --git a/nvidia-390xx-kmod-0037-add-RPM_CFLAGS-setup-in-conftest_sh.patch b/nvidia-390xx-kmod-0037-add-RPM_CFLAGS-setup-in-conftest_sh.patch
new file mode 100644
index 0000000..d2d6265
--- /dev/null
+++ b/nvidia-390xx-kmod-0037-add-RPM_CFLAGS-setup-in-conftest_sh.patch
@@ -0,0 +1,14 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..3e69d19 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -154,6 +154,9 @@ build_cflags() {
+ BASE_CFLAGS="-O2 -D__KERNEL__ \
+ -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
+ -nostdinc -isystem $ISYSTEM"
++ if [ "x${RPM_CFLAGS}" != "x" ] ; then
++ BASE_CFLAGS="${BASE_CFLAGS} ${RPM_CFLAGS}"
++ fi
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+ OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
diff --git a/nvidia-390xx-kmod-0038-workaround-NV_EFI_ENABLED-macro.patch b/nvidia-390xx-kmod-0038-workaround-NV_EFI_ENABLED-macro.patch
new file mode 100644
index 0000000..b82de2d
--- /dev/null
+++ b/nvidia-390xx-kmod-0038-workaround-NV_EFI_ENABLED-macro.patch
@@ -0,0 +1,13 @@
+diff --git a/common/inc/nv-linux.h b/common/inc/nv-linux.h
+index d35d064..16c7fbe 100644
+--- a/common/inc/nv-linux.h
++++ b/common/inc/nv-linux.h
+@@ -220,7 +220,7 @@ static inline uid_t __kuid_val(kuid_t uid)
+ #error "NV_EFI_ENABLED_ARGUMENT_COUNT value unrecognized!"
+ #endif
+ #elif (defined(NV_EFI_ENABLED_PRESENT) || defined(efi_enabled))
+-#define NV_EFI_ENABLED() efi_enabled
++#define NV_EFI_ENABLED() efi_enabled(0)
+ #else
+ #define NV_EFI_ENABLED() 0
+ #endif
diff --git a/nvidia-390xx-kmod-0039-incompatible-function-type-nv_gpu_numa_c.patch b/nvidia-390xx-kmod-0039-incompatible-function-type-nv_gpu_numa_c.patch
new file mode 100644
index 0000000..847fdc4
--- /dev/null
+++ b/nvidia-390xx-kmod-0039-incompatible-function-type-nv_gpu_numa_c.patch
@@ -0,0 +1,33 @@
+diff --git a/nvidia/nv-gpu-numa.c b/nvidia/nv-gpu-numa.c
+index 7916d35..646cc0d 100644
+--- a/nvidia/nv-gpu-numa.c
++++ b/nvidia/nv-gpu-numa.c
+@@ -177,6 +177,19 @@ static int filldir_get_memblock_id(struct dir_context *ctx,
+ return 0;
+ }
+
++// Wrapper function to cast between incompatible function types from:
++// int (*)(struct dir_context *, const char *, int, loff_t, u64, unsigned int) to
++// bool (*)(struct dir_context *, const char *, int, loff_t, u64, unsigned int)
++static bool b_filldir_get_memblock_id(struct dir_context *ctx,
++ const char *name,
++ int name_len,
++ loff_t offset,
++ u64 ino,
++ unsigned int d_type)
++{
++ return filldir_get_memblock_id(ctx, name, name_len, offset, ino, d_type);
++}
++
+ /*
+ * Brings memory block online using the sysfs memory-hotplug interface
+ * https://www.kernel.org/doc/Documentation/memory-hotplug.txt
+@@ -229,7 +242,7 @@ static NV_STATUS gather_memblock_ids_for_node
+ char numa_file_path[BUF_SIZE];
+ struct file *filp;
+ int err;
+- nv_dir_context_t ats_ctx = { .ctx.actor = (filldir_t)filldir_get_memblock_id };
++ nv_dir_context_t ats_ctx = { .ctx.actor = (filldir_t)b_filldir_get_memblock_id };
+
+ memset(numa_file_path, 0, sizeof(numa_file_path));
+ sprintf(numa_file_path, "%s%d", NID_PATH, node_id);
diff --git a/nvidia-390xx-kmod-0040-fix-fallthrough-warning-nv_mmap_c.patch b/nvidia-390xx-kmod-0040-fix-fallthrough-warning-nv_mmap_c.patch
new file mode 100644
index 0000000..c6a7a04
--- /dev/null
+++ b/nvidia-390xx-kmod-0040-fix-fallthrough-warning-nv_mmap_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia/nv-mmap.c b/nvidia/nv-mmap.c
+index dcb8b89..b75b7a2 100644
+--- a/nvidia/nv-mmap.c
++++ b/nvidia/nv-mmap.c
+@@ -261,6 +261,7 @@ int nv_encode_caching(
+ case NV_MEMORY_CACHED:
+ if (NV_ALLOW_CACHING(memory_type))
+ break;
++ fallthrough;
+ default:
+ nv_printf(NV_DBG_ERRORS,
+ "NVRM: VM: cache type %d not supported for memory type %d!\n",
diff --git a/nvidia-390xx-kmod-0041-no-previous-prototype-for-exercise_error_forwarding_va.patch b/nvidia-390xx-kmod-0041-no-previous-prototype-for-exercise_error_forwarding_va.patch
new file mode 100644
index 0000000..3d0a137
--- /dev/null
+++ b/nvidia-390xx-kmod-0041-no-previous-prototype-for-exercise_error_forwarding_va.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia/nv-procfs.c b/nvidia/nv-procfs.c
+index 167b21f..aed7717 100644
+--- a/nvidia/nv-procfs.c
++++ b/nvidia/nv-procfs.c
+@@ -426,7 +426,7 @@ static nv_proc_ops_t nv_procfs_registry_fops = {
+ /*
+ * Forwards error to nv_log_error which exposes data to vendor callback
+ */
+-void
++static void
+ exercise_error_forwarding_va(
+ nv_state_t *nv,
+ NvU32 err,
diff --git a/nvidia-390xx-kmod-0042-undef-NV_DO_GETTIMEOFDAY_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0042-undef-NV_DO_GETTIMEOFDAY_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..f537faf
--- /dev/null
+++ b/nvidia-390xx-kmod-0042-undef-NV_DO_GETTIMEOFDAY_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,27 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..d4a190a 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -3717,16 +3717,17 @@ compile_test() {
+ # 97fc79f97b1111c80010d34ee66312b88f531e41 (2006-06-09) in v2.6.16,
+ # includes linux/time.h and/or linux/timekeeping.h.
+ #
+- CODE="
++ #CODE="
+ #include <linux/time.h>
+ #if defined(NV_LINUX_KTIME_H_PRESENT)
+ #include <linux/ktime.h>
+ #endif
+- void conftest_do_gettimeofday(void) {
+- do_gettimeofday();
+- }"
++ #void conftest_do_gettimeofday(void) {
++ # do_gettimeofday();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_DO_GETTIMEOFDAY_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_DO_GETTIMEOFDAY_PRESENT" "" "functions"
++ echo "#undef NV_DO_GETTIMEOFDAY_PRESENT" | append_conftest "functions"
+ ;;
+
+ drm_framebuffer_get)
diff --git a/nvidia-390xx-kmod-0043-undef-NV_SET_MEMORY_ARRAY_UC_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0043-undef-NV_SET_MEMORY_ARRAY_UC_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..1192db8
--- /dev/null
+++ b/nvidia-390xx-kmod-0043-undef-NV_SET_MEMORY_ARRAY_UC_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,29 @@
+index beaae93..9fa9c74 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -453,7 +453,7 @@ compile_test() {
+ #
+ # Determine if the set_memory_array_uc() function is present.
+ #
+- CODE="
++ #CODE="
+ #if defined(NV_ASM_SET_MEMORY_H_PRESENT)
+ #if defined(NV_ASM_PGTABLE_TYPES_H_PRESENT)
+ #include <asm/pgtable_types.h>
+@@ -462,11 +462,12 @@ compile_test() {
+ #else
+ #include <asm/cacheflush.h>
+ #endif
+- void conftest_set_memory_array_uc(void) {
+- set_memory_array_uc();
+- }"
++ #void conftest_set_memory_array_uc(void) {
++ # set_memory_array_uc();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_SET_MEMORY_ARRAY_UC_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_SET_MEMORY_ARRAY_UC_PRESENT" "" "functions"
++ echo "#undef NV_SET_MEMORY_ARRAY_UC_PRESENT" | append_conftest "functions"
+ ;;
+
+ sysfs_slab_unlink)
diff --git a/nvidia-390xx-kmod-0044-undef-NV_ACQUIRE_CONSOLE_SEM_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0044-undef-NV_ACQUIRE_CONSOLE_SEM_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..1217f00
--- /dev/null
+++ b/nvidia-390xx-kmod-0044-undef-NV_ACQUIRE_CONSOLE_SEM_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,24 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..59a3985 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -895,13 +895,14 @@ compile_test() {
+ # Determine if the acquire_console_sem() function
+ # is present.
+ #
+- CODE="
++ #CODE="
+ #include <linux/console.h>
+- void conftest_acquire_console_sem(void) {
+- acquire_console_sem(NULL);
+- }"
++ #void conftest_acquire_console_sem(void) {
++ # acquire_console_sem(NULL);
++ #}"
+
+- compile_check_conftest "$CODE" "NV_ACQUIRE_CONSOLE_SEM_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_ACQUIRE_CONSOLE_SEM_PRESENT" "" "functions"
++ echo "#undef NV_ACQUIRE_CONSOLE_SEM_PRESENT" | append_conftest "functions"
+ ;;
+
+ console_lock)
diff --git a/nvidia-390xx-kmod-0045-undef-NV_UNSAFE_FOLLOW_PFN_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0045-undef-NV_UNSAFE_FOLLOW_PFN_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..43bdd16
--- /dev/null
+++ b/nvidia-390xx-kmod-0045-undef-NV_UNSAFE_FOLLOW_PFN_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,24 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..e06b27e 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -4380,13 +4380,14 @@ compile_test() {
+ # unsafe_follow_pfn() was added by commit 69bacee7f9ad
+ # ("mm: Add unsafe_follow_pfn") in v5.13-rc1.
+ #
+- CODE="
++ #CODE="
+ #include <linux/mm.h>
+- void conftest_unsafe_follow_pfn(void) {
+- unsafe_follow_pfn();
+- }"
++ #void conftest_unsafe_follow_pfn(void) {
++ # unsafe_follow_pfn();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_UNSAFE_FOLLOW_PFN_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_UNSAFE_FOLLOW_PFN_PRESENT" "" "functions"
++ echo "#undef NV_UNSAFE_FOLLOW_PFN_PRESENT" | append_conftest "functions"
+ ;;
+
+ drm_plane_atomic_check_has_atomic_state_arg)
diff --git a/nvidia-390xx-kmod-0046-undef-NV_JIFFIES_TO_TIMESPEC_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0046-undef-NV_JIFFIES_TO_TIMESPEC_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..3f17a37
--- /dev/null
+++ b/nvidia-390xx-kmod-0046-undef-NV_JIFFIES_TO_TIMESPEC_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,23 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..289c0c1 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -2542,12 +2542,13 @@ compile_test() {
+ # removed by commit 751addac78b6
+ # ("y2038: remove obsolete jiffies conversion functions")
+ # in v5.6-rc1 (2019-12-13).
+- CODE="
++ #CODE="
+ #include <linux/jiffies.h>
+- void conftest_jiffies_to_timespec(void){
+- jiffies_to_timespec();
+- }"
+- compile_check_conftest "$CODE" "NV_JIFFIES_TO_TIMESPEC_PRESENT" "" "functions"
++ #void conftest_jiffies_to_timespec(void){
++ # jiffies_to_timespec();
++ #}"
++ # compile_check_conftest "$CODE" "NV_JIFFIES_TO_TIMESPEC_PRESENT" "" "functions"
++ echo "#undef NV_JIFFIES_TO_TIMESPEC_PRESENT" | append_conftest "functions"
+ ;;
+
+ drm_init_function_args)
diff --git a/nvidia-390xx-kmod-0047-undef-NV_PNV_NPU2_INIT_CONTEXT_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0047-undef-NV_PNV_NPU2_INIT_CONTEXT_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..316ae7c
--- /dev/null
+++ b/nvidia-390xx-kmod-0047-undef-NV_PNV_NPU2_INIT_CONTEXT_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,27 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..386faf4 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -3312,16 +3312,17 @@ compile_test() {
+ # Determine if the pnv_npu2_init_context() function is
+ # present.
+ #
+- CODE="
++ #CODE="
+ #if defined(NV_ASM_POWERNV_H_PRESENT)
+ #include <linux/pci.h>
+ #include <asm/powernv.h>
+ #endif
+- void conftest_pnv_npu2_init_context(void) {
+- pnv_npu2_init_context();
+- }"
++ #void conftest_pnv_npu2_init_context(void) {
++ # pnv_npu2_init_context();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_PNV_NPU2_INIT_CONTEXT_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_PNV_NPU2_INIT_CONTEXT_PRESENT" "" "functions"
++ echo "#undef NV_PNV_NPU2_INIT_CONTEXT_PRESENT" | append_conftest "functions"
+ ;;
+
+ drm_driver_unload_has_int_return_type)
diff --git a/nvidia-390xx-kmod-0048-fix-atomic64-include-in-conftest_sh.patch b/nvidia-390xx-kmod-0048-fix-atomic64-include-in-conftest_sh.patch
new file mode 100644
index 0000000..177798a
--- /dev/null
+++ b/nvidia-390xx-kmod-0048-fix-atomic64-include-in-conftest_sh.patch
@@ -0,0 +1,17 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..b3865af 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -1906,7 +1906,11 @@ compile_test() {
+ atomic64_type)
+ # Determine if atomic64_t and associated functions are defined
+ CODE="
+- #include <asm/atomic.h>
++ #include <linux/init.h>
++ #include <linux/bug.h>
++ #include <linux/kernel.h>
++ #include <linux/atomic.h>
++ #include <linux/module.h>
+ void conftest_atomic64(void) {
+ atomic64_t data;
+ atomic64_read(&data);
diff --git a/nvidia-390xx-kmod-0049-fix-dma_buf_map-renamed-to-iosys_map.patch b/nvidia-390xx-kmod-0049-fix-dma_buf_map-renamed-to-iosys_map.patch
new file mode 100644
index 0000000..c13cabf
--- /dev/null
+++ b/nvidia-390xx-kmod-0049-fix-dma_buf_map-renamed-to-iosys_map.patch
@@ -0,0 +1,19 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..6a465ef 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -4371,8 +4371,13 @@ compile_test() {
+ #
+ CODE="
+ #include <drm/drm_gem.h>
++ #if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
++ typedef struct iosys_map nv_sysio_map_t;
++ #else
++ typedef struct dma_buf_map nv_sysio_map_t;
++ #endif
+ int conftest_drm_gem_object_vmap_has_map_arg(
+- struct drm_gem_object *obj, struct dma_buf_map *map) {
++ struct drm_gem_object *obj, nv_sysio_map_t *map) {
+ return obj->funcs->vmap(obj, map);
+ }"
+
diff --git a/nvidia-390xx-kmod-0050-no-previous-prototype-for-nv_pci_register_driver.patch b/nvidia-390xx-kmod-0050-no-previous-prototype-for-nv_pci_register_driver.patch
new file mode 100644
index 0000000..19e060a
--- /dev/null
+++ b/nvidia-390xx-kmod-0050-no-previous-prototype-for-nv_pci_register_driver.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia/nv-instance.c b/nvidia/nv-instance.c
+index 33d39c2..2ebc0f5 100644
+--- a/nvidia/nv-instance.c
++++ b/nvidia/nv-instance.c
+@@ -13,6 +13,7 @@
+ #include "nv-linux.h"
+ #include "nv-frontend.h"
+ #include "nv-pci-table.h"
++#include "nv-instance.h"
+
+ #define MODULE_BASE_NAME "nvidia"
+ #define MODULE_INSTANCE_NUMBER 0
diff --git a/nvidia-390xx-kmod-0051-no-previous-prototype-for-nvidia_init_exit_module-in-nv_c.patch b/nvidia-390xx-kmod-0051-no-previous-prototype-for-nvidia_init_exit_module-in-nv_c.patch
new file mode 100644
index 0000000..f5646c5
--- /dev/null
+++ b/nvidia-390xx-kmod-0051-no-previous-prototype-for-nvidia_init_exit_module-in-nv_c.patch
@@ -0,0 +1,20 @@
+diff --git a/nvidia/nv.c b/nvidia/nv.c
+index ad64e88..ef655d5 100644
+--- a/nvidia/nv.c
++++ b/nvidia/nv.c
+@@ -768,6 +768,7 @@ int nv_verify_cpa_interface(void)
+ }
+ #endif /* defined(NV_CHANGE_PAGE_ATTR_BUG_PRESENT) */
+
++int __init nvidia_init_module(void);
+ int __init nvidia_init_module(void)
+ {
+ NV_STATUS status;
+@@ -1165,6 +1166,7 @@ failed6:
+ return rc;
+ }
+
++void nvidia_exit_module(void);
+ void nvidia_exit_module(void)
+ {
+ nvidia_stack_t *sp = __nv_init_sp;
diff --git a/nvidia-390xx-kmod-0052-no-previous-prototype-for-on_nv_assert.patch b/nvidia-390xx-kmod-0052-no-previous-prototype-for-on_nv_assert.patch
new file mode 100644
index 0000000..c92c5d2
--- /dev/null
+++ b/nvidia-390xx-kmod-0052-no-previous-prototype-for-on_nv_assert.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia/nv-kthread-q-selftest.c b/nvidia/nv-kthread-q-selftest.c
+index a8db326..61f01fb 100644
+--- a/nvidia/nv-kthread-q-selftest.c
++++ b/nvidia/nv-kthread-q-selftest.c
+@@ -71,7 +71,7 @@
+ #define NUM_Q_ITEMS_IN_MULTITHREAD_TEST (NUM_TEST_Q_ITEMS * NUM_TEST_KTHREADS)
+
+ // This exists in order to have a function to place a breakpoint on:
+-void on_nvq_assert(void)
++static void on_nvq_assert(void)
+ {
+ (void)NULL;
+ }
diff --git a/nvidia-390xx-kmod-0053-no-previous-prototype-for-_raw_q_flush.patch b/nvidia-390xx-kmod-0053-no-previous-prototype-for-_raw_q_flush.patch
new file mode 100644
index 0000000..9871851
--- /dev/null
+++ b/nvidia-390xx-kmod-0053-no-previous-prototype-for-_raw_q_flush.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia/nv-kthread-q.c b/nvidia/nv-kthread-q.c
+index 9c475b7..6e4e8a3 100644
+--- a/nvidia/nv-kthread-q.c
++++ b/nvidia/nv-kthread-q.c
+@@ -241,7 +241,7 @@ static void _q_flush_function(void *args)
+ }
+
+
+-void _raw_q_flush(nv_kthread_q_t *q)
++static void _raw_q_flush(nv_kthread_q_t *q)
+ {
+ nv_kthread_q_item_t q_item;
+ DECLARE_COMPLETION(completion);
diff --git a/nvidia-390xx-kmod-0054-no-previous-prototype-for-nv-ibmnpu-functions.patch b/nvidia-390xx-kmod-0054-no-previous-prototype-for-nv-ibmnpu-functions.patch
new file mode 100644
index 0000000..d08dec5
--- /dev/null
+++ b/nvidia-390xx-kmod-0054-no-previous-prototype-for-nv-ibmnpu-functions.patch
@@ -0,0 +1,14 @@
+diff --git a/nvidia/nv-ibmnpu.c b/nvidia/nv-ibmnpu.c
+index 50503e1..545d261 100644
+--- a/nvidia/nv-ibmnpu.c
++++ b/nvidia/nv-ibmnpu.c
+@@ -26,8 +26,8 @@
+ */
+ #include "nv-linux.h"
+
+-#if defined(NVCPU_PPC64LE)
+ #include "nv-ibmnpu.h"
++#if defined(NVCPU_PPC64LE)
+
+ #include "nvlink_common.h"
+ #include "nvlink_errors.h"
diff --git a/nvidia-390xx-kmod-0055-no-previous-prototype-for-uvm_tools_init_exit.patch b/nvidia-390xx-kmod-0055-no-previous-prototype-for-uvm_tools_init_exit.patch
new file mode 100644
index 0000000..b13524a
--- /dev/null
+++ b/nvidia-390xx-kmod-0055-no-previous-prototype-for-uvm_tools_init_exit.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_tools.c b/nvidia-uvm/uvm8_tools.c
+index ea52194..e1b72c3 100644
+--- a/nvidia-uvm/uvm8_tools.c
++++ b/nvidia-uvm/uvm8_tools.c
+@@ -33,6 +33,7 @@
+ #include "uvm8_forward_decl.h"
+ #include "uvm8_range_group.h"
+ #include "uvm8_mem.h"
++#include "uvm8_tools_init.h"
+
+ // We limit the number of times a page can be retained by the kernel
+ // to prevent the user from maliciously passing UVM tools the same page
diff --git a/nvidia-390xx-kmod-0056-no-previous-prototype-for-uvm8_test_set_prefetch_filtering.patch b/nvidia-390xx-kmod-0056-no-previous-prototype-for-uvm8_test_set_prefetch_filtering.patch
new file mode 100644
index 0000000..c1b2a99
--- /dev/null
+++ b/nvidia-390xx-kmod-0056-no-previous-prototype-for-uvm8_test_set_prefetch_filtering.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_gpu.c b/nvidia-uvm/uvm8_gpu.c
+index 775dd09..66e2148 100644
+--- a/nvidia-uvm/uvm8_gpu.c
++++ b/nvidia-uvm/uvm8_gpu.c
+@@ -38,6 +38,7 @@
+ #include "ctrl2080mc.h"
+ #include "nv-kthread-q.h"
+ #include "uvm8_gpu_access_counters.h"
++#include "uvm8_test.h"
+
+ int uvm8_ats_mode = 0;
+ module_param(uvm8_ats_mode, int, S_IRUGO);
diff --git a/nvidia-390xx-kmod-0057-no-previous-prototype-in-uvm8_va_space_c.patch b/nvidia-390xx-kmod-0057-no-previous-prototype-in-uvm8_va_space_c.patch
new file mode 100644
index 0000000..c2584df
--- /dev/null
+++ b/nvidia-390xx-kmod-0057-no-previous-prototype-in-uvm8_va_space_c.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_va_space.c b/nvidia-uvm/uvm8_va_space.c
+index 42b7bb9..0744d6b 100644
+--- a/nvidia-uvm/uvm8_va_space.c
++++ b/nvidia-uvm/uvm8_va_space.c
+@@ -34,6 +34,8 @@
+ #include "uvm_common.h"
+ #include "nv_uvm_interface.h"
+ #include "nv-kthread-q.h"
++#include "uvm8_api.h"
++#include "uvm8_test.h"
+
+ static NV_STATUS enable_peers(uvm_va_space_t *va_space, uvm_gpu_t *gpu_1, uvm_gpu_t *gpu_2);
+ static void disable_peers(uvm_va_space_t *va_space,
diff --git a/nvidia-390xx-kmod-0058-no-previous-prototype-for-uvm_channel_manager_print_pending_pushes.patch b/nvidia-390xx-kmod-0058-no-previous-prototype-for-uvm_channel_manager_print_pending_pushes.patch
new file mode 100644
index 0000000..d7d87fa
--- /dev/null
+++ b/nvidia-390xx-kmod-0058-no-previous-prototype-for-uvm_channel_manager_print_pending_pushes.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_channel.c b/nvidia-uvm/uvm8_channel.c
+index ed52910..7edede9 100644
+--- a/nvidia-uvm/uvm8_channel.c
++++ b/nvidia-uvm/uvm8_channel.c
+@@ -1137,7 +1137,7 @@ void uvm_channel_print_pending_pushes(uvm_channel_t *channel)
+ channel_print_pushes(channel, 0, NULL);
+ }
+
+-void uvm_channel_manager_print_pending_pushes(uvm_channel_manager_t *manager, struct seq_file *seq)
++static void uvm_channel_manager_print_pending_pushes(uvm_channel_manager_t *manager, struct seq_file *seq)
+ {
+ uvm_channel_t *channel;
+
diff --git a/nvidia-390xx-kmod-0059-no-previous-prototype-in-uvm8_va_range_c.patch b/nvidia-390xx-kmod-0059-no-previous-prototype-in-uvm8_va_range_c.patch
new file mode 100644
index 0000000..ed35a16
--- /dev/null
+++ b/nvidia-390xx-kmod-0059-no-previous-prototype-in-uvm8_va_range_c.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_va_range.c b/nvidia-uvm/uvm8_va_range.c
+index a1fb44c..9e47e40 100644
+--- a/nvidia-uvm/uvm8_va_range.c
++++ b/nvidia-uvm/uvm8_va_range.c
+@@ -559,7 +559,7 @@ NV_STATUS uvm_va_range_add_gpu_va_space(uvm_va_range_t *va_range, uvm_gpu_va_spa
+ }
+ }
+
+-void uvm_va_range_remove_gpu_va_space_managed(uvm_va_range_t *va_range, uvm_gpu_va_space_t *gpu_va_space)
++static void uvm_va_range_remove_gpu_va_space_managed(uvm_va_range_t *va_range, uvm_gpu_va_space_t *gpu_va_space)
+ {
+ uvm_va_block_t *va_block;
+ uvm_va_space_t *va_space = va_range->va_space;
diff --git a/nvidia-390xx-kmod-0060-no-previous-prototype-in-uvm8_range_group_c.patch b/nvidia-390xx-kmod-0060-no-previous-prototype-in-uvm8_range_group_c.patch
new file mode 100644
index 0000000..40a492c
--- /dev/null
+++ b/nvidia-390xx-kmod-0060-no-previous-prototype-in-uvm8_range_group_c.patch
@@ -0,0 +1,37 @@
+diff --git a/nvidia-uvm/uvm8_range_group.c b/nvidia-uvm/uvm8_range_group.c
+index 307aaa2..19760b3 100644
+--- a/nvidia-uvm/uvm8_range_group.c
++++ b/nvidia-uvm/uvm8_range_group.c
+@@ -29,6 +29,7 @@
+ #include "uvm_ioctl.h"
+ #include "uvmtypes.h"
+ #include "uvm8_api.h"
++#include "uvm8_test.h"
+
+ static struct kmem_cache *g_uvm_range_group_cache __read_mostly;
+ static struct kmem_cache *g_uvm_range_group_range_cache __read_mostly;
+@@ -506,13 +507,13 @@ static uvm_range_group_range_t *range_group_range_container(uvm_range_tree_node_
+ return container_of(node, uvm_range_group_range_t, node);
+ }
+
+-uvm_range_group_range_t *uvm_range_group_range_prev(uvm_va_space_t *va_space, uvm_range_group_range_t *range)
++static uvm_range_group_range_t *uvm_range_group_range_prev(uvm_va_space_t *va_space, uvm_range_group_range_t *range)
+ {
+ uvm_range_tree_node_t *node = uvm_range_tree_prev(&va_space->range_group_ranges, &range->node);
+ return range_group_range_container(node);
+ }
+
+-uvm_range_group_range_t *uvm_range_group_range_next(uvm_va_space_t *va_space, uvm_range_group_range_t *range)
++static uvm_range_group_range_t *uvm_range_group_range_next(uvm_va_space_t *va_space, uvm_range_group_range_t *range)
+ {
+ uvm_range_tree_node_t *node = uvm_range_tree_next(&va_space->range_group_ranges, &range->node);
+ return range_group_range_container(node);
+@@ -664,7 +665,7 @@ uvm_range_group_range_t *uvm_range_group_range_iter_next(uvm_va_space_t *va_spac
+ return range_group_range_container(node);
+ }
+
+-void range_group_range_iter_advance(uvm_range_group_range_iter_t *iter, NvU64 end)
++static void range_group_range_iter_advance(uvm_range_group_range_iter_t *iter, NvU64 end)
+ {
+ if (iter->node == NULL) {
+ iter->end = end;
diff --git a/nvidia-390xx-kmod-0061-no-previous-prototype-in-uvm8_gpu_replayable_faults_c.patch b/nvidia-390xx-kmod-0061-no-previous-prototype-in-uvm8_gpu_replayable_faults_c.patch
new file mode 100644
index 0000000..cf51822
--- /dev/null
+++ b/nvidia-390xx-kmod-0061-no-previous-prototype-in-uvm8_gpu_replayable_faults_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_gpu_replayable_faults.c b/nvidia-uvm/uvm8_gpu_replayable_faults.c
+index f2279b6..9e1f468 100644
+--- a/nvidia-uvm/uvm8_gpu_replayable_faults.c
++++ b/nvidia-uvm/uvm8_gpu_replayable_faults.c
+@@ -35,6 +35,7 @@
+ #include "uvm8_procfs.h"
+ #include "uvm8_perf_thrashing.h"
+ #include "uvm8_gpu_non_replayable_faults.h"
++#include "uvm8_test.h"
+
+ // TODO: Bug 1881601: [uvm] Add fault handling overview for replayable and
+ // non-replayable faults
diff --git a/nvidia-390xx-kmod-0062-no-previous-prototype-for-block_map.patch b/nvidia-390xx-kmod-0062-no-previous-prototype-for-block_map.patch
new file mode 100644
index 0000000..01e6549
--- /dev/null
+++ b/nvidia-390xx-kmod-0062-no-previous-prototype-for-block_map.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_va_block.c b/nvidia-uvm/uvm8_va_block.c
+index be6d873..6319251 100644
+--- a/nvidia-uvm/uvm8_va_block.c
++++ b/nvidia-uvm/uvm8_va_block.c
+@@ -6521,7 +6521,7 @@ static void map_get_allowed_destinations(uvm_va_block_t *block,
+ uvm_processor_mask_and(allowed_mask, allowed_mask, &va_space->can_access[id]);
+ }
+
+-NV_STATUS block_map(uvm_va_block_t *va_block,
++static NV_STATUS block_map(uvm_va_block_t *va_block,
+ uvm_va_block_context_t *va_block_context,
+ uvm_processor_id_t id,
+ uvm_va_block_region_t region,
diff --git a/nvidia-390xx-kmod-0063-no-previous-prototype-for-try_get_ptes.patch b/nvidia-390xx-kmod-0063-no-previous-prototype-for-try_get_ptes.patch
new file mode 100644
index 0000000..f086fd5
--- /dev/null
+++ b/nvidia-390xx-kmod-0063-no-previous-prototype-for-try_get_ptes.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_mmu.c b/nvidia-uvm/uvm8_mmu.c
+index 2b90a3c..86518f5 100644
+--- a/nvidia-uvm/uvm8_mmu.c
++++ b/nvidia-uvm/uvm8_mmu.c
+@@ -695,7 +695,7 @@ NV_STATUS uvm_page_tree_wait(uvm_page_tree_t *tree)
+ return status;
+ }
+
+-NV_STATUS try_get_ptes(uvm_page_tree_t *tree,
++static NV_STATUS try_get_ptes(uvm_page_tree_t *tree,
+ NvU32 page_size,
+ NvU64 start,
+ NvLength size,
diff --git a/nvidia-390xx-kmod-0064-no-previous-prototype-in-uvm8_pushbuffer_c.patch b/nvidia-390xx-kmod-0064-no-previous-prototype-in-uvm8_pushbuffer_c.patch
new file mode 100644
index 0000000..53c05a7
--- /dev/null
+++ b/nvidia-390xx-kmod-0064-no-previous-prototype-in-uvm8_pushbuffer_c.patch
@@ -0,0 +1,22 @@
+diff --git a/nvidia-uvm/uvm8_pushbuffer.c b/nvidia-uvm/uvm8_pushbuffer.c
+index 3007f00..8eb686b 100644
+--- a/nvidia-uvm/uvm8_pushbuffer.c
++++ b/nvidia-uvm/uvm8_pushbuffer.c
+@@ -109,7 +109,7 @@ error:
+ return status;
+ }
+
+-NvLength uvm_pushbuffer_get_size(uvm_pushbuffer_t *pushbuffer)
++static NvLength uvm_pushbuffer_get_size(uvm_pushbuffer_t *pushbuffer)
+ {
+ return pushbuffer->memory->size;
+ }
+@@ -210,7 +210,7 @@ static NvU32 *chunk_get_next_push_start_addr(uvm_pushbuffer_t *pushbuffer, uvm_p
+ return (NvU32*)push_start;
+ }
+
+-void uvm_pushbuffer_update_progress(uvm_pushbuffer_t *pushbuffer)
++static void uvm_pushbuffer_update_progress(uvm_pushbuffer_t *pushbuffer)
+ {
+ uvm_channel_manager_update_progress(pushbuffer->channel_manager);
+ }
diff --git a/nvidia-390xx-kmod-0065-no-previous-prototype-in-uvm8_kepler_mmu_c.patch b/nvidia-390xx-kmod-0065-no-previous-prototype-in-uvm8_kepler_mmu_c.patch
new file mode 100644
index 0000000..c2b084b
--- /dev/null
+++ b/nvidia-390xx-kmod-0065-no-previous-prototype-in-uvm8_kepler_mmu_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_kepler_mmu.c b/nvidia-uvm/uvm8_kepler_mmu.c
+index ba46019..c9a1660 100644
+--- a/nvidia-uvm/uvm8_kepler_mmu.c
++++ b/nvidia-uvm/uvm8_kepler_mmu.c
+@@ -40,6 +40,7 @@
+ #include "uvm8_mmu.h"
+ #include "uvm8_push_macros.h"
+ #include "hwref/kepler/gk104/dev_mmu.h"
++#include "uvm8_hal.h"
+
+ #define MMU_BIG 0
+ #define MMU_SMALL 1
diff --git a/nvidia-390xx-kmod-0066-no-previous-prototype-in-uvm8_pascal_mmu_c.patch b/nvidia-390xx-kmod-0066-no-previous-prototype-in-uvm8_pascal_mmu_c.patch
new file mode 100644
index 0000000..1a46377
--- /dev/null
+++ b/nvidia-390xx-kmod-0066-no-previous-prototype-in-uvm8_pascal_mmu_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_pascal_mmu.c b/nvidia-uvm/uvm8_pascal_mmu.c
+index b3bf7b6..5719fa4 100644
+--- a/nvidia-uvm/uvm8_pascal_mmu.c
++++ b/nvidia-uvm/uvm8_pascal_mmu.c
+@@ -38,6 +38,7 @@
+ #include "uvm8_push_macros.h"
+ #include "hwref/pascal/gp100/dev_fb.h"
+ #include "hwref/pascal/gp100/dev_mmu.h"
++#include "uvm8_hal.h"
+
+ #define MMU_BIG 0
+ #define MMU_SMALL 1
diff --git a/nvidia-390xx-kmod-0067-no-previous-prototype-for-parse_fault_entry_common.patch b/nvidia-390xx-kmod-0067-no-previous-prototype-for-parse_fault_entry_common.patch
new file mode 100644
index 0000000..cacc3af
--- /dev/null
+++ b/nvidia-390xx-kmod-0067-no-previous-prototype-for-parse_fault_entry_common.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_volta_fault_buffer.c b/nvidia-uvm/uvm8_volta_fault_buffer.c
+index 5ab6a81..b85352e 100644
+--- a/nvidia-uvm/uvm8_volta_fault_buffer.c
++++ b/nvidia-uvm/uvm8_volta_fault_buffer.c
+@@ -351,7 +351,7 @@ static NvU32 *get_fault_buffer_entry(uvm_gpu_t *gpu, NvU32 index)
+ return fault_entry;
+ }
+
+-void parse_fault_entry_common(uvm_gpu_t *gpu, NvU32 *fault_entry, uvm_fault_buffer_entry_t *buffer_entry)
++static void parse_fault_entry_common(uvm_gpu_t *gpu, NvU32 *fault_entry, uvm_fault_buffer_entry_t *buffer_entry)
+ {
+ NV_STATUS status;
+ NvU64 addr_hi, addr_lo;
diff --git a/nvidia-390xx-kmod-0068-no-previous-prototype-in-uvm8_volta_access_counter_buffer_c.patch b/nvidia-390xx-kmod-0068-no-previous-prototype-in-uvm8_volta_access_counter_buffer_c.patch
new file mode 100644
index 0000000..ef870a2
--- /dev/null
+++ b/nvidia-390xx-kmod-0068-no-previous-prototype-in-uvm8_volta_access_counter_buffer_c.patch
@@ -0,0 +1,11 @@
+index 992cca5..3fedfc2 100644
+--- a/nvidia-uvm/uvm8_volta_access_counter_buffer.c
++++ b/nvidia-uvm/uvm8_volta_access_counter_buffer.c
+@@ -25,6 +25,7 @@
+ #include "uvm8_gpu.h"
+ #include "clc365.h"
+ #include "uvm8_volta_fault_buffer.h"
++#include "uvm8_hal.h"
+
+ typedef struct {
+ NvU8 bufferEntry[NVC365_NOTIFY_BUF_SIZE];
diff --git a/nvidia-390xx-kmod-0069-no-previous-prototype-for-va_block_set_read_duplication_locked.patch b/nvidia-390xx-kmod-0069-no-previous-prototype-for-va_block_set_read_duplication_locked.patch
new file mode 100644
index 0000000..50d4022
--- /dev/null
+++ b/nvidia-390xx-kmod-0069-no-previous-prototype-for-va_block_set_read_duplication_locked.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_policy.c b/nvidia-uvm/uvm8_policy.c
+index 03b1a90..eb3523c 100644
+--- a/nvidia-uvm/uvm8_policy.c
++++ b/nvidia-uvm/uvm8_policy.c
+@@ -354,7 +354,7 @@ NV_STATUS uvm_api_unset_accessed_by(UVM_UNSET_ACCESSED_BY_PARAMS *params, struct
+ return accessed_by_set(va_space, params->requestedBase, params->length, ¶ms->accessedByUuid, false);
+ }
+
+-NV_STATUS va_block_set_read_duplication_locked(uvm_va_block_t *va_block,
++static NV_STATUS va_block_set_read_duplication_locked(uvm_va_block_t *va_block,
+ uvm_va_block_retry_t *va_block_retry,
+ uvm_va_block_context_t *va_block_context)
+ {
diff --git a/nvidia-390xx-kmod-0070-no-previous-prototype-for-map_rm_pt_range.patch b/nvidia-390xx-kmod-0070-no-previous-prototype-for-map_rm_pt_range.patch
new file mode 100644
index 0000000..866daa9
--- /dev/null
+++ b/nvidia-390xx-kmod-0070-no-previous-prototype-for-map_rm_pt_range.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_map_external.c b/nvidia-uvm/uvm8_map_external.c
+index 67620a2..df5e8bd 100644
+--- a/nvidia-uvm/uvm8_map_external.c
++++ b/nvidia-uvm/uvm8_map_external.c
+@@ -275,7 +275,7 @@ static NV_STATUS copy_ptes(uvm_page_tree_t *tree,
+ //
+ // If the mapped range ends on va_range->node.end, a TLB invalidate for upgrade
+ // is also issued.
+-NV_STATUS map_rm_pt_range(uvm_va_range_t *va_range,
++static NV_STATUS map_rm_pt_range(uvm_va_range_t *va_range,
+ uvm_page_tree_t *tree,
+ uvm_page_table_range_t *pt_range,
+ uvm_pte_buffer_t *pte_buffer,
diff --git a/nvidia-390xx-kmod-0071-no-previous-prototype-in-uvm8_user_channel_c.patch b/nvidia-390xx-kmod-0071-no-previous-prototype-in-uvm8_user_channel_c.patch
new file mode 100644
index 0000000..c327e0b
--- /dev/null
+++ b/nvidia-390xx-kmod-0071-no-previous-prototype-in-uvm8_user_channel_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_user_channel.c b/nvidia-uvm/uvm8_user_channel.c
+index e8906f9..7e2d30a 100644
+--- a/nvidia-uvm/uvm8_user_channel.c
++++ b/nvidia-uvm/uvm8_user_channel.c
+@@ -36,6 +36,7 @@
+ #include "uvm8_map_external.h"
+ #include "uvm8_init.h"
+ #include "nv_uvm_interface.h"
++#include "uvm8_test.h"
+
+ #include <linux/sort.h>
+
diff --git a/nvidia-390xx-kmod-0072-no-previous-prototype-in-uvm8_perf_thrashing_c.patch b/nvidia-390xx-kmod-0072-no-previous-prototype-in-uvm8_perf_thrashing_c.patch
new file mode 100644
index 0000000..0fba389
--- /dev/null
+++ b/nvidia-390xx-kmod-0072-no-previous-prototype-in-uvm8_perf_thrashing_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_perf_thrashing.c b/nvidia-uvm/uvm8_perf_thrashing.c
+index 0ed3b18..5d47b0e 100644
+--- a/nvidia-uvm/uvm8_perf_thrashing.c
++++ b/nvidia-uvm/uvm8_perf_thrashing.c
+@@ -29,6 +29,7 @@
+ #include "uvm8_va_range.h"
+ #include "uvm8_kvmalloc.h"
+ #include "uvm8_tools.h"
++#include "uvm8_test.h"
+
+ // Number of bits for page-granularity time stamps. Currently we ignore the first 6 bits
+ // of the timestamp (i.e. we have 64ns resolution, which is good enough)
diff --git a/nvidia-390xx-kmod-0073-no-previous-prototype-in-uvm8_perf_prefetch_c.patch b/nvidia-390xx-kmod-0073-no-previous-prototype-in-uvm8_perf_prefetch_c.patch
new file mode 100644
index 0000000..7014485
--- /dev/null
+++ b/nvidia-390xx-kmod-0073-no-previous-prototype-in-uvm8_perf_prefetch_c.patch
@@ -0,0 +1,12 @@
+diff --git a/nvidia-uvm/uvm8_perf_prefetch.c b/nvidia-uvm/uvm8_perf_prefetch.c
+index 4f390ee..8206d63 100644
+--- a/nvidia-uvm/uvm8_perf_prefetch.c
++++ b/nvidia-uvm/uvm8_perf_prefetch.c
+@@ -28,6 +28,7 @@
+ #include "uvm8_kvmalloc.h"
+ #include "uvm8_va_block.h"
+ #include "uvm8_va_range.h"
++#include "uvm8_test.h"
+
+ // Global cache to allocate the per-VA block prefetch detection structures
+ static struct kmem_cache *g_prefetch_info_cache __read_mostly;
diff --git a/nvidia-390xx-kmod-0074-no-previous-prototype-for-test_tracking.patch b/nvidia-390xx-kmod-0074-no-previous-prototype-for-test_tracking.patch
new file mode 100644
index 0000000..d721d83
--- /dev/null
+++ b/nvidia-390xx-kmod-0074-no-previous-prototype-for-test_tracking.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_gpu_semaphore_test.c b/nvidia-uvm/uvm8_gpu_semaphore_test.c
+index 8b734b8..1523821 100644
+--- a/nvidia-uvm/uvm8_gpu_semaphore_test.c
++++ b/nvidia-uvm/uvm8_gpu_semaphore_test.c
+@@ -54,7 +54,7 @@ static NV_STATUS add_and_test(uvm_gpu_tracking_semaphore_t *tracking_sem, NvU32
+ return NV_OK;
+ }
+
+-NV_STATUS test_tracking(uvm_va_space_t *va_space)
++static NV_STATUS test_tracking(uvm_va_space_t *va_space)
+ {
+ NV_STATUS status;
+ uvm_gpu_tracking_semaphore_t tracking_sem;
diff --git a/nvidia-390xx-kmod-0075-no-previous-prototype-in-uvm8_page_tree_test_c.patch b/nvidia-390xx-kmod-0075-no-previous-prototype-in-uvm8_page_tree_test_c.patch
new file mode 100644
index 0000000..c11c15e
--- /dev/null
+++ b/nvidia-390xx-kmod-0075-no-previous-prototype-in-uvm8_page_tree_test_c.patch
@@ -0,0 +1,41 @@
+index 91861b8..9a306b5 100644
+--- a/nvidia-uvm/uvm8_page_tree_test.c
++++ b/nvidia-uvm/uvm8_page_tree_test.c
+@@ -55,7 +55,7 @@ static void fake_ce_memset_8(uvm_push_t *push, uvm_gpu_address_t dst, NvU64 valu
+ *(NvU64 *)phys_to_virt(dst.address + i) = value;
+ }
+
+-void *cpu_addr_from_fake(uvm_gpu_address_t fake_gpu_addr)
++static void *cpu_addr_from_fake(uvm_gpu_address_t fake_gpu_addr)
+ {
+ if (fake_gpu_addr.is_virtual)
+ return (void*)fake_gpu_addr.address;
+@@ -69,16 +69,16 @@ static void fake_ce_memcopy(uvm_push_t *push, uvm_gpu_address_t dst, uvm_gpu_add
+ memcpy(cpu_addr_from_fake(dst), cpu_addr_from_fake(src), size);
+ }
+
+-void fake_wait_for_idle(uvm_push_t *push)
++static void fake_wait_for_idle(uvm_push_t *push)
+ {
+ }
+
+-void fake_noop(uvm_push_t *push, NvU32 size)
++static void fake_noop(uvm_push_t *push, NvU32 size)
+ {
+ push->next += size / 4;
+ }
+
+-void fake_membar(uvm_push_t *push)
++static void fake_membar(uvm_push_t *push)
+ {
+ }
+
+@@ -304,7 +304,7 @@ static NV_STATUS test_page_tree_get_entry(uvm_page_tree_t *tree, NvU32 page_size
+ return uvm_page_tree_get_entry(tree, page_size, start, UVM_PMM_ALLOC_FLAGS_NONE, single);
+ }
+
+-NV_STATUS test_page_tree_alloc_table(uvm_page_tree_t *tree, NvU32 page_size,
++static NV_STATUS test_page_tree_alloc_table(uvm_page_tree_t *tree, NvU32 page_size,
+ uvm_page_table_range_t *single, uvm_page_table_range_t *children)
+ {
+ return uvm_page_tree_alloc_table(tree, page_size, UVM_PMM_ALLOC_FLAGS_NONE, single, children);
diff --git a/nvidia-390xx-kmod-0076-no-previous-prototype-in-uvm8_tracker_test_c.patch b/nvidia-390xx-kmod-0076-no-previous-prototype-in-uvm8_tracker_test_c.patch
new file mode 100644
index 0000000..ffd75ba
--- /dev/null
+++ b/nvidia-390xx-kmod-0076-no-previous-prototype-in-uvm8_tracker_test_c.patch
@@ -0,0 +1,22 @@
+diff --git a/nvidia-uvm/uvm8_tracker_test.c b/nvidia-uvm/uvm8_tracker_test.c
+index 02ce1ce..9d3ea97 100644
+--- a/nvidia-uvm/uvm8_tracker_test.c
++++ b/nvidia-uvm/uvm8_tracker_test.c
+@@ -225,7 +225,7 @@ done:
+ return status;
+ }
+
+-NV_STATUS test_tracker_overwrite(uvm_va_space_t *va_space)
++static NV_STATUS test_tracker_overwrite(uvm_va_space_t *va_space)
+ {
+ uvm_gpu_t *gpu;
+ uvm_channel_t *channel;
+@@ -313,7 +313,7 @@ done:
+ return status;
+ }
+
+-NV_STATUS test_tracker_add_tracker(uvm_va_space_t *va_space)
++static NV_STATUS test_tracker_add_tracker(uvm_va_space_t *va_space)
+ {
+ uvm_gpu_t *gpu;
+ uvm_channel_t *channel;
diff --git a/nvidia-390xx-kmod-0077-no-previous-prototype-in-uvm8_push_test_c.patch b/nvidia-390xx-kmod-0077-no-previous-prototype-in-uvm8_push_test_c.patch
new file mode 100644
index 0000000..7718a70
--- /dev/null
+++ b/nvidia-390xx-kmod-0077-no-previous-prototype-in-uvm8_push_test_c.patch
@@ -0,0 +1,22 @@
+diff --git a/nvidia-uvm/uvm8_push_test.c b/nvidia-uvm/uvm8_push_test.c
+index 7eedb32..f00c661 100644
+--- a/nvidia-uvm/uvm8_push_test.c
++++ b/nvidia-uvm/uvm8_push_test.c
+@@ -355,7 +355,7 @@ done:
+ //
+ // Starting more than a single push is not safe to do outside of a test as if multiple threads tried doing so,
+ // it could easily deadlock.
+-NV_STATUS test_push_interleaving(uvm_va_space_t *va_space)
++static NV_STATUS test_push_interleaving(uvm_va_space_t *va_space)
+ {
+ NV_STATUS status;
+ uvm_gpu_t *gpu;
+@@ -584,7 +584,7 @@ typedef struct
+ NvU64 timestamp;
+ } timestamp_test_t;
+
+-void timestamp_on_complete(void *void_data)
++static void timestamp_on_complete(void *void_data)
+ {
+ timestamp_test_t *data = (timestamp_test_t *)void_data;
+
diff --git a/nvidia-390xx-kmod-0078-no-previous-prototype-in-uvm8_channel_test_c.patch b/nvidia-390xx-kmod-0078-no-previous-prototype-in-uvm8_channel_test_c.patch
new file mode 100644
index 0000000..a3ca4b4
--- /dev/null
+++ b/nvidia-390xx-kmod-0078-no-previous-prototype-in-uvm8_channel_test_c.patch
@@ -0,0 +1,46 @@
+diff --git a/nvidia-uvm/uvm8_channel_test.c b/nvidia-uvm/uvm8_channel_test.c
+index eafcf85..0bd1540 100644
+--- a/nvidia-uvm/uvm8_channel_test.c
++++ b/nvidia-uvm/uvm8_channel_test.c
+@@ -40,7 +40,7 @@
+ // increment a counter into an adjacent memory location in a buffer. And then
+ // verify that all the values are correct on the CPU.
+ // GK110+ is required for the CE semaphore reduction method.
+-NV_STATUS test_ordering(uvm_va_space_t *va_space)
++static NV_STATUS test_ordering(uvm_va_space_t *va_space)
+ {
+ NV_STATUS status;
+ uvm_gpu_t *gpu;
+@@ -295,12 +295,12 @@ static void set_counter(uvm_push_t *push, uvm_rm_mem_t *counter_mem, NvU32 value
+ gpu->ce_hal->memset_v_4(push, counter_gpu_va, value, count * sizeof(NvU32));
+ }
+
+-uvm_channel_type_t random_channel_type(uvm_test_rng_t *rng)
++static uvm_channel_type_t random_channel_type(uvm_test_rng_t *rng)
+ {
+ return (uvm_channel_type_t)uvm_test_rng_range_32(rng, 0, UVM_CHANNEL_TYPE_COUNT - 1);
+ }
+
+-uvm_gpu_t *random_gpu(uvm_test_rng_t *rng, uvm_processor_mask_t *mask)
++static uvm_gpu_t *random_gpu(uvm_test_rng_t *rng, uvm_processor_mask_t *mask)
+ {
+ uvm_gpu_t *gpu;
+ NvU32 gpu_count = uvm_processor_mask_get_gpu_count(mask);
+@@ -314,7 +314,7 @@ uvm_gpu_t *random_gpu(uvm_test_rng_t *rng, uvm_processor_mask_t *mask)
+ }
+
+
+-void test_memset_rm_mem(uvm_push_t *push, uvm_rm_mem_t *rm_mem, NvU32 value)
++static void test_memset_rm_mem(uvm_push_t *push, uvm_rm_mem_t *rm_mem, NvU32 value)
+ {
+ uvm_gpu_t *gpu;
+ NvU64 gpu_va;
+@@ -336,7 +336,7 @@ void test_memset_rm_mem(uvm_push_t *push, uvm_rm_mem_t *rm_mem, NvU32 value)
+ // threads and contains some schedule() calls to help get as many threads
+ // through the init phase before other threads continue. It also has a random
+ // schedule() call in the main loop scheduling GPU work.
+-NV_STATUS stress_test_all_gpus_in_va(uvm_va_space_t *va_space, NvU32 num_streams, NvU32 iterations_per_stream,
++static NV_STATUS stress_test_all_gpus_in_va(uvm_va_space_t *va_space, NvU32 num_streams, NvU32 iterations_per_stream,
+ NvU32 seed, NvU32 verbose)
+ {
+ NV_STATUS status = NV_OK;
diff --git a/nvidia-390xx-kmod-0079-no-previous-prototype-in-nvidia-modeset-linux_c.patch b/nvidia-390xx-kmod-0079-no-previous-prototype-in-nvidia-modeset-linux_c.patch
new file mode 100644
index 0000000..1f8234c
--- /dev/null
+++ b/nvidia-390xx-kmod-0079-no-previous-prototype-in-nvidia-modeset-linux_c.patch
@@ -0,0 +1,31 @@
+diff --git a/nvidia-modeset/nvidia-modeset-linux.c b/nvidia-modeset/nvidia-modeset-linux.c
+index 5bed9dd..3b2b26a 100644
+--- a/nvidia-modeset/nvidia-modeset-linux.c
++++ b/nvidia-modeset/nvidia-modeset-linux.c
+@@ -762,7 +762,7 @@ static void nvkms_kapi_event_kthread_q_callback(void *arg)
+ nvKmsKapiHandleEventQueueChange(device);
+ }
+
+-struct nvkms_per_open *nvkms_open_common(enum NvKmsClientType type,
++static struct nvkms_per_open *nvkms_open_common(enum NvKmsClientType type,
+ struct NvKmsKapiDevice *device,
+ int *status)
+ {
+@@ -814,7 +814,7 @@ failed:
+ return NULL;
+ }
+
+-void NVKMS_API_CALL nvkms_close_common(struct nvkms_per_open *popen)
++static void NVKMS_API_CALL nvkms_close_common(struct nvkms_per_open *popen)
+ {
+ /*
+ * Don't use down_interruptible(): we need to free resources
+@@ -852,7 +852,7 @@ void NVKMS_API_CALL nvkms_close_common(struct nvkms_per_open *popen)
+ nvkms_free(popen, sizeof(*popen));
+ }
+
+-int NVKMS_API_CALL nvkms_ioctl_common
++static int NVKMS_API_CALL nvkms_ioctl_common
+ (
+ struct nvkms_per_open *popen,
+ NvU32 cmd, NvU64 address, const size_t size
diff --git a/nvidia-390xx-kmod-0080-fix-enum-implicit-conversion-from-uvm_fault_type_t-to-uvm_fault_access_type_t-in-uvm8_va_range_c.patch b/nvidia-390xx-kmod-0080-fix-enum-implicit-conversion-from-uvm_fault_type_t-to-uvm_fault_access_type_t-in-uvm8_va_range_c.patch
new file mode 100644
index 0000000..28221a7
--- /dev/null
+++ b/nvidia-390xx-kmod-0080-fix-enum-implicit-conversion-from-uvm_fault_type_t-to-uvm_fault_access_type_t-in-uvm8_va_range_c.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_va_range.c b/nvidia-uvm/uvm8_va_range.c
+index a1fb44c..b8fb02b 100644
+--- a/nvidia-uvm/uvm8_va_range.c
++++ b/nvidia-uvm/uvm8_va_range.c
+@@ -1568,7 +1568,7 @@ NV_STATUS uvm_va_range_check_logical_permissions(uvm_va_range_t *va_range,
+ // example on mprotect) and here we are not guaranteed to have
+ // vma->vm_mm->mmap_lock. During tests we ensure that this scenario does
+ // not happen
+- if (uvm_enable_builtin_tests && !fault_check_range_permission(va_range, access_type))
++ if (uvm_enable_builtin_tests && !fault_check_range_permission(va_range, (uvm_fault_access_type_t) access_type))
+ return NV_ERR_INVALID_ACCESS_TYPE;
+ }
+
diff --git a/nvidia-390xx-kmod-0081-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_replayable_faults_c.patch b/nvidia-390xx-kmod-0081-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_replayable_faults_c.patch
new file mode 100644
index 0000000..5cd45c3
--- /dev/null
+++ b/nvidia-390xx-kmod-0081-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_replayable_faults_c.patch
@@ -0,0 +1,22 @@
+diff --git a/nvidia-uvm/uvm8_gpu_replayable_faults.c b/nvidia-uvm/uvm8_gpu_replayable_faults.c
+index f2279b6..e67e137 100644
+--- a/nvidia-uvm/uvm8_gpu_replayable_faults.c
++++ b/nvidia-uvm/uvm8_gpu_replayable_faults.c
+@@ -972,7 +972,7 @@ static uvm_fault_access_type_t check_fault_access_permissions(uvm_gpu_t *gpu,
+
+ perm_status = uvm_va_range_check_logical_permissions(va_block->va_range,
+ gpu->id,
+- fault_entry->fault_access_type,
++ (uvm_fault_type_t)fault_entry->fault_access_type,
+ allow_migration);
+ if (perm_status == NV_OK)
+ return fault_entry->fault_access_type;
+@@ -995,7 +995,7 @@ static uvm_fault_access_type_t check_fault_access_permissions(uvm_gpu_t *gpu,
+ if (uvm_fault_access_type_mask_test(fault_entry->access_type_mask, UVM_FAULT_ACCESS_TYPE_READ)) {
+ perm_status = uvm_va_range_check_logical_permissions(va_block->va_range,
+ gpu->id,
+- UVM_FAULT_ACCESS_TYPE_READ,
++ (uvm_fault_type_t)UVM_FAULT_ACCESS_TYPE_READ,
+ allow_migration);
+ if (perm_status == NV_OK)
+ return UVM_FAULT_ACCESS_TYPE_READ;
diff --git a/nvidia-390xx-kmod-0082-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_non_replayable_faults_c.patch b/nvidia-390xx-kmod-0082-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_non_replayable_faults_c.patch
new file mode 100644
index 0000000..1a1235d
--- /dev/null
+++ b/nvidia-390xx-kmod-0082-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_non_replayable_faults_c.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_gpu_non_replayable_faults.c b/nvidia-uvm/uvm8_gpu_non_replayable_faults.c
+index c78d0ff..728f7db 100644
+--- a/nvidia-uvm/uvm8_gpu_non_replayable_faults.c
++++ b/nvidia-uvm/uvm8_gpu_non_replayable_faults.c
+@@ -221,7 +221,7 @@ static NV_STATUS service_non_replayable_fault_block_locked(uvm_gpu_t *gpu,
+ // Check logical permissions
+ status = uvm_va_range_check_logical_permissions(va_block->va_range,
+ gpu->id,
+- fault_entry->fault_access_type,
++ (uvm_fault_type_t)fault_entry->fault_access_type,
+ uvm_range_group_address_migratable(va_space,
+ fault_entry->fault_address));
+ if (status != NV_OK) {
diff --git a/nvidia-390xx-kmod-0083-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_va_block_c.patch b/nvidia-390xx-kmod-0083-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_va_block_c.patch
new file mode 100644
index 0000000..77c8434
--- /dev/null
+++ b/nvidia-390xx-kmod-0083-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_va_block_c.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8_va_block.c b/nvidia-uvm/uvm8_va_block.c
+index be6d873..b52eeb4 100644
+--- a/nvidia-uvm/uvm8_va_block.c
++++ b/nvidia-uvm/uvm8_va_block.c
+@@ -9389,7 +9389,7 @@ static NV_STATUS block_cpu_fault_locked(uvm_va_block_t *va_block,
+ // Check logical permissions
+ status = uvm_va_range_check_logical_permissions(va_block->va_range,
+ UVM_CPU_ID,
+- fault_access_type,
++ (uvm_fault_type_t)fault_access_type,
+ uvm_range_group_address_migratable(va_range->va_space, fault_addr));
+ if (status != NV_OK)
+ return status;
diff --git a/nvidia-390xx-kmod-0084-no-previous-prototype-in-nvlink_linux_c.patch b/nvidia-390xx-kmod-0084-no-previous-prototype-in-nvlink_linux_c.patch
new file mode 100644
index 0000000..bd579d3
--- /dev/null
+++ b/nvidia-390xx-kmod-0084-no-previous-prototype-in-nvlink_linux_c.patch
@@ -0,0 +1,11 @@
+index ba57b86..9f7d8c1 100644
+--- a/nvidia/nvlink_linux.c
++++ b/nvidia/nvlink_linux.c
+@@ -30,6 +30,7 @@
+ #include "nv-linux.h"
+ #include "nv-procfs.h"
+ #include "nv-time.h"
++#include "nvlink_proto.h"
+
+ #define MAX_ERROR_STRING 512
+
diff --git a/nvidia-390xx-kmod-0085-undef-NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0085-undef-NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..dd88f5c
--- /dev/null
+++ b/nvidia-390xx-kmod-0085-undef-NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,30 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..58636bf 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -4152,7 +4152,7 @@ compile_test() {
+ # drm_gem_object_put_unlocked()") finally removes
+ # drm_gem_object_put_unlocked() macro.
+ #
+- CODE="
++ #CODE="
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
+ #endif
+@@ -4160,11 +4160,12 @@ compile_test() {
+ #if defined(NV_DRM_DRM_GEM_H_PRESENT)
+ #include <drm/drm_gem.h>
+ #endif
+- void conftest_drm_gem_object_put_unlocked(void) {
+- drm_gem_object_put_unlocked();
+- }"
++ #void conftest_drm_gem_object_put_unlocked(void) {
++ # drm_gem_object_put_unlocked();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT" "" "functions"
++ echo "#undef NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT" | append_conftest "functions"
+ ;;
+
+ drm_display_mode_has_vrefresh)
diff --git a/nvidia-390xx-kmod-0086-undef-NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME-in-conftest_sh.patch b/nvidia-390xx-kmod-0086-undef-NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME-in-conftest_sh.patch
new file mode 100644
index 0000000..c6d4e2d
--- /dev/null
+++ b/nvidia-390xx-kmod-0086-undef-NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME-in-conftest_sh.patch
@@ -0,0 +1,24 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..8e2b262 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -3669,13 +3669,14 @@ compile_test() {
+ # 2018-07-09 cde4c44d8769c1be16074c097592c46c7d64092b
+ # 2018-07-09 97e14fbeb53fe060c5f6a7a07e37fd24c087ed0c
+ #
+- CODE="
++ #CODE="
+ #include <drm/drm_connector.h>
+- void conftest_drm_connector_funcs_have_mode_in_name(void) {
+- drm_mode_connector_attach_encoder();
+- }"
++ #void conftest_drm_connector_funcs_have_mode_in_name(void) {
++ # drm_mode_connector_attach_encoder();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME" "" "functions"
++ #compile_check_conftest "$CODE" "NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME" "" "functions"
++ echo "#undef NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME" | append_conftest "functions"
+ ;;
+
+ vm_fault_t)
diff --git a/nvidia-390xx-kmod-0087-undef-NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0087-undef-NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..6baf93c
--- /dev/null
+++ b/nvidia-390xx-kmod-0087-undef-NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,26 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..c1ba563 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -2783,15 +2783,16 @@ compile_test() {
+ # removed by commit:
+ # 2015-07-09 3fdefa399e4644399ce3e74e65a75122d52dba6a
+ #
+- CODE="
++ #CODE="
+ #if defined(NV_DRM_DRM_CRTC_H_PRESENT)
+ #include <drm/drm_crtc.h>
+ #endif
+- void conftest_drm_reinit_primary_mode_group(void) {
+- drm_reinit_primary_mode_group();
+- }"
++ #void conftest_drm_reinit_primary_mode_group(void) {
++ # drm_reinit_primary_mode_group();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT" "" "functions"
++ echo "#undef NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT" | append_conftest "functions"
+ ;;
+
+ wait_on_bit_lock_argument_count)
diff --git a/nvidia-390xx-kmod-0088-undef-NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch b/nvidia-390xx-kmod-0088-undef-NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch
new file mode 100644
index 0000000..11e97d7
--- /dev/null
+++ b/nvidia-390xx-kmod-0088-undef-NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch
@@ -0,0 +1,26 @@
+diff --git a/conftest.sh b/conftest.sh
+index beaae93..1e13dcc 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -3458,15 +3458,16 @@ compile_test() {
+ # drm_atomic_helper_connector_dpms() was removed by:
+ # 2017-07-25 7d902c05b480cc44033dcb56e12e51b082656b42
+ #
+- CODE="
++ #CODE="
+ #if defined(NV_DRM_DRM_ATOMIC_HELPER_H_PRESENT)
+ #include <drm/drm_atomic_helper.h>
+ #endif
+- void conftest_drm_atomic_helper_connector_dpms(void) {
+- drm_atomic_helper_connector_dpms();
+- }"
++ #void conftest_drm_atomic_helper_connector_dpms(void) {
++ # drm_atomic_helper_connector_dpms();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT" "" "functions"
++ #compile_check_conftest "$CODE" "NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT" "" "functions"
++ echo "#undef NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT" | append_conftest "functions"
+ ;;
+
+ backlight_device_register)
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index a443a0e..d8e5e6d 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -36,15 +36,72 @@ Source11: nvidia-390xx-kmodtool-excludekernel-filterfile
Patch12: do-div-cast.patch
Patch13: 0018-backport-nv_install_notifier-changes-from-418.30.patch
#Copied from Arch
-Patch19: kernel-4.16+-memory-encryption.patch
-Patch20: nvidia-390xx-kmod-0024-kernel-6.2-adaptation.patch
-Patch21: nvidia-390xx-kmod-0025-kernel-6.3-adaptation.patch
-Patch22: nvidia-390xx-kmod-0026-kernel-6.4-adaptation.patch
-Patch23: nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get_user.patch
-Patch24: nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch
-Patch25: nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
-Patch26: nvidia-390xx-kmod-0030-kernel-6.6-refuse-to-load-legacy-module-if-IBT-is-enabled.patch
-Patch27: nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch
+Patch19: kernel-4.16+-memory-encryption.patch
+Patch20: nvidia-390xx-kmod-0024-kernel-6.2-adaptation.patch
+Patch21: nvidia-390xx-kmod-0025-kernel-6.3-adaptation.patch
+Patch22: nvidia-390xx-kmod-0026-kernel-6.4-adaptation.patch
+Patch23: nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get_user.patch
+Patch24: nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch
+Patch25: nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
+Patch26: nvidia-390xx-kmod-0030-kernel-6.6-refuse-to-load-legacy-module-if-IBT-is-enabled.patch
+Patch27: nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch
+Patch28: nvidia-390xx-kmod-0032-kernel-6.8-conftest_h-wait_on_bit_lock.patch
+Patch29: nvidia-390xx-kmod-0033-kernel-5.6-ioremap_nocache_removed.patch
+Patch100: nvidia-390xx-kmod-0034-kernel-5.9-dma_is_direct-removed.patch
+Patch101: nvidia-390xx-kmod-0035-gcc14-no-previous-prototype-for-nv_load_dma_map_scatterlist.patch
+Patch102: nvidia-390xx-kmod-0036-undef-NV_ACPI_BUS_GET_DEVICE_PRESENT-in-conftest_sh.patch
+Patch103: nvidia-390xx-kmod-0037-add-RPM_CFLAGS-setup-in-conftest_sh.patch
+Patch104: nvidia-390xx-kmod-0038-workaround-NV_EFI_ENABLED-macro.patch
+Patch105: nvidia-390xx-kmod-0039-incompatible-function-type-nv_gpu_numa_c.patch
+Patch106: nvidia-390xx-kmod-0040-fix-fallthrough-warning-nv_mmap_c.patch
+Patch107: nvidia-390xx-kmod-0041-no-previous-prototype-for-exercise_error_forwarding_va.patch
+Patch108: nvidia-390xx-kmod-0042-undef-NV_DO_GETTIMEOFDAY_PRESENT-in-conftest_sh.patch
+Patch109: nvidia-390xx-kmod-0043-undef-NV_SET_MEMORY_ARRAY_UC_PRESENT-in-conftest_sh.patch
+Patch110: nvidia-390xx-kmod-0044-undef-NV_ACQUIRE_CONSOLE_SEM_PRESENT-in-conftest_sh.patch
+Patch111: nvidia-390xx-kmod-0045-undef-NV_UNSAFE_FOLLOW_PFN_PRESENT-in-conftest_sh.patch
+Patch112: nvidia-390xx-kmod-0046-undef-NV_JIFFIES_TO_TIMESPEC_PRESENT-in-conftest_sh.patch
+Patch113: nvidia-390xx-kmod-0047-undef-NV_PNV_NPU2_INIT_CONTEXT_PRESENT-in-conftest_sh.patch
+Patch114: nvidia-390xx-kmod-0048-fix-atomic64-include-in-conftest_sh.patch
+Patch115: nvidia-390xx-kmod-0049-fix-dma_buf_map-renamed-to-iosys_map.patch
+Patch116: nvidia-390xx-kmod-0050-no-previous-prototype-for-nv_pci_register_driver.patch
+Patch117: nvidia-390xx-kmod-0051-no-previous-prototype-for-nvidia_init_exit_module-in-nv_c.patch
+Patch118: nvidia-390xx-kmod-0052-no-previous-prototype-for-on_nv_assert.patch
+Patch119: nvidia-390xx-kmod-0053-no-previous-prototype-for-_raw_q_flush.patch
+Patch120: nvidia-390xx-kmod-0054-no-previous-prototype-for-nv-ibmnpu-functions.patch
+Patch121: nvidia-390xx-kmod-0055-no-previous-prototype-for-uvm_tools_init_exit.patch
+Patch122: nvidia-390xx-kmod-0056-no-previous-prototype-for-uvm8_test_set_prefetch_filtering.patch
+Patch123: nvidia-390xx-kmod-0057-no-previous-prototype-in-uvm8_va_space_c.patch
+Patch124: nvidia-390xx-kmod-0058-no-previous-prototype-for-uvm_channel_manager_print_pending_pushes.patch
+Patch125: nvidia-390xx-kmod-0059-no-previous-prototype-in-uvm8_va_range_c.patch
+Patch126: nvidia-390xx-kmod-0060-no-previous-prototype-in-uvm8_range_group_c.patch
+Patch127: nvidia-390xx-kmod-0061-no-previous-prototype-in-uvm8_gpu_replayable_faults_c.patch
+Patch128: nvidia-390xx-kmod-0062-no-previous-prototype-for-block_map.patch
+Patch129: nvidia-390xx-kmod-0063-no-previous-prototype-for-try_get_ptes.patch
+Patch130: nvidia-390xx-kmod-0064-no-previous-prototype-in-uvm8_pushbuffer_c.patch
+Patch131: nvidia-390xx-kmod-0065-no-previous-prototype-in-uvm8_kepler_mmu_c.patch
+Patch132: nvidia-390xx-kmod-0066-no-previous-prototype-in-uvm8_pascal_mmu_c.patch
+Patch133: nvidia-390xx-kmod-0067-no-previous-prototype-for-parse_fault_entry_common.patch
+Patch134: nvidia-390xx-kmod-0068-no-previous-prototype-in-uvm8_volta_access_counter_buffer_c.patch
+Patch135: nvidia-390xx-kmod-0069-no-previous-prototype-for-va_block_set_read_duplication_locked.patch
+Patch136: nvidia-390xx-kmod-0070-no-previous-prototype-for-map_rm_pt_range.patch
+Patch137: nvidia-390xx-kmod-0071-no-previous-prototype-in-uvm8_user_channel_c.patch
+Patch138: nvidia-390xx-kmod-0072-no-previous-prototype-in-uvm8_perf_thrashing_c.patch
+Patch139: nvidia-390xx-kmod-0073-no-previous-prototype-in-uvm8_perf_prefetch_c.patch
+Patch140: nvidia-390xx-kmod-0074-no-previous-prototype-for-test_tracking.patch
+Patch141: nvidia-390xx-kmod-0075-no-previous-prototype-in-uvm8_page_tree_test_c.patch
+Patch142: nvidia-390xx-kmod-0076-no-previous-prototype-in-uvm8_tracker_test_c.patch
+Patch143: nvidia-390xx-kmod-0077-no-previous-prototype-in-uvm8_push_test_c.patch
+Patch144: nvidia-390xx-kmod-0078-no-previous-prototype-in-uvm8_channel_test_c.patch
+Patch145: nvidia-390xx-kmod-0079-no-previous-prototype-in-nvidia-modeset-linux_c.patch
+Patch146: nvidia-390xx-kmod-0080-fix-enum-implicit-conversion-from-uvm_fault_type_t-to-uvm_fault_access_type_t-in-uvm8_va_range_c.patch
+Patch147: nvidia-390xx-kmod-0081-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_replayable_faults_c.patch
+Patch148: nvidia-390xx-kmod-0082-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_gpu_non_replayable_faults_c.patch
+Patch149: nvidia-390xx-kmod-0083-fix-enum-implicit-conversion-from-uvm_fault_access_type_t-to-uvm_fault_type_t-in-uvm8_va_block_c.patch
+Patch150: nvidia-390xx-kmod-0084-no-previous-prototype-in-nvlink_linux_c.patch
+Patch151: nvidia-390xx-kmod-0085-undef-NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT-in-conftest_sh.patch
+Patch152: nvidia-390xx-kmod-0086-undef-NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME-in-conftest_sh.patch
+Patch153: nvidia-390xx-kmod-0087-undef-NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT-in-conftest_sh.patch
+Patch154: nvidia-390xx-kmod-0088-undef-NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch
# build system updates
Patch30: use-kbuild-compiler.patch
@@ -91,6 +148,63 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch -P 25 -p1 -b 25 -d kernel
%patch -P 26 -p1 -b 26 -d kernel
%patch -P 27 -p1 -b 27 -d kernel
+%patch -P 28 -p1 -b 28 -d kernel
+%patch -P 29 -p1 -b 29 -d kernel
+%patch -P 100 -p1 -b 100 -d kernel
+%patch -P 101 -p1 -b 101 -d kernel
+%patch -P 102 -p1 -b 102 -d kernel
+%patch -P 103 -p1 -b 103 -d kernel
+%patch -P 104 -p1 -b 104 -d kernel
+%patch -P 105 -p1 -b 105 -d kernel
+%patch -P 106 -p1 -b 106 -d kernel
+%patch -P 107 -p1 -b 107 -d kernel
+%patch -P 108 -p1 -b 108 -d kernel
+%patch -P 109 -p1 -b 109 -d kernel
+%patch -P 110 -p1 -b 110 -d kernel
+%patch -P 111 -p1 -b 111 -d kernel
+%patch -P 112 -p1 -b 112 -d kernel
+%patch -P 113 -p1 -b 113 -d kernel
+%patch -P 114 -p1 -b 114 -d kernel
+%patch -P 115 -p1 -b 115 -d kernel
+%patch -P 116 -p1 -b 116 -d kernel
+%patch -P 117 -p1 -b 117 -d kernel
+%patch -P 118 -p1 -b 118 -d kernel
+%patch -P 119 -p1 -b 119 -d kernel
+%patch -P 120 -p1 -b 120 -d kernel
+%patch -P 121 -p1 -b 121 -d kernel
+%patch -P 122 -p1 -b 122 -d kernel
+%patch -P 123 -p1 -b 123 -d kernel
+%patch -P 124 -p1 -b 124 -d kernel
+%patch -P 125 -p1 -b 125 -d kernel
+%patch -P 126 -p1 -b 126 -d kernel
+%patch -P 127 -p1 -b 127 -d kernel
+%patch -P 128 -p1 -b 128 -d kernel
+%patch -P 129 -p1 -b 129 -d kernel
+%patch -P 130 -p1 -b 130 -d kernel
+%patch -P 131 -p1 -b 131 -d kernel
+%patch -P 132 -p1 -b 132 -d kernel
+%patch -P 133 -p1 -b 133 -d kernel
+%patch -P 134 -p1 -b 134 -d kernel
+%patch -P 135 -p1 -b 135 -d kernel
+%patch -P 136 -p1 -b 136 -d kernel
+%patch -P 137 -p1 -b 137 -d kernel
+%patch -P 138 -p1 -b 138 -d kernel
+%patch -P 139 -p1 -b 139 -d kernel
+%patch -P 140 -p1 -b 140 -d kernel
+%patch -P 141 -p1 -b 141 -d kernel
+%patch -P 142 -p1 -b 142 -d kernel
+%patch -P 143 -p1 -b 143 -d kernel
+%patch -P 144 -p1 -b 144 -d kernel
+%patch -P 145 -p1 -b 145 -d kernel
+%patch -P 146 -p1 -b 146 -d kernel
+%patch -P 147 -p1 -b 147 -d kernel
+%patch -P 148 -p1 -b 148 -d kernel
+%patch -P 149 -p1 -b 149 -d kernel
+%patch -P 150 -p1 -b 150 -d kernel
+%patch -P 151 -p1 -b 151 -d kernel
+%patch -P 152 -p1 -b 152 -d kernel
+%patch -P 153 -p1 -b 153 -d kernel
+%patch -P 154 -p1 -b 154 -d kernel
%patch -P 30 -p1 -b 30 -d kernel
%patch -P 31 -p1 -b 31 -d kernel
@@ -111,6 +225,7 @@ done
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/
make V=1 %{?_smp_mflags} \
+ RPM_CFLAGS="%{optflags}" \
KERNEL_UNAME="${kernel_version%%___*}" SYSSRC="${kernel_version##*___}" \
IGNORE_CC_MISMATCH=1 IGNORE_XEN_PRESENCE=1 IGNORE_PREEMPT_RT_PRESENCE=1 \
module
7 months
[nvidia-390xx-kmod] Fix patches Hunk offset
by Nicolas Viéville
commit d09be992b70357721cbb92698fc6ee4542128a57
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Fri Apr 19 19:29:01 2024 +0200
Fix patches Hunk offset
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
0018-backport-nv_install_notifier-changes-from-418.30.patch | 12 ++++++------
bashisms.patch | 2 +-
cc_version_check-gcc5.patch | 2 +-
conftest-verbose.patch | 6 +++---
kernel-4.16+-memory-encryption.patch | 2 +-
...rnel-6.5-garbage-collect-all-references-to-get_user.patch | 2 +-
...rnel-6.5-handle-get_user_pages-vmas-argument-remova.patch | 4 ++--
...ackport-drm_gem_prime_handle_to_fd-changes-from-470.patch | 2 +-
use-kbuild-compiler.patch | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/0018-backport-nv_install_notifier-changes-from-418.30.patch b/0018-backport-nv_install_notifier-changes-from-418.30.patch
index 7d311c5..60597e3 100644
--- a/0018-backport-nv_install_notifier-changes-from-418.30.patch
+++ b/0018-backport-nv_install_notifier-changes-from-418.30.patch
@@ -11,7 +11,7 @@ diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c
index 6cfd400..d311e85 100644
--- a/nvidia/nv-acpi.c
+++ b/nvidia/nv-acpi.c
-@@ -503,19 +503,19 @@ static int nv_acpi_match(struct acpi_device *device, struct acpi_driver *driver)
+@@ -502,19 +502,19 @@ static int nv_acpi_match(struct acpi_device *device, struct acpi_driver *driver)
#endif
/* Do the necessary allocations and install notifier "handler" on the device-node "device" */
@@ -35,7 +35,7 @@ index 6cfd400..d311e85 100644
}
rmStatus = os_alloc_mem((void **) &pNvAcpiObject, sizeof(nv_acpi_t));
-@@ -533,32 +533,25 @@ static NV_STATUS nv_install_notifier(struct acpi_handle *handle, acpi_notify_han
+@@ -532,32 +532,25 @@ static NV_STATUS nv_install_notifier(struct acpi_handle *handle, acpi_notify_han
if (!ACPI_FAILURE(status))
{
pNvAcpiObject->notify_handler_installed = 1;
@@ -72,7 +72,7 @@ index 6cfd400..d311e85 100644
if (ACPI_FAILURE(status))
{
nv_printf(NV_DBG_INFO,
-@@ -568,14 +561,12 @@ static void nv_uninstall_notifier(struct acpi_device *device, acpi_notify_handle
+@@ -567,14 +560,12 @@ static void nv_uninstall_notifier(struct acpi_device *device, acpi_notify_handle
{
nv_kmem_cache_free_stack(pNvAcpiObject->sp);
os_free_mem((void *)pNvAcpiObject);
@@ -88,7 +88,7 @@ index 6cfd400..d311e85 100644
/*
* acpi methods init function.
* check if the NVIF, _DSM and WMMX methods are present in the acpi namespace.
-@@ -586,7 +577,6 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
+@@ -585,7 +576,6 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
{
#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
struct acpi_device *device = NULL;
@@ -96,7 +96,7 @@ index 6cfd400..d311e85 100644
int retVal = -1;
#endif
-@@ -619,8 +609,10 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
+@@ -618,8 +608,10 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
nodes' structures. So nothing more to be done */
}
@@ -109,7 +109,7 @@ index 6cfd400..d311e85 100644
nvif_parent_gpu_handle = NULL;
} while (0);
-@@ -685,9 +677,10 @@ void NV_API_CALL nv_acpi_methods_uninit(void)
+@@ -684,9 +676,10 @@ void NV_API_CALL nv_acpi_methods_uninit(void)
#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
acpi_bus_get_device(nvif_parent_gpu_handle, &device);
diff --git a/bashisms.patch b/bashisms.patch
index be38881..92c2749 100644
--- a/bashisms.patch
+++ b/bashisms.patch
@@ -3,7 +3,7 @@ Description: fix bashisms in conftest.sh
--- a/conftest.sh
+++ b/conftest.sh
-@@ -4858,7 +4858,7 @@
+@@ -4902,7 +4902,7 @@
if [ -n "$VGX_BUILD" ]; then
if [ -f /proc/xen/capabilities ]; then
diff --git a/cc_version_check-gcc5.patch b/cc_version_check-gcc5.patch
index dba5435..31f7efa 100644
--- a/cc_version_check-gcc5.patch
+++ b/cc_version_check-gcc5.patch
@@ -5,7 +5,7 @@ Description: ignore __GNUC_MINOR__ from GCC 5 onwards
--- a/conftest.sh
+++ b/conftest.sh
-@@ -4616,7 +4616,7 @@
+@@ -4660,7 +4660,7 @@
kernel_cc_minor=`echo ${kernel_cc_version} | cut -d '.' -f 2`
echo "
diff --git a/conftest-verbose.patch b/conftest-verbose.patch
index 10cc577..fa5ad84 100644
--- a/conftest-verbose.patch
+++ b/conftest-verbose.patch
@@ -3,7 +3,7 @@ Description: dump the generated conftest headers
--- a/Kbuild
+++ b/Kbuild
-@@ -115,6 +115,16 @@
+@@ -114,6 +114,16 @@
NV_CONFTEST_HEADERS += $(NV_CONFTEST_COMPILE_TEST_HEADERS)
@@ -20,7 +20,7 @@ Description: dump the generated conftest headers
#
# Generate a header file for a single conftest compile test. Each compile test
# header depends on conftest.sh, as well as the generated conftest/headers.h
-@@ -139,6 +149,8 @@
+@@ -138,6 +148,8 @@
@mkdir -p $(obj)/conftest
@# concatenate /dev/null to prevent cat from hanging when $$^ is empty
@cat $$^ /dev/null > $$@
@@ -29,7 +29,7 @@ Description: dump the generated conftest headers
endef
#
-@@ -158,13 +170,17 @@
+@@ -157,13 +169,17 @@
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,symbols,$(NV_CONFTEST_SYMBOL_COMPILE_TESTS)))
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,types,$(NV_CONFTEST_TYPE_COMPILE_TESTS)))
diff --git a/kernel-4.16+-memory-encryption.patch b/kernel-4.16+-memory-encryption.patch
index 737295c..e19e7fb 100644
--- a/kernel-4.16+-memory-encryption.patch
+++ b/kernel-4.16+-memory-encryption.patch
@@ -18,7 +18,7 @@ diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index b23dbb4..42dc576 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
-@@ -2056,7 +2056,12 @@ compile_test() {
+@@ -2074,7 +2074,12 @@ compile_test() {
# Determine if the phys_to_dma function is present.
#
CODE="
diff --git a/nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get_user.patch b/nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get_user.patch
index 183e5b4..4398143 100644
--- a/nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get_user.patch
+++ b/nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get_user.patch
@@ -129,7 +129,7 @@ diff --git a/conftest.sh b/conftest.sh
index 24daa850..abe435ff 100755
--- a/conftest.sh
+++ b/conftest.sh
-@@ -3081,136 +3081,6 @@ compile_test() {
+@@ -3086,136 +3086,6 @@ compile_test() {
return
;;
diff --git a/nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch b/nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch
index 2aa2d3f..bea0cc3 100644
--- a/nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch
+++ b/nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch
@@ -95,7 +95,7 @@ diff --git a/conftest.sh b/conftest.sh
index abe435ff..0131fab5 100755
--- a/conftest.sh
+++ b/conftest.sh
-@@ -3051,7 +3051,6 @@ compile_test() {
+@@ -3056,7 +3056,6 @@ compile_test() {
# write and force parameters AND that gup has task_struct and
# mm_struct as its first arguments.
# Return if available.
@@ -103,7 +103,7 @@ index abe435ff..0131fab5 100755
echo "$CONFTEST_PREAMBLE
#include <linux/mm.h>
-@@ -3075,6 +3074,31 @@ compile_test() {
+@@ -3080,6 +3079,31 @@ compile_test() {
return
fi
diff --git a/nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch b/nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
index 8fa15d5..a1b905e 100644
--- a/nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
+++ b/nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
@@ -12,7 +12,7 @@ diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index 7e6f5e8..c0cc77a 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
-@@ -697,7 +697,19 @@ static struct drm_driver nv_drm_driver = {
+@@ -705,7 +705,19 @@ static struct drm_driver nv_drm_driver = {
.ioctls = nv_drm_ioctls,
.num_ioctls = ARRAY_SIZE(nv_drm_ioctls),
diff --git a/use-kbuild-compiler.patch b/use-kbuild-compiler.patch
index 6f13e7a..bc99b71 100644
--- a/use-kbuild-compiler.patch
+++ b/use-kbuild-compiler.patch
@@ -7,7 +7,7 @@ Description: let Kbuild set the compiler version
--- a/Makefile
+++ b/Makefile
-@@ -78,8 +78,8 @@ else
+@@ -82,8 +82,8 @@ else
.PHONY: modules module clean clean_conftest modules_install
modules clean modules_install:
7 months
[ffmpeg] fix
by Leigh Scott
commit 11a773cf0e05c34e5162c98f49e6e7d4d9393eea
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Apr 19 16:06:24 2024 +0100
fix
ffmpeg-gcc14.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
ffmpeg.spec | 1 +
2 files changed, 63 insertions(+)
---
diff --git a/ffmpeg-gcc14.patch b/ffmpeg-gcc14.patch
new file mode 100644
index 0000000..a5fed7a
--- /dev/null
+++ b/ffmpeg-gcc14.patch
@@ -0,0 +1,62 @@
+From 68ef9a29478fad450ec29ec14120afad3938e75b Mon Sep 17 00:00:00 2001
+From: Sandro Mani <manisandro(a)gmail.com>
+Date: Tue, 30 Jan 2024 09:16:13 +0100
+Subject: [PATCH] Fix -Wint-conversion and -Wincompatible-pointer-types errors
+
+---
+ libavcodec/pcm-bluray.c | 4 ++--
+ libavcodec/pcm-dvd.c | 2 +-
+ libavutil/hwcontext_vaapi.c | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
+index f656095..56fa373 100644
+--- a/libavcodec/pcm-bluray.c
++++ b/libavcodec/pcm-bluray.c
+@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCod
+ samples *= num_source_channels;
+ if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
+ #if HAVE_BIGENDIAN
+- bytestream2_get_buffer(&gb, dst16, buf_size);
++ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size);
+ #else
+ do {
+ *dst16++ = bytestream2_get_be16u(&gb);
+@@ -187,7 +187,7 @@ static int pcm_bluray_decode_frame(AVCod
+ if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
+ do {
+ #if HAVE_BIGENDIAN
+- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2);
++ bytestream2_get_buffer(&gb, (uint8_t*)dst16, avctx->ch_layout.nb_channels * 2);
+ dst16 += avctx->ch_layout.nb_channels;
+ #else
+ channel = avctx->ch_layout.nb_channels;
+diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
+index 419b2a1..319746c 100644
+--- a/libavcodec/pcm-dvd.c
++++ b/libavcodec/pcm-dvd.c
+@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCo
+ switch (avctx->bits_per_coded_sample) {
+ case 16: {
+ #if HAVE_BIGENDIAN
+- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
++ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size);
+ dst16 += blocks * s->block_size / 2;
+ #else
+ int samples = blocks * avctx->ch_layout.nb_channels;
+diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
+index 12bc951..d326ad6 100644
+--- a/libavutil/hwcontext_vaapi.c
++++ b/libavutil/hwcontext_vaapi.c
+@@ -1213,7 +1213,7 @@ static int vaapi_map_from_drm(AVHWFrames
+
+ if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
+ int k;
+- unsigned long buffer_handle;
++ size_t buffer_handle;
+ VASurfaceAttribExternalBuffers buffer_desc;
+ VASurfaceAttrib buffer_attrs[2] = {
+ {
+--
+2.43.0
+
diff --git a/ffmpeg.spec b/ffmpeg.spec
index c7848a5..7be11cd 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -110,6 +110,7 @@ Source2: https://ffmpeg.org/ffmpeg-devel.asc
%endif
# We don't endorse adding this patch but fedora insists on breaking the ffmpeg ABI
Patch0: ffmpeg-chromium.patch
+Patch1: ffmpeg-gcc14.patch
Conflicts: %{name}-free
Provides: %{name}-bin = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
7 months, 1 week