[9610] soc: samsung: el3_mon: Invalidate smc_debug_mem
authorJunho Choi <junhosj.choi@samsung.com>
Tue, 5 Jun 2018 05:14:29 +0000 (14:14 +0900)
committerjungi.lee <jungilsi.lee@samsung.com>
Tue, 17 Jul 2018 11:25:33 +0000 (20:25 +0900)
smc_debug_mem has been used as shared memory between
SWd and NWd. Therefore, Kernel needs to invalidate
this memory before reading it.

Change-Id: I0d99ebf681bfee97dc8bf96067a4d90e37960d98
Signed-off-by: Junho Choi <junhosj.choi@samsung.com>
drivers/soc/samsung/exynos-el3_mon.c

index 46034e620cc2da3e8c1980366311733f341a4879..ba0edfc085d29c0488b938f0db9b1cca300d5820 100644 (file)
@@ -154,6 +154,10 @@ static void exynos_smart_exception_handler(unsigned int id,
 
                if ((offset > 0x0 && offset < (PAGE_SIZE * 2))
                                && !(offset % 0x8) && (smc_debug_mem)) {
+
+                       /* Invalidate smc_debug_mem for cache coherency */
+                       __inval_dcache_area(smc_debug_mem, PAGE_SIZE * 2);
+
                        tmp = (unsigned long)smc_debug_mem;
                        tmp += (unsigned long)offset;
                        ptr = (unsigned long *)tmp;