[packages/xorg-driver-video-nvidia-legacy-340xx] - rel 4 - fix building with kernel 4.12
baggins
baggins at pld-linux.org
Tue Aug 1 10:25:25 CEST 2017
commit 386385f34ac514282aa95a7675988a7048313b5e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Aug 1 10:25:02 2017 +0200
- rel 4
- fix building with kernel 4.12
linux-4.12.patch | 95 ++++++++++++++++++++++++++++++
xorg-driver-video-nvidia-legacy-340xx.spec | 4 +-
2 files changed, 98 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-340xx.spec b/xorg-driver-video-nvidia-legacy-340xx.spec
index 2f93828..ee18c08 100644
--- a/xorg-driver-video-nvidia-legacy-340xx.spec
+++ b/xorg-driver-video-nvidia-legacy-340xx.spec
@@ -25,7 +25,7 @@ exit 1
%define no_install_post_check_so 1
-%define rel 3
+%define rel 4
%define pname xorg-driver-video-nvidia-legacy-340xx
Summary: Linux Drivers for nVidia GeForce/Quadro Chips
Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -50,6 +50,7 @@ Patch1: X11-driver-nvidia-desktop.patch
Patch2: linux-4.0.patch
Patch3: linux-4.10.patch
Patch4: linux-4.11.patch
+Patch5: linux-4.12.patch
URL: http://www.nvidia.com/object/unix.html
BuildRequires: rpmbuild(macros) >= 1.701
%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -254,6 +255,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%patch2 -p1
%patch3 -p1
%patch4 -p0
+%patch5 -p0
echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
diff --git a/linux-4.12.patch b/linux-4.12.patch
new file mode 100644
index 0000000..87c50d6
--- /dev/null
+++ b/linux-4.12.patch
@@ -0,0 +1,95 @@
+--- kernel/conftest.sh.orig 2017-07-04 19:34:18.849964147 +0200
++++ kernel/conftest.sh 2017-07-04 19:40:00.084349448 +0200
+@@ -362,7 +362,11 @@
+ # Determine if the set_memory_uc() function is present.
+ #
+ CODE="
+- #include <asm/cacheflush.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++ #else
++ #include <asm/cacheflush.h>
++ #endif
+ void conftest_set_memory_uc(void) {
+ set_memory_uc();
+ }"
+@@ -375,7 +379,11 @@
+ # Determine if the set_memory_array_uc() function is present.
+ #
+ CODE="
+- #include <asm/cacheflush.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++ #else
++ #include <asm/cacheflush.h>
++ #endif
+ void conftest_set_memory_array_uc(void) {
+ set_memory_array_uc();
+ }"
+@@ -388,7 +396,11 @@
+ # Determine if the set_pages_uc() function is present.
+ #
+ CODE="
+- #include <asm/cacheflush.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++ #else
++ #include <asm/cacheflush.h>
++ #endif
+ void conftest_set_pages_uc(void) {
+ set_pages_uc();
+ }"
+--- kernel/uvm/conftest.sh.orig 2017-07-04 19:41:43.317660686 +0200
++++ kernel/uvm/conftest.sh 2017-07-04 19:40:23.248644401 +0200
+@@ -362,7 +362,11 @@
+ # Determine if the set_memory_uc() function is present.
+ #
+ CODE="
+- #include <asm/cacheflush.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++ #else
++ #include <asm/cacheflush.h>
++ #endif
+ void conftest_set_memory_uc(void) {
+ set_memory_uc();
+ }"
+@@ -375,7 +379,11 @@
+ # Determine if the set_memory_array_uc() function is present.
+ #
+ CODE="
+- #include <asm/cacheflush.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++ #else
++ #include <asm/cacheflush.h>
++ #endif
+ void conftest_set_memory_array_uc(void) {
+ set_memory_array_uc();
+ }"
+@@ -388,7 +396,11 @@
+ # Determine if the set_pages_uc() function is present.
+ #
+ CODE="
+- #include <asm/cacheflush.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++ #else
++ #include <asm/cacheflush.h>
++ #endif
+ void conftest_set_pages_uc(void) {
+ set_pages_uc();
+ }"
+--- kernel/nv-vm.c.orig 2017-07-04 20:01:37.098802679 +0200
++++ kernel/nv-vm.c 2017-07-04 20:02:23.720384972 +0200
+@@ -13,6 +13,10 @@
+ #include "nv.h"
+ #include "nv-linux.h"
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++ #include <asm/set_memory.h>
++#endif
++
+ static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages)
+ {
+ if (nv_update_memory_types)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-340xx.git/commitdiff/386385f34ac514282aa95a7675988a7048313b5e
More information about the pld-cvs-commit
mailing list