From fd69750caa43e336ab9dadb134cd75793c7c7fc7 Mon Sep 17 00:00:00 2001 From: Abhimanyu Kapur Date: Wed, 2 Apr 2014 20:32:59 -0700 Subject: [PATCH] ARM64: Flush the caches for non panicking CPUs in case of a kernel panic In case of a kernel panic, only the panicking CPU does an entire cache flush. This means that certain dirty cache lines in the caches of the other CPUs may never get flushed. This gives us improper RAM dumps. Add cache flushing for all the online CPUs. The outer domain is not flushed since it is already being done by the panicking CPU. Change-Id: I03cf14f49334e45c145a17b06d0c623575b653e8 Signed-off-by: Abhimanyu Kapur Signed-off-by: Elliot Berman --- arch/arm64/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 5fddc2c27e12..3eb46945aa28 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -849,6 +849,7 @@ static void ipi_cpu_stop(unsigned int cpu) } set_cpu_online(cpu, false); + flush_cache_all(); local_daif_mask(); sdei_mask_local_cpu();