msm: Add support to dump the caches on panic
During the normal course of panic, caches are flushed.
In most regular cases, this behavior is fine. If the
cache itself is suspect, it is important to store whatever
data is there before restart. A suspect cache may manifest
as a kernel panic due to an abort. Dump the caches during
the panic code path to save for analysis later.
Change-Id: Iaa7194027f2f589a60bfade896cd455eb4cc8989
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index e4e2653..0202746 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -2236,4 +2236,13 @@
This allows for analysis of the caches in case cache corruption is
suspected.
+config MSM_CACHE_DUMP_ON_PANIC
+ bool "Dump caches on panic"
+ depends on MSM_CACHE_DUMP
+ help
+ By default, the caches are flushed on panic. This means that trying to
+ look at them in a RAM dump will give useless data. Select this if you
+ want to dump the L1 and L2 caches on panic before any flush occurs.
+ If unsure, say N
+
endif