[PATCH v1 7/8] s390/kdump: Skip the crashkernel CMA DMA wait
From: Mikhail Zaslonko
Date: Thu Nov 12 2026 - 07:06:34 EST
With a crashkernel CMA reservation, __crash_kexec() waits 10 seconds
before starting the kdump kernel, so that pending DMA into the CMA
memory can finish.
s390 does not need this: before it jumps to the kdump kernel,
s390_reset_system() issues diag 308 subcode 1, which terminates all
in-flight I/O.
Let architectures override the timeout and set it to 0 on s390.
Signed-off-by: Mikhail Zaslonko <zaslonko@xxxxxxxxxxxxx>
---
arch/s390/include/asm/kexec.h | 3 +++
kernel/crash_core.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/arch/s390/include/asm/kexec.h b/arch/s390/include/asm/kexec.h
index 9084b750350d..2e15c4fa70a0 100644
--- a/arch/s390/include/asm/kexec.h
+++ b/arch/s390/include/asm/kexec.h
@@ -97,6 +97,9 @@ void arch_kexec_unprotect_crashkres(void);
bool is_kdump_kernel(void);
#define is_kdump_kernel is_kdump_kernel
+
+/* s390_reset_system() stops all I/O before the kdump kernel starts */
+#define CMA_DMA_TIMEOUT_SEC 0
#endif
#ifdef CONFIG_KEXEC_FILE
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index d0bd2d0cf899..5f60d252f4f1 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -36,7 +36,9 @@ note_buf_t __percpu *crash_notes;
/* time to wait for possible DMA to finish before starting the kdump kernel
* when a CMA reservation is used
*/
+#ifndef CMA_DMA_TIMEOUT_SEC
#define CMA_DMA_TIMEOUT_SEC 10
+#endif
#ifdef CONFIG_CRASH_DUMP
--
2.55.0