summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlonso Rodriguez2020-08-15 20:23:57 +0200
committerAlonso Rodriguez2020-08-15 20:23:57 +0200
commita6dfb5c85dfb645397d2240b2fa29b5ee8a53688 (patch)
treec91a364be3b8625846d831313890af749c62b944
parente881d685260fbda0a155471e6435a1709b5f4cce (diff)
downloadaur-a6dfb5c85dfb.tar.gz
Kernel 5.8 patch
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--kernel-5.8.patch96
3 files changed, 107 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8d7469c2811..9b077d7d693 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nvidia-390xx
pkgdesc = NVIDIA drivers for linux, 390xx legacy branch
pkgver = 390.138
- pkgrel = 3
+ pkgrel = 5
url = https://www.nvidia.com/
arch = x86_64
license = custom
@@ -12,8 +12,10 @@ pkgbase = nvidia-390xx
options = !strip
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/390.138/NVIDIA-Linux-x86_64-390.138-no-compat32.run
source = kernel-4.16.patch
+ source = kernel-5.8.patch
sha256sums = a34a19b618be0eb06c4699247489833a8f22c59423f246248614e0a59b1508da
sha256sums = 622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385
+ sha256sums = e3df2945e29a9834d2c1c21eb6871b1672f25bd809b413cd5e0b45d0d2c815a5
pkgname = nvidia-390xx
pkgdesc = NVIDIA drivers for linux, 390xx legacy branch
diff --git a/PKGBUILD b/PKGBUILD
index 4c0665b26be..b8440313339 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgbase=nvidia-390xx
pkgname=(nvidia-390xx nvidia-390xx-dkms)
pkgver=390.138
-pkgrel=3
+pkgrel=5
pkgdesc="NVIDIA drivers for linux, 390xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
@@ -16,9 +16,11 @@ license=('custom')
options=('!strip')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
- 'kernel-4.16.patch')
+ 'kernel-4.16.patch'
+ 'kernel-5.8.patch')
sha256sums=('a34a19b618be0eb06c4699247489833a8f22c59423f246248614e0a59b1508da'
- '622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385')
+ '622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385'
+ 'e3df2945e29a9834d2c1c21eb6871b1672f25bd809b413cd5e0b45d0d2c815a5')
prepare() {
sh "${_pkg}.run" --extract-only
@@ -28,6 +30,9 @@ prepare() {
# https://bugs.archlinux.org/task/58074
patch -Np1 -i ../kernel-4.16.patch
+ # 5.8 Patch
+ patch -Np1 -i ../kernel-5.8.patch
+
## OLD PATCHES [390.132] ##
diff --git a/kernel-5.8.patch b/kernel-5.8.patch
new file mode 100644
index 00000000000..48649d7e6aa
--- /dev/null
+++ b/kernel-5.8.patch
@@ -0,0 +1,96 @@
+diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h
+index ac5bb95..3d2f0b7 100644
+--- a/kernel/common/inc/nv-linux.h
++++ b/kernel/common/inc/nv-linux.h
+@@ -531,7 +531,11 @@ extern int nv_pat_mode;
+
+ static inline void *nv_vmalloc(unsigned long size)
+ {
++#if defined(NV_VMALLOC_HAS_PGPROT_T_ARG)
+ void *ptr = __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
++#else
++ void *ptr = __vmalloc(size, GFP_KERNEL);
++#endif
+ if (ptr)
+ NV_MEMDBG_ADD(ptr, size);
+ return ptr;
+diff --git a/kernel/common/inc/nv-mm.h b/kernel/common/inc/nv-mm.h
+index 1270bf3..d2d7657 100644
+--- a/kernel/common/inc/nv-mm.h
++++ b/kernel/common/inc/nv-mm.h
+@@ -29,6 +29,10 @@
+ typedef int vm_fault_t;
+ #endif
+
++#if defined(NV_MM_HAS_MMAP_LOCK)
++#define mmap_sem mmap_lock
++#endif
++
+ /* get_user_pages
+ *
+ * The 8-argument version of get_user_pages was deprecated by commit
+diff --git a/kernel/conftest.sh b/kernel/conftest.sh
+index 7da7505..7793dd6 100755
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -4067,6 +4067,44 @@ compile_test() {
+ compile_check_conftest "$CODE" "NV_KTIME_GET_REAL_TS64_PRESENT" "" "functions"
+ ;;
+
++ vmalloc_has_pgprot_t_arg)
++ #
++ # Determine if __vmalloc has the 'pgprot' argument.
++ #
++ # The third argument to __vmalloc, page protection
++ # 'pgprot_t prot', was removed by commit 88dca4ca5a93
++ # (mm: remove the pgprot argument to __vmalloc)
++ # in v5.8-rc1 (2020-06-01).
++ CODE="
++ #include <linux/vmalloc.h>
++
++ void conftest_vmalloc_has_pgprot_t_arg(void) {
++ pgprot_t prot;
++ (void)__vmalloc(0, 0, prot);
++ }"
++
++ compile_check_conftest "$CODE" "NV_VMALLOC_HAS_PGPROT_T_ARG" "" "types"
++
++ ;;
++
++ mm_has_mmap_lock)
++ #
++ # Determine if the 'mm_struct' structure has a 'mmap_lock' field.
++ #
++ # Kernel commit da1c55f1b272 ("mmap locking API: rename mmap_sem
++ # to mmap_lock") replaced the field 'mmap_sem' by 'mmap_lock'
++ # in v5.8-rc1 (2020-06-08).
++ CODE="
++ #include <linux/mm_types.h>
++
++ int conftest_mm_has_mmap_lock(void) {
++ return offsetof(struct mm_struct, mmap_lock);
++ }"
++
++ compile_check_conftest "$CODE" "NV_MM_HAS_MMAP_LOCK" "" "types"
++
++ ;;
++
+ pci_dev_has_skip_bus_pm)
+ #
+ # Determine if skip_bus_pm flag is present in struct pci_dev.
+diff --git a/kernel/nvidia/nvidia.Kbuild b/kernel/nvidia/nvidia.Kbuild
+index 63e369f..656db7b 100644
+--- a/kernel/nvidia/nvidia.Kbuild
++++ b/kernel/nvidia/nvidia.Kbuild
+@@ -192,7 +192,9 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += iterate_dir
+ NV_CONFTEST_TYPE_COMPILE_TESTS += kstrtoull
+ NV_CONFTEST_TYPE_COMPILE_TESTS += backlight_properties_type
+ NV_CONFTEST_TYPE_COMPILE_TESTS += proc_ops
++NV_CONFTEST_TYPE_COMPILE_TESTS += vmalloc_has_pgprot_t_arg
+ NV_CONFTEST_TYPE_COMPILE_TESTS += timeval
++NV_CONFTEST_TYPE_COMPILE_TESTS += mm_has_mmap_lock
+ NV_CONFTEST_TYPE_COMPILE_TESTS += kmem_cache_has_kobj_remove_work
+ NV_CONFTEST_TYPE_COMPILE_TESTS += sysfs_slab_unlink
+ NV_CONFTEST_TYPE_COMPILE_TESTS += pci_dev_has_skip_bus_pm
+--
+2.25.1