msm: Add support for cache dumping

When caches become corrupted during particularly nasty
bugs, it can become next to impossible to determine
whether a crash was caused by cache corruption or just
pure software error. Add support for dumping both the
L1 and L2 to an allocated buffer for post-mortem analysis.

Change-Id: I48f7aa5b6d2dfd2192f6c54bb5ac39c1bec80303
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 3c2d47a..2e37431 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -2221,4 +2221,12 @@
 
 config HAVE_ARCH_HAS_CURRENT_TIMER
 	bool
+
+config MSM_CACHE_DUMP
+	bool "Cache dumping support"
+	help
+	  Add infrastructure to dump the L1 and L2 caches to an allocated buffer.
+	  This allows for analysis of the caches in case cache corruption is
+	  suspected.
+
 endif