]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Mar 2021 12:12:53 +0000 (13:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Mar 2021 12:12:53 +0000 (13:12 +0100)
added patches:
riscv-correct-sparsemem-configuration.patch

queue-5.4/riscv-correct-sparsemem-configuration.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/riscv-correct-sparsemem-configuration.patch b/queue-5.4/riscv-correct-sparsemem-configuration.patch
new file mode 100644 (file)
index 0000000..d98e2b7
--- /dev/null
@@ -0,0 +1,42 @@
+From a5406a7ff56e63376c210b06072aa0ef23473366 Mon Sep 17 00:00:00 2001
+From: Kefeng Wang <wangkefeng.wang@huawei.com>
+Date: Mon, 15 Mar 2021 20:03:07 +0800
+Subject: riscv: Correct SPARSEMEM configuration
+
+From: Kefeng Wang <wangkefeng.wang@huawei.com>
+
+commit a5406a7ff56e63376c210b06072aa0ef23473366 upstream.
+
+There are two issues for RV32,
+1) if use FLATMEM, it is useless to enable SPARSEMEM_STATIC.
+2) if use SPARSMEM, both SPARSEMEM_VMEMMAP and SPARSEMEM_STATIC is enabled.
+
+Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem")
+Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/riscv/Kconfig |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/riscv/Kconfig
++++ b/arch/riscv/Kconfig
+@@ -58,7 +58,6 @@ config RISCV
+       select EDAC_SUPPORT
+       select ARCH_HAS_GIGANTIC_PAGE
+       select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
+-      select SPARSEMEM_STATIC if 32BIT
+       select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
+       select HAVE_ARCH_MMAP_RND_BITS
+       select HAVE_COPY_THREAD_TLS
+@@ -102,7 +101,8 @@ config ARCH_FLATMEM_ENABLE
+ config ARCH_SPARSEMEM_ENABLE
+       def_bool y
+       depends on MMU
+-      select SPARSEMEM_VMEMMAP_ENABLE
++      select SPARSEMEM_STATIC if 32BIT && SPARSMEM
++      select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
+ config ARCH_SELECT_MEMORY_MODEL
+       def_bool ARCH_SPARSEMEM_ENABLE
index 98fbe0df54342fd2dff52996fbea40382d74720e..b231ef09f6a7ef5d2c77f5e8f97345a8df7d97d7 100644 (file)
@@ -26,3 +26,4 @@ vfio-iommu_api-should-be-selected.patch
 sunrpc-fix-refcount-leak-for-rpc-auth-modules.patch
 net-qrtr-fix-__netdev_alloc_skb-call.patch
 kbuild-fix-linux-version.h-for-empty-sublevel-or-patchlevel-again.patch
+riscv-correct-sparsemem-configuration.patch