summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2018-07-31 13:09:03 +0200
committerWill Deacon <will.deacon@arm.com>2018-07-31 13:10:38 +0200
commitdcab90d90935f990407c86b671a7f1ac285d106c (patch)
tree6e5176cd76acbbd9882b50b921d66fb9122771f7 /arch/arm64/kernel/machine_kexec.c
parentarm64: sdei: Mark sdei stack helper functions as static (diff)
downloadlinux-dcab90d90935f990407c86b671a7f1ac285d106c.tar.xz
linux-dcab90d90935f990407c86b671a7f1ac285d106c.zip
arm64: kexec: Add comment to explain use of __flush_icache_range()
Now that we understand the deadlock arising from flush_icache_range() on the kexec crash kernel path, add a comment to justify the use of __flush_icache_range() here. Reported-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/machine_kexec.c')
-rw-r--r--arch/arm64/kernel/machine_kexec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c
index 4c0eb30bfede..f6a5c6bc1434 100644
--- a/arch/arm64/kernel/machine_kexec.c
+++ b/arch/arm64/kernel/machine_kexec.c
@@ -184,8 +184,15 @@ void machine_kexec(struct kimage *kimage)
/* Flush the reboot_code_buffer in preparation for its execution. */
__flush_dcache_area(reboot_code_buffer, arm64_relocate_new_kernel_size);
+
+ /*
+ * Although we've killed off the secondary CPUs, we don't update
+ * the online mask if we're handling a crash kernel and consequently
+ * need to avoid flush_icache_range(), which will attempt to IPI
+ * the offline CPUs. Therefore, we must use the __* variant here.
+ */
__flush_icache_range((uintptr_t)reboot_code_buffer,
- arm64_relocate_new_kernel_size);
+ arm64_relocate_new_kernel_size);
/* Flush the kimage list and its buffers. */
kexec_list_flush(kimage);