[COMMON] lib: dss: move cache ops to soc helper
authorHosung Kim <hosung0.kim@samsung.com>
Thu, 24 May 2018 02:20:21 +0000 (11:20 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Fri, 29 Jun 2018 09:18:05 +0000 (18:18 +0900)
Change-Id: I5e3e6fc620f16dbe38aad741b283c3ec6b116d94
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
drivers/soc/samsung/debug/exynos-helper.c
lib/debug-snapshot-helper.c
lib/debug-snapshot-utils.c

index c7ce6b420eed55a50afebabeaa1fc1c7538dd109..53699bb27865a806558bad0e02e96682df6e4303 100644 (file)
@@ -24,6 +24,8 @@
 #include <soc/samsung/exynos-pmu.h>
 #include <soc/samsung/exynos-sdm.h>
 
+#include <asm/cacheflush.h>
+
 #ifdef CONFIG_EXYNOS_CORESIGHT_ETR
 #include <asm/core_regs.h>
 #endif
@@ -63,6 +65,8 @@ static void exynos_post_panic_entry(void *val)
 
 static void exynos_post_panic_exit(void *val)
 {
+       flush_cache_all();
+
 #ifdef CONFIG_EXYNOS_SDM
        if (dbg_snapshot_is_scratch())
                exynos_sdm_dump_secure_region();
@@ -79,7 +83,7 @@ static void exynos_save_context_entry(void *val)
 
 static void exynos_save_context_exit(void *val)
 {
-       /* TODO: Something */
+       flush_cache_all();
 }
 
 static void exynos_start_watchdog(void *val)
index 03ae0603bbda6a0fa012bf260d72afdd57f530e7..7bc4b3af55269cf7194ff02b389467772e6a66ec 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm/cputype.h>
 #include <asm/smp_plat.h>
 #include <asm/core_regs.h>
-#include <asm/cacheflush.h>
 
 #include "debug-snapshot-local.h"
 #include <linux/debug-snapshot-helper.h>
@@ -252,7 +251,7 @@ int dbg_snapshot_post_panic(void)
                dbg_snapshot_dump_sfr();
 #endif
                dbg_snapshot_save_context(NULL);
-//             flush_cache_all();
+
                dbg_snapshot_print_panic_report();
 
                dss_soc_ops->soc_post_panic_exit(NULL);
@@ -321,7 +320,6 @@ int dbg_snapshot_post_reboot(char *cmd)
        pr_emerg("debug-snapshot: normal reboot done\n");
 
        dbg_snapshot_save_context(NULL);
-//     flush_cache_all();
 
        return 0;
 }
@@ -353,7 +351,7 @@ static int dbg_snapshot_panic_handler(struct notifier_block *nb,
 #endif
        dbg_snapshot_dump_task_info();
        pr_emerg("linux_banner: %s\n", linux_banner);
-//     flush_cache_all();
+
        return 0;
 }
 
index 74399e57ade9bc2407ed16abfbd93ddf547c0ca8..f7d0575b6ea85929a44aad3e168d8b8bb102cd30 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/io.h>
 #include <linux/notifier.h>
-#include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/kallsyms.h>
 #include <linux/input.h>
@@ -453,7 +452,6 @@ int dbg_snapshot_save_context(void *v_regs)
        } else
                pr_emerg("debug-snapshot: skip context saved(CPU:%d)\n", cpu);
 
-//     flush_cache_all();
        raw_spin_unlock_irqrestore(&dss_desc.ctrl_lock, flags);
 
        dss_soc_ops->soc_save_context_exit(NULL);