Add a cache flush in the path handled by a panic.

We want to get the panic traceback in the printk persist buffer
so we need a cache_flush before triggering a restart.

Change-Id: Icc0263d21eb04b3a3fbfb9986fe2033fbaa7db55
diff --git a/kernel/panic.c b/kernel/panic.c
index 6d63003..fac4c3f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -8,6 +8,7 @@
  * This function is used through-out the kernel (including mm and fs)
  * to indicate a major problem.
  */
+#include <asm/cacheflush.h>
 #include <linux/debug_locks.h>
 #include <linux/interrupt.h>
 #include <linux/kmsg_dump.h>
@@ -152,6 +153,8 @@
 			mdelay(PANIC_TIMER_STEP);
 		}
 	}
+	printk(KERN_EMERG "Flushing cache..");
+	flush_cache_all();
 	if (panic_timeout != 0) {
 		/*
 		 * This will not be a clean reboot, with everything