Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] nvidia390: adding a patch for linux5.8
@ 2020-09-01 17:30 MrLimb
  2020-09-01 18:23 ` ericonr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 17:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

There is a new pull request by MrLimb against master on the void-packages repository

https://github.com/MrLimb/void-packages master
https://github.com/void-linux/void-packages/pull/24591

nvidia390: adding a patch for linux5.8


A patch file from https://github.com/void-linux/void-packages/pull/24591.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-24591.patch --]
[-- Type: text/x-diff, Size: 4525 bytes --]

From e4c7fc22aba8c6f6bb1f0292d8df8b02b6cc48e7 Mon Sep 17 00:00:00 2001
From: MrLimb <darkdevilcoming@yandex.kz>
Date: Tue, 1 Sep 2020 17:22:57 +0000
Subject: [PATCH] nvidia390: adding a patch for linux5.8

---
 srcpkgs/nvidia390/files/kernel-5.8.patch | 96 ++++++++++++++++++++++++
 srcpkgs/nvidia390/template               |  5 ++
 2 files changed, 101 insertions(+)
 create mode 100644 srcpkgs/nvidia390/files/kernel-5.8.patch

diff --git a/srcpkgs/nvidia390/files/kernel-5.8.patch b/srcpkgs/nvidia390/files/kernel-5.8.patch
new file mode 100644
index 00000000000..48649d7e6aa
--- /dev/null
+++ b/srcpkgs/nvidia390/files/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
diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template
index 8de5524fca7..c2b18296bac 100644
--- a/srcpkgs/nvidia390/template
+++ b/srcpkgs/nvidia390/template
@@ -38,6 +38,11 @@ do_extract() {
 	rm -f ${_pkg}.run
 }
 
+do_patch() {
+	cd ${_pkg}
+	patch -p1 < ${FILESDIR}/kernel-5.8.patch
+}
+
 pre_install() {
 	cd ${_pkg}
 	cp nvidia_icd.json.template nvidia_icd.json

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
@ 2020-09-01 18:23 ` ericonr
  2020-09-01 18:31 ` MrLimb
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ericonr @ 2020-09-01 18:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/24591#issuecomment-685051939

Comment:
Why can't this be added as a patch in `srcpkgs/nvidia-390/patches` ?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
  2020-09-01 18:23 ` ericonr
@ 2020-09-01 18:31 ` MrLimb
  2020-09-01 18:48 ` MrLimb
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 18:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

New comment by MrLimb on void-packages repository

https://github.com/void-linux/void-packages/pull/24591#issuecomment-685056666

Comment:
> Why can't this be added as a patch in `srcpkgs/nvidia-390/patches` ?

I'm sorry, but has something changed? Can I create a separate file? I'll read the documentation again.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
  2020-09-01 18:23 ` ericonr
  2020-09-01 18:31 ` MrLimb
@ 2020-09-01 18:48 ` MrLimb
  2020-09-01 19:01 ` [PR PATCH] [Updated] " MrLimb
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 18:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

New comment by MrLimb on void-packages repository

https://github.com/void-linux/void-packages/pull/24591#issuecomment-685056666

Comment:
> Why can't this be added as a patch in `srcpkgs/nvidia-390/patches` ?

I'm sorry, but has something changed? Can I create a separate file? I'll read the documentation again.

UPD: I look at this, thanks. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
                   ` (2 preceding siblings ...)
  2020-09-01 18:48 ` MrLimb
@ 2020-09-01 19:01 ` MrLimb
  2020-09-01 19:10 ` MrLimb
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 19:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

There is an updated pull request by MrLimb against master on the void-packages repository

https://github.com/MrLimb/void-packages master
https://github.com/void-linux/void-packages/pull/24591

nvidia390: adding a patch for linux5.8
Fixing the nvidia drivers, again. Hello, @ericonr . 

A patch file from https://github.com/void-linux/void-packages/pull/24591.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-24591.patch --]
[-- Type: text/x-diff, Size: 5581 bytes --]

From e4c7fc22aba8c6f6bb1f0292d8df8b02b6cc48e7 Mon Sep 17 00:00:00 2001
From: MrLimb <darkdevilcoming@yandex.kz>
Date: Tue, 1 Sep 2020 17:22:57 +0000
Subject: [PATCH 1/2] nvidia390: adding a patch for linux5.8

---
 srcpkgs/nvidia390/files/kernel-5.8.patch | 96 ++++++++++++++++++++++++
 srcpkgs/nvidia390/template               |  5 ++
 2 files changed, 101 insertions(+)
 create mode 100644 srcpkgs/nvidia390/files/kernel-5.8.patch

