[packages/xorg-driver-video-nvidia-legacy-390xx] - fix building with kernel 5.17, rel 3
baggins
baggins at pld-linux.org
Sat Apr 2 21:52:16 CEST 2022
commit 313cb220e1274c8b0176f7c2daf4626fe524f4ce
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Apr 2 21:51:22 2022 +0200
- fix building with kernel 5.17, rel 3
kernel-5.17.patch | 67 ++++++++++++++++++++++++++++++
xorg-driver-video-nvidia-legacy-390xx.spec | 4 +-
2 files changed, 70 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index bf84c2d..b3d3162 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -29,7 +29,7 @@ exit 1
%define no_install_post_check_so 1
-%define rel 2
+%define rel 3
%define pname xorg-driver-video-nvidia-legacy-390xx
Summary: Linux Drivers for nVidia GeForce/Quadro Chips
Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -51,6 +51,7 @@ Source4: 10-nvidia.conf
Source5: 10-nvidia-modules.conf
Patch0: X11-driver-nvidia-GL.patch
Patch1: X11-driver-nvidia-desktop.patch
+Patch2: kernel-5.17.patch
URL: https://www.nvidia.com/en-us/drivers/unix/
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.752
@@ -311,6 +312,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%endif
%patch0 -p1
%patch1 -p1
+%patch2 -p1
echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
diff --git a/kernel-5.17.patch b/kernel-5.17.patch
new file mode 100644
index 0000000..14f44fb
--- /dev/null
+++ b/kernel-5.17.patch
@@ -0,0 +1,67 @@
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/conftest.sh~ 2021-12-13 07:06:52.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/conftest.sh 2022-04-02 21:42:45.218675048 +0200
+@@ -1806,6 +1806,19 @@
+ compile_check_conftest "$CODE" "NV_PDE_DATA_PRESENT" "" "functions"
+ ;;
+
++ pde_data_func)
++ #
++ # Determine if the PDE_DATA() function is present.
++ #
++ CODE="
++ #include <linux/proc_fs.h>
++ void conftest_pde_data(void) {
++ pde_data();
++ }"
++
++ compile_check_conftest "$CODE" "NV_PDE_DATA_FUNC_PRESENT" "" "functions"
++ ;;
++
+ get_num_physpages)
+ #
+ # Determine if the get_num_physpages() function is
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/common/inc/nv-procfs.h~ 2021-12-13 15:04:59.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/common/inc/nv-procfs.h 2022-04-02 21:44:19.777574273 +0200
+@@ -115,8 +115,12 @@
+ #if defined(NV_PDE_DATA_PRESENT)
+ # define NV_PDE_DATA(inode) PDE_DATA(inode)
+ #else
++#if defined(NV_PDE_DATA_FUNC_PRESENT)
++# define NV_PDE_DATA(inode) pde_data(inode)
++#else
+ # define NV_PDE_DATA(inode) PDE(inode)->data
+ #endif
++#endif
+
+ #if defined(NV_PROC_REMOVE_PRESENT)
+ # define NV_REMOVE_PROC_ENTRY(entry) \
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia/nvidia.Kbuild~ 2021-12-13 15:04:30.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia/nvidia.Kbuild 2022-04-02 21:48:22.121422416 +0200
+@@ -133,6 +133,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += efi_enabled
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data_func
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pm_vt_switch_required
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += xen_ioemu_inject_msi
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-modeset/nvidia-modeset.Kbuild~ 2021-11-02 14:29:40.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-modeset/nvidia-modeset.Kbuild 2022-04-02 21:49:08.364218278 +0200
+@@ -90,6 +90,7 @@
+ NV_CONFTEST_TYPE_COMPILE_TESTS += proc_dir_entry
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data_func
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += timer_setup
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += do_gettimeofday
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-uvm/nvidia-uvm.Kbuild~ 2021-12-13 15:04:30.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-uvm/nvidia-uvm.Kbuild 2022-04-02 21:49:28.303986549 +0200
+@@ -103,6 +103,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += wait_on_bit_lock_argument_count
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data_func
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += bitmap_clear
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += usleep_range
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/313cb220e1274c8b0176f7c2daf4626fe524f4ce
More information about the pld-cvs-commit
mailing list