[linux-yocto] [PATCH 20/26] arm64: kdump: relax BUG_ON() if more than one cpus are still active

Daniel Dragomir daniel.dragomir at windriver.com
Wed Nov 16 08:56:56 PST 2016


From: AKASHI Takahiro <takahiro.akashi at linaro.org>

We should try best in case of kdump.
So even if not all secondary cpus have shut down, we do kdump anyway.

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 arch/arm64/kernel/machine_kexec.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c
index 06b9bc2..7f7fec5 100644
--- a/arch/arm64/kernel/machine_kexec.c
+++ b/arch/arm64/kernel/machine_kexec.c
@@ -148,7 +148,13 @@ void machine_kexec(struct kimage *kimage)
 	phys_addr_t reboot_code_buffer_phys;
 	void *reboot_code_buffer;
 
-	BUG_ON(num_online_cpus() > 1);
+	if (num_online_cpus() > 1) {
+		if (in_crash_kexec)
+			pr_warn("*\n* kdump might fail because %d cpus are still online\n*\n",
+				num_online_cpus());
+		else
+			BUG();
+	}
 
 	reboot_code_buffer_phys = page_to_phys(kimage->control_code_page);
 	reboot_code_buffer = phys_to_virt(reboot_code_buffer_phys);
-- 
2.7.4



More information about the linux-yocto mailing list