Thread (15 messages) 15 messages, 4 authors, 2022-09-01

Re: [PATCH-RESEND] arm64/kexec: Fix missing extra range for crashkres_low.

From: Baoquan He <hidden>
Date: 2022-08-30 07:37:17
Also in: kexec, lkml

On 08/30/22 at 01:28pm, Yun Levi wrote:
quoted hunk ↗ jump to hunk
Like crashk_res, Calling crash_exclude_mem_range function with
crashk_low_res area would need extra crash_mem range too.
Add one extra crash_mem range when crashk_low_res is used.

Signed-off-by: Levi Yun <redacted>
---
 arch/arm64/kernel/machine_kexec_file.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/machine_kexec_file.c
b/arch/arm64/kernel/machine_kexec_file.c
index 889951291cc0..378aee04e7d4 100644
--- a/arch/arm64/kernel/machine_kexec_file.c
+++ b/arch/arm64/kernel/machine_kexec_file.c
@@ -51,6 +51,9 @@ static int prepare_elf_headers(void **addr, unsigned long *sz)
        for_each_mem_range(i, &start, &end)
                nr_ranges++;

+       if (crashk_low_res.end)
+               nr_ranges++; /**< for exclusion of
crashkernel=size,low region */
+
Right, excluding crashkernel region may cause memory region splitting,
so we need extra slot for that.

Meanwhile, can you fix above code comment mess? Otherwise, this looks
good to me. 

Or we can add extra 2 slots like we do in x86, it just add another 16
bytes temporarily.

        cmem = kmalloc(struct_size(cmem, ranges, nr_ranges), GFP_KERNEL);
        if (!cmem)
                return -ENOMEM;
--
2.35.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help