diff --git a/srcpkgs/nvidia390/files/kernel-5.8.patch b/srcpkgs/nvidia390/files/kernel-5.8.patch
new file mode 100644
index 00000000000..48649d7e6aa
--- /dev/null
+++ b/srcpkgs/nvidia390/files/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
diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template
index 8de5524fca7..c2b18296bac 100644
--- a/srcpkgs/nvidia390/template
+++ b/srcpkgs/nvidia390/template
@@ -38,6 +38,11 @@ do_extract() {
 	rm -f ${_pkg}.run
 }
 
+do_patch() {
+	cd ${_pkg}
+	patch -p1 < ${FILESDIR}/kernel-5.8.patch
+}
+
 pre_install() {
 	cd ${_pkg}
 	cp nvidia_icd.json.template nvidia_icd.json

From a0d88896aa07016257de453a4a1aadf45a9b8fa2 Mon Sep 17 00:00:00 2001
From: MrLimb <darkdevilcoming@yandex.kz>
Date: Tue, 1 Sep 2020 19:00:48 +0000
Subject: [PATCH 2/2] nvidia390: adding a patch for linux5.8

---
 srcpkgs/nvidia390/{files => patches}/kernel-5.8.patch | 0
 srcpkgs/nvidia390/template                            | 5 -----
 2 files changed, 5 deletions(-)
 rename srcpkgs/nvidia390/{files => patches}/kernel-5.8.patch (100%)

diff --git a/srcpkgs/nvidia390/files/kernel-5.8.patch b/srcpkgs/nvidia390/patches/kernel-5.8.patch
similarity index 100%
rename from srcpkgs/nvidia390/files/kernel-5.8.patch
rename to srcpkgs/nvidia390/patches/kernel-5.8.patch
diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template
index c2b18296bac..8de5524fca7 100644
--- a/srcpkgs/nvidia390/template
+++ b/srcpkgs/nvidia390/template
@@ -38,11 +38,6 @@ do_extract() {
 	rm -f ${_pkg}.run
 }
 
-do_patch() {
-	cd ${_pkg}
-	patch -p1 < ${FILESDIR}/kernel-5.8.patch
-}
-
 pre_install() {
 	cd ${_pkg}
 	cp nvidia_icd.json.template nvidia_icd.json

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
                   ` (3 preceding siblings ...)
  2020-09-01 19:01 ` [PR PATCH] [Updated] " MrLimb
@ 2020-09-01 19:10 ` MrLimb
  2020-09-01 19:13 ` MrLimb
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 19:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

There is an updated pull request by MrLimb against master on the void-packages repository

https://github.com/MrLimb/void-packages master
https://github.com/void-linux/void-packages/pull/24591

nvidia390: adding a patch for linux5.8
Fixing the nvidia drivers, again. Hello, @ericonr . 

A patch file from https://github.com/void-linux/void-packages/pull/24591.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-24591.patch --]
[-- Type: text/x-diff, Size: 9670 bytes --]

From e4c7fc22aba8c6f6bb1f0292d8df8b02b6cc48e7 Mon Sep 17 00:00:00 2001
From: MrLimb <darkdevilcoming@yandex.kz>
Date: Tue, 1 Sep 2020 17:22:57 +0000
Subject: [PATCH 1/3] nvidia390: adding a patch for linux5.8

---
 srcpkgs/nvidia390/files/kernel-5.8.patch | 96 ++++++++++++++++++++++++
 srcpkgs/nvidia390/template               |  5 ++
 2 files changed, 101 insertions(+)
 create mode 100644 srcpkgs/nvidia390/files/kernel-5.8.patch

diff --git a/srcpkgs/nvidia390/files/kernel-5.8.patch b/srcpkgs/nvidia390/files/kernel-5.8.patch
new file mode 100644
index 00000000000..48649d7e6aa
--- /dev/null
+++ b/srcpkgs/nvidia390/files/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
diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template
index 8de5524fca7..c2b18296bac 100644
--- a/srcpkgs/nvidia390/template
+++ b/srcpkgs/nvidia390/template
@@ -38,6 +38,11 @@ do_extract() {
 	rm -f ${_pkg}.run
 }
 
+do_patch() {
+	cd ${_pkg}
+	patch -p1 < ${FILESDIR}/kernel-5.8.patch
+}
+
 pre_install() {
 	cd ${_pkg}
 	cp nvidia_icd.json.template nvidia_icd.json

From a0d88896aa07016257de453a4a1aadf45a9b8fa2 Mon Sep 17 00:00:00 2001
From: MrLimb <darkdevilcoming@yandex.kz>
Date: Tue, 1 Sep 2020 19:00:48 +0000
Subject: [PATCH 2/3] nvidia390: adding a patch for linux5.8

---
 srcpkgs/nvidia390/{files => patches}/kernel-5.8.patch | 0
 srcpkgs/nvidia390/template                            | 5 -----
 2 files changed, 5 deletions(-)
 rename srcpkgs/nvidia390/{files => patches}/kernel-5.8.patch (100%)

diff --git a/srcpkgs/nvidia390/files/kernel-5.8.patch b/srcpkgs/nvidia390/patches/kernel-5.8.patch
similarity index 100%
rename from srcpkgs/nvidia390/files/kernel-5.8.patch
rename to srcpkgs/nvidia390/patches/kernel-5.8.patch
diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template
index c2b18296bac..8de5524fca7 100644
--- a/srcpkgs/nvidia390/template
+++ b/srcpkgs/nvidia390/template
@@ -38,11 +38,6 @@ do_extract() {
 	rm -f ${_pkg}.run
 }
 
-do_patch() {
-	cd ${_pkg}
-	patch -p1 < ${FILESDIR}/kernel-5.8.patch
-}
-
 pre_install() {
 	cd ${_pkg}
 	cp nvidia_icd.json.template nvidia_icd.json

From 19c7d4172e77d1fb55984c7618a9b975440d9833 Mon Sep 17 00:00:00 2001
From: MrLimb <39676462+MrLimb@users.noreply.github.com>
Date: Wed, 2 Sep 2020 01:10:55 +0600
Subject: [PATCH 3/3] test-1

---
 srcpkgs/nvidia390/patches/kernel-5.8.patch | 96 ----------------------
 1 file changed, 96 deletions(-)
 delete mode 100644 srcpkgs/nvidia390/patches/kernel-5.8.patch

diff --git a/srcpkgs/nvidia390/patches/kernel-5.8.patch b/srcpkgs/nvidia390/patches/kernel-5.8.patch
deleted file mode 100644
index 48649d7e6aa..00000000000
--- a/srcpkgs/nvidia390/patches/kernel-5.8.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
                   ` (4 preceding siblings ...)
  2020-09-01 19:10 ` MrLimb
@ 2020-09-01 19:13 ` MrLimb
  2020-09-01 19:13 ` [PR PATCH] [Closed]: " MrLimb
  2020-09-01 19:23 ` ericonr
  7 siblings, 0 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 19:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New comment by MrLimb on void-packages repository

https://github.com/void-linux/void-packages/pull/24591#issuecomment-685077365

Comment:
I'll reopen it. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Closed]: nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
                   ` (5 preceding siblings ...)
  2020-09-01 19:13 ` MrLimb
@ 2020-09-01 19:13 ` MrLimb
  2020-09-01 19:23 ` ericonr
  7 siblings, 0 replies; 9+ messages in thread
From: MrLimb @ 2020-09-01 19:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

There's a closed pull request on the void-packages repository

nvidia390: adding a patch for linux5.8
https://github.com/void-linux/void-packages/pull/24591

Description:
Fixing the nvidia drivers, again. Hello, @ericonr . 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nvidia390: adding a patch for linux5.8
  2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
                   ` (6 preceding siblings ...)
  2020-09-01 19:13 ` [PR PATCH] [Closed]: " MrLimb
@ 2020-09-01 19:23 ` ericonr
  7 siblings, 0 replies; 9+ messages in thread
From: ericonr @ 2020-09-01 19:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/24591#issuecomment-685082536

Comment:
Please don't open and reopen it, that just makes life harder for maintainers, because they receive an email for each action. Leave the PR open and make changes with it open.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-01 19:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 17:30 [PR PATCH] nvidia390: adding a patch for linux5.8 MrLimb
2020-09-01 18:23 ` ericonr
2020-09-01 18:31 ` MrLimb
2020-09-01 18:48 ` MrLimb
2020-09-01 19:01 ` [PR PATCH] [Updated] " MrLimb
2020-09-01 19:10 ` MrLimb
2020-09-01 19:13 ` MrLimb
2020-09-01 19:13 ` [PR PATCH] [Closed]: " MrLimb
2020-09-01 19:23 ` ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).