1
0
Эх сурвалжийг харах

Add Linux 5.8

This change updates the kernel to Linux 5.8 based on Ubuntu 5.8.0-12.13
Fabian Mastenbroek 5 жил өмнө
parent
commit
5c0dd50088

+ 2 - 2
Makefile

@@ -1,7 +1,7 @@
 # also bump pve-kernel-meta if either of MAJ.MIN, PATCHLEVEL or KREL change
 KERNEL_MAJ=5
-KERNEL_MIN=7
-KERNEL_PATCHLEVEL=14
+KERNEL_MIN=8
+KERNEL_PATCHLEVEL=0
 # increment KREL if the ABI changes (abicheck target in debian/rules)
 # rebuild packages with new KREL and run 'make abiupdate'
 KREL=1

+ 6 - 0
debian/changelog

@@ -1,3 +1,9 @@
+pve-edge-kernel (5.8.0-1) edge; urgency=medium
+
+  * update to Linux 5.8 based on Ubuntu 5.8.0-12.13
+
+ -- Fabian Mastenbroek <[email protected]>  Sun, 9 Aug 2020 14:58:00 +0200
+
 pve-edge-kernel (5.7.14-1) edge; urgency=medium
 
   * update to Linux 5.7.14 based on Ubuntu 5.7.0-15.16

+ 1 - 1
debian/control.in

@@ -32,7 +32,7 @@ Build-Depends: asciidoc-base,
                tar,
                xmlto,
                zlib1g-dev,
-               dwarves
+               dwarves (>= 1.16)
 Build-Conflicts: pve-edge-headers-@KVNAME@,
 Vcs-Git: git://github.com/fabianishere/pve-edge-kernel.git
 Vcs-Browser: https://github.com/fabianishere/pve-edge-kernel

+ 154 - 0
patches/zfs/BACKPORT-Linux-5.8-compat-__vmalloc.patch

