Commit dcab90d9 authored by Will Deacon's avatar Will Deacon
Browse files

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: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent eab1cecc
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -184,6 +184,13 @@ 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);