From 9d13ce23589e06a24df2928ac9a5a9d8061c0ef2 Mon Sep 17 00:00:00 2001 From: Junho Choi Date: Tue, 5 Jun 2018 14:14:29 +0900 Subject: [PATCH] [9610] soc: samsung: el3_mon: Invalidate smc_debug_mem 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 --- drivers/soc/samsung/exynos-el3_mon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/samsung/exynos-el3_mon.c b/drivers/soc/samsung/exynos-el3_mon.c index 46034e620cc2..ba0edfc085d2 100644 --- a/drivers/soc/samsung/exynos-el3_mon.c +++ b/drivers/soc/samsung/exynos-el3_mon.c @@ -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; -- 2.20.1