From: Junho Choi Date: Tue, 5 Jun 2018 05:14:29 +0000 (+0900) Subject: [9610] soc: samsung: el3_mon: Invalidate smc_debug_mem X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d13ce23589e06a24df2928ac9a5a9d8061c0ef2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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;