From 99148f5768f87f16de3d665144e100143496eed0 Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Sun, 28 Jul 2019 10:43:40 +0200 Subject: [PATCH] nvidia390: add patch for linux-5.2 --- .../nvidia390/files/kernel-5.2-x86_64.patch | 18 ++++++++++++++++++ srcpkgs/nvidia390/template | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/nvidia390/files/kernel-5.2-x86_64.patch diff --git a/srcpkgs/nvidia390/files/kernel-5.2-x86_64.patch b/srcpkgs/nvidia390/files/kernel-5.2-x86_64.patch new file mode 100644 index 0000000000..344771d27d --- /dev/null +++ b/srcpkgs/nvidia390/files/kernel-5.2-x86_64.patch @@ -0,0 +1,18 @@ +diff -u -r a/kernel/nvidia-uvm/uvm8_tools.c b/kernel/nvidia-uvm/uvm8_tools.c +--- a/kernel/nvidia-uvm/uvm8_tools.c 2019-01-27 16:12:22.000000000 +0000 ++++ b/kernel/nvidia-uvm/uvm8_tools.c 2019-07-09 04:42:40.134899491 +0000 +@@ -204,12 +204,14 @@ + return event_tracker != NULL && !event_tracker->is_queue; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) + static void put_user_pages(struct page **pages, NvU64 page_count) + { + NvU64 i; + for (i = 0; i < page_count; i++) + put_page(pages[i]); + } ++#endif + + static void unmap_user_pages(struct page **pages, void *addr, NvU64 size) + { diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template index 487f01e8f3..ab2c8765ee 100644 --- a/srcpkgs/nvidia390/template +++ b/srcpkgs/nvidia390/template @@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 400, 500 series)" pkgname=nvidia390 version=390.116 -revision=2 +revision=3 maintainer="Juan RP " license="Proprietary NVIDIA license" homepage="http://www.nvidia.com" @@ -46,6 +46,7 @@ do_patch() { case "$XBPS_TARGET_MACHINE" in x86_64) patch -p1 < ${FILESDIR}/kernel-5.1-x86_64.patch + patch -p1 < ${FILESDIR}/kernel-5.2-x86_64.patch ;; esac }