[PATCH] panic: flush local cache in panic_smp_self_stop

From: Neil Zhang
Date: Thu Apr 09 2015 - 01:24:59 EST


Sometimes we will use the memory dump to figure out what has happened.
Flush the local cache is needed to make the memory content be updated.

Signed-off-by: Neil Zhang <neilzhang1123@xxxxxxxxxxx>
---
kernel/panic.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/kernel/panic.c b/kernel/panic.c
index 8136ad7..e9457ca 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -23,6 +23,7 @@
#include <linux/sysrq.h>
#include <linux/init.h>
#include <linux/nmi.h>
+#include <asm/cacheflush.h>

#define PANIC_TIMER_STEP 100
#define PANIC_BLINK_SPD 18
@@ -56,6 +57,8 @@ EXPORT_SYMBOL(panic_blink);
*/
void __weak panic_smp_self_stop(void)
{
+ flush_cache_all();
+
while (1)
cpu_relax();
}
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/