@@ -0,0 +1,154 @@
+From 6cc95288ccea12ad7b67b2b5b3997dfad8e5b5c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michael=20Niew=C3=B6hner?=
+ <[email protected]>
+Date: Tue, 9 Jun 2020 01:32:02 +0200
+Subject: [PATCH] BACKPORT: Linux 5.8 compat: __vmalloc()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The `pgprot` argument has been removed from `__vmalloc` in Linux 5.8,
+being `PAGE_KERNEL` always now [1].
+
+Detect this during configure and define a wrapper for older kernels.
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/mm/vmalloc.c?h=next-20200605&id=88dca4ca5a93d2c09e5bbc6a62fbfc3af83c4fca
+
+Reviewed-by: Brian Behlendorf <[email protected]>
+Co-authored-by: Sebastian Gottschall <[email protected]>
+Co-authored-by: Michael Niewöhner <[email protected]>
+Signed-off-by: Sebastian Gottschall <[email protected]>
+Signed-off-by: Michael Niewöhner <[email protected]>
+Closes #10422
+---
+ config/kernel-kmem.m4       | 26 ++++++++++++++++++++++++++
+ config/kernel.m4            |  2 ++
+ include/spl/sys/kmem.h      |  9 +++++++++
+ module/spl/spl-kmem-cache.c |  4 ++--
+ module/spl/spl-kmem.c       |  9 ++++-----
+ 5 files changed, 43 insertions(+), 7 deletions(-)
+
+diff --git a/config/kernel-kmem.m4 b/config/kernel-kmem.m4
+index cc055e530..f1c0d2412 100644
+--- a/config/kernel-kmem.m4
++++ b/config/kernel-kmem.m4
+@@ -56,3 +56,29 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [
+ 	AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
+ 	AC_MSG_RESULT([$enable_debug_kmem_tracking])
+ ])
++
++dnl #
++dnl # 5.8 API,
++dnl # __vmalloc PAGE_KERNEL removal
++dnl #
++AC_DEFUN([ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL], [
++	ZFS_LINUX_TEST_SRC([__vmalloc], [
++		#include <linux/mm.h>
++		#include <linux/vmalloc.h>
++	],[
++		void *p __attribute__ ((unused));
++
++		p = __vmalloc(0, GFP_KERNEL, PAGE_KERNEL);
++	])
++])
++
++AC_DEFUN([ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL], [
++	AC_MSG_CHECKING([whether __vmalloc(ptr, flags, pageflags) is available])
++	ZFS_LINUX_TEST_RESULT([__vmalloc], [
++		AC_MSG_RESULT(yes)
++		AC_DEFINE(HAVE_VMALLOC_PAGE_KERNEL, 1, [__vmalloc page flags exists])
++	],[
++		AC_MSG_RESULT(no)
++	])
++])
++-
+diff --git a/config/kernel.m4 b/config/kernel.m4
+index b67fcef8c..23edfdcd8 100644
+--- a/config/kernel.m4
++++ b/config/kernel.m4
+@@ -45,6 +45,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
+ 	ZFS_AC_KERNEL_SRC_SCHED
+ 	ZFS_AC_KERNEL_SRC_USLEEP_RANGE
+ 	ZFS_AC_KERNEL_SRC_KMEM_CACHE
++	ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL
+ 	ZFS_AC_KERNEL_SRC_WAIT
+ 	ZFS_AC_KERNEL_SRC_INODE_TIMES
+ 	ZFS_AC_KERNEL_SRC_INODE_LOCK
+@@ -163,6 +164,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
+ 	ZFS_AC_KERNEL_SCHED
+ 	ZFS_AC_KERNEL_USLEEP_RANGE
+ 	ZFS_AC_KERNEL_KMEM_CACHE
++	ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL
+ 	ZFS_AC_KERNEL_WAIT
+ 	ZFS_AC_KERNEL_INODE_TIMES
+ 	ZFS_AC_KERNEL_INODE_LOCK
+diff --git a/include/spl/sys/kmem.h b/include/spl/sys/kmem.h
+index 72d3a7765..ca15bfe7f 100644
+--- a/include/spl/sys/kmem.h
++++ b/include/spl/sys/kmem.h
+@@ -169,6 +169,15 @@ extern void *spl_kmem_alloc(size_t sz, int fl, const char *func, int line);
+ extern void *spl_kmem_zalloc(size_t sz, int fl, const char *func, int line);
+ extern void spl_kmem_free(const void *ptr, size_t sz);
+ 
++/*
++ * 5.8 API change, pgprot_t argument removed.
++ */
++#ifdef HAVE_VMALLOC_PAGE_KERNEL
++#define	spl_vmalloc(size, flags)	__vmalloc(size, flags, PAGE_KERNEL)
++#else
++#define	spl_vmalloc(size, flags)	__vmalloc(size, flags)
++#endif
++
+ /*
+  * The following functions are only available for internal use.
+  */
+diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c
+index d71b4b348..4866b2993 100644
+--- a/module/spl/spl-kmem-cache.c
++++ b/module/spl/spl-kmem-cache.c
+@@ -203,7 +203,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
+ 		ASSERT(ISP2(size));
+ 		ptr = (void *)__get_free_pages(lflags, get_order(size));
+ 	} else {
+-		ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL);
++		ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM);
+ 	}
+ 
+ 	/* Resulting allocated memory will be page aligned */
+@@ -1242,7 +1242,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj)
+ 	 * allocation.
+ 	 *
+ 	 * However, this can't be applied to KVM_VMEM due to a bug that
+-	 * __vmalloc() doesn't honor gfp flags in page table allocation.
++	 * spl_vmalloc() doesn't honor gfp flags in page table allocation.
+ 	 */
+ 	if (!(skc->skc_flags & KMC_VMEM)) {
+ 		rc = __spl_cache_grow(skc, flags | KM_NOSLEEP);
+diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
+index cee69ad43..ca1fc145f 100644
+--- a/module/spl/spl-kmem.c
++++ b/module/spl/spl-kmem.c
+@@ -172,16 +172,15 @@ spl_kmem_alloc_impl(size_t size, int flags, int node)
+ 		 * kmem_zalloc() callers.
+ 		 *
+ 		 * For vmem_alloc() and vmem_zalloc() callers it is permissible
+-		 * to use __vmalloc().  However, in general use of __vmalloc()
+-		 * is strongly discouraged because a global lock must be
+-		 * acquired.  Contention on this lock can significantly
++		 * to use spl_vmalloc().  However, in general use of
++		 * spl_vmalloc() is strongly discouraged because a global lock
++		 * must be acquired.  Contention on this lock can significantly
+ 		 * impact performance so frequently manipulating the virtual
+ 		 * address space is strongly discouraged.
+ 		 */
+ 		if ((size > spl_kmem_alloc_max) || use_vmem) {
+ 			if (flags & KM_VMEM) {
+-				ptr = __vmalloc(size, lflags | __GFP_HIGHMEM,
+-				    PAGE_KERNEL);
++				ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM);
+ 			} else {
+ 				return (NULL);
+ 			}
+-- 
+2.25.1
+

+ 1 - 1
submodules/ubuntu-mainline

@@ -1 +1 @@
-Subproject commit 8ec2a5579757602c1ab85f733e25de8f8ac4f5db
+Subproject commit 2fbac55619813a5702ce040a3f84e194fb5d7bd8