nvidia340: add linux-4.12.patch
Fixes building against linux 4.12 by conditionally including asm/set_memory.h where functions moved to that file are called in the conftest and module code. Closes: #6957 [via git-merge-pr]
This commit is contained in:
parent
d5fd6cdaa5
commit
e2cd93427f
2 changed files with 97 additions and 1 deletions
95
srcpkgs/nvidia340/files/linux-4.12.patch
Normal file
95
srcpkgs/nvidia340/files/linux-4.12.patch
Normal file
|
@ -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)
|
|
@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 8, 9, 9M, 100, 100M, 200, 300 series)"
|
|||
|
||||
pkgname=nvidia340
|
||||
version=340.102
|
||||
revision=4
|
||||
revision=5
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="Proprietary NVIDIA license"
|
||||
homepage="http://www.nvidia.com"
|
||||
|
@ -43,6 +43,7 @@ do_configure() {
|
|||
patch -p0 < ${FILESDIR}/patch_nv1.diff
|
||||
patch -p0 < ${FILESDIR}/4.10.0_kernel.patch
|
||||
patch -p0 < ${FILESDIR}/linux-4.11.patch
|
||||
patch -p0 < ${FILESDIR}/linux-4.12.patch
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
|
Loading…
Reference in a new issue