summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/crash_core.h
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2023-09-14 11:31:40 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-10-04 10:41:58 -0700
commitfdc268232dbbae8d3acdc5536370b53327be3bb0 (patch)
tree4cefbeb7b2db1c87320b04ec1abc4510aea02cb1 /arch/arm64/include/asm/crash_core.h
parent9c08a2a139fe83f217625ee0352ce531b9a666ea (diff)
downloadlinux-stable-fdc268232dbbae8d3acdc5536370b53327be3bb0.tar.gz
linux-stable-fdc268232dbbae8d3acdc5536370b53327be3bb0.tar.bz2
linux-stable-fdc268232dbbae8d3acdc5536370b53327be3bb0.zip
arm64: kdump: use generic interface to simplify crashkernel reservation
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/arm64/Kconfig. The old reserve_crashkernel_low() and reserve_crashkernel() can be removed. Link: https://lkml.kernel.org/r/20230914033142.676708-8-bhe@redhat.com Signed-off-by: Baoquan He <bhe@redhat.com> Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Jiahao <chenjiahao16@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/arm64/include/asm/crash_core.h')
-rw-r--r--arch/arm64/include/asm/crash_core.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/crash_core.h b/arch/arm64/include/asm/crash_core.h
new file mode 100644
index 000000000000..9f5c8d339f44
--- /dev/null
+++ b/arch/arm64/include/asm/crash_core.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _ARM64_CRASH_CORE_H
+#define _ARM64_CRASH_CORE_H
+
+/* Current arm64 boot protocol requires 2MB alignment */
+#define CRASH_ALIGN SZ_2M
+
+#define CRASH_ADDR_LOW_MAX arm64_dma_phys_limit
+#define CRASH_ADDR_HIGH_MAX (PHYS_MASK + 1)
+#endif