From 35c55674bd1b8fac3f81755b15e3173d1ff2a995 Mon Sep 17 00:00:00 2001 From: Lina Iyer Date: Mon, 10 Aug 2020 12:33:33 -0600 Subject: [PATCH] drivers: qcom: sys_pm_vx: add barrier after read System PM Violators reads should not be jumbled. Add a barrier to ensure reads are sequential. Change-Id: I68112e3ddff4c65a3b9e8cc1dc3a79ed392dc375 Signed-off-by: Lina Iyer --- drivers/soc/qcom/sys_pm_vx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/qcom/sys_pm_vx.c b/drivers/soc/qcom/sys_pm_vx.c index dc6337de03c3..f9a181906948 100644 --- a/drivers/soc/qcom/sys_pm_vx.c +++ b/drivers/soc/qcom/sys_pm_vx.c @@ -37,6 +37,8 @@ v = le32_to_cpu(readl_relaxed(base + itr)); \ pr_debug("Addr:%p val:%#x\n", base + itr, v); \ itr += sizeof(u32); \ + /* Barrier to enssure sequential read */ \ + smp_rmb(); \ v; \ })