Skip to contentSkip to conversation

riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Oct 4, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: riscv: kdump: use generic interface to simplify crashkernel reservation
has been removed from the -mm tree. Its filename was
riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Baoquan He <[email protected]>
Subject: riscv: kdump: use generic interface to simplify crashkernel reservation
Date: Thu, 14 Sep 2023 11:31:41 +0800

With the help of newly changed function parse_crashkernel() and generic reserve_crashkernel_generic(), crashkernel reservation can be simplified by steps:

1) Add a new header file <asm/crash_core.h>, and define CRASH_ALIGN, CRASH_ADDR_LOW_MAX, CRASH_ADDR_HIGH_MAX and DEFAULT_CRASH_KERNEL_LOW_SIZE in <asm/crash_core.h>;

2) Add arch_reserve_crashkernel() to call parse_crashkernel() and reserve_crashkernel_generic();

3) Add ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION Kconfig in arch/riscv/Kconfig.

The old reserve_crashkernel_low() and reserve_crashkernel() can be removed.

---

 arch/riscv/Kconfig                  |    3 
 arch/riscv/include/asm/crash_core.h |   11 ++
 arch/riscv/include/asm/processor.h  |    2 
 arch/riscv/kernel/setup.c           |   13 --
 arch/riscv/mm/init.c                |  141 ++------------------------
 5 files changed, 27 insertions(+), 143 deletions(-)
arch/riscv/include/asm/crash_core.h new file +11 -0
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _RISCV_CRASH_CORE_H
+#define _RISCV_CRASH_CORE_H
+
+#define CRASH_ALIGN			PMD_SIZE
+
+#define CRASH_ADDR_LOW_MAX		dma32_phys_limit
+#define CRASH_ADDR_HIGH_MAX		memblock_end_of_DRAM()
+
+extern phys_addr_t memblock_end_of_DRAM(void);
+#endif
arch/riscv/include/asm/processor.h renamed from arch/riscv/include/asm/processor.h~riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation +2 -0
@@ -116,6 +116,8 @@ static inline void wait_for_interrupt(vo
 	__asm__ __volatile__ ("wfi");
 }
 
+extern phys_addr_t dma32_phys_limit;
+
 struct device_node;
 int riscv_of_processor_hartid(struct device_node *node, unsigned long *hartid);
 int riscv_early_of_processor_hartid(struct device_node *node, unsigned long *hartid);
arch/riscv/Kconfig renamed from arch/riscv/Kconfig~riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation +3 -0
@@ -694,6 +694,9 @@ config ARCH_SUPPORTS_KEXEC_PURGATORY
 config ARCH_SUPPORTS_CRASH_DUMP
 	def_bool y
 
+config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
+	def_bool CRASH_CORE
+
 config COMPAT
 	bool "Kernel support for 32-bit U-mode"
 	default 64BIT
arch/riscv/kernel/setup.c renamed from arch/riscv/kernel/setup.c~riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation +0 -13
@@ -173,19 +173,6 @@ static void __init init_resources(void)
 	if (ret < 0)
 		goto error;
 
-#ifdef CONFIG_KEXEC_CORE
-	if (crashk_res.start != crashk_res.end) {
-		ret = add_resource(&iomem_resource, &crashk_res);
-		if (ret < 0)
-			goto error;
-	}
-	if (crashk_low_res.start != crashk_low_res.end) {
-		ret = add_resource(&iomem_resource, &crashk_low_res);
-		if (ret < 0)
-			goto error;
-	}
-#endif
-
 #ifdef CONFIG_CRASH_DUMP
 	if (elfcorehdr_size > 0) {
 		elfcorehdr_res.start = elfcorehdr_addr;
arch/riscv/mm/init.c renamed from arch/riscv/mm/init.c~riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation +11 -130

175 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are