]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-390xx.git/blobdiff - kernel-5.17.patch
- fix building with kernel 5.17, rel 3
[packages/xorg-driver-video-nvidia-legacy-390xx.git] / kernel-5.17.patch
diff --git a/kernel-5.17.patch b/kernel-5.17.patch
new file mode 100644 (file)
index 0000000..14f44fb
--- /dev/null
@@ -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
This page took 0.023741 seconds and 4 git commands to generate.