[PATCH] ARM: kexec: Fix panic after TLB are invalidated

Russell King - ARM Linux admin linux at armlinux.org.uk
Mon Feb 1 11:37:50 EST 2021

On Mon, Feb 01, 2021 at 04:32:40PM +0000, Mark Rutland wrote:
> I reckon here we need:
> 	__cpuc_flush_dcache_area(reboot_code_buffer,
> 				 relocate_new_kernel_size + sizeof(*data));
> ... to make sure both the instructions and data are visible with the MMU
> off (since fncpy() only cleans to the PoU, not the PoC).

We don't. When soft_restart() turns the MMU off, and it calls
flush_cache_all() before and afterwards to ensure that all dirty lines
are pushed out.

The flushing to PoU in fncpy() is to cover other cases.

RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

More information about the linux-arm-kernel mailing list