summaryrefslogtreecommitdiffstats
path: root/arch/arc/mm/cache.c
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2017-03-29 16:15:11 +0200
committerVineet Gupta <vgupta@synopsys.com>2017-03-31 02:32:33 +0200
commitc70c473396cbdec1168a6eff60e13029c0916854 (patch)
treeced20274a6deba743926be0d9d67ec8c379707c6 /arch/arc/mm/cache.c
parentARC: vdk: Fix support of UIO (diff)
downloadlinux-c70c473396cbdec1168a6eff60e13029c0916854.tar.xz
linux-c70c473396cbdec1168a6eff60e13029c0916854.zip
ARCv2: SLC: Make sure busy bit is set properly on SLC flushing
As reported in STAR 9001165532, an SLC control reg read (for checking busy state) right after SLC invalidate command may incorrectly return NOT busy causing software to NOT spin-wait while operation is underway. (and for some reason this only happens if L1 cache is also disabled - as required by IOC programming model) Suggested workaround is to do an additional Control Reg read, which ensures the 2nd read gets the right status. Cc: stable@vger.kernel.org #4.10 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> [vgupta: reworte changelog a bit] Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to '')
-rw-r--r--arch/arc/mm/cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index d408fa21a07c..928562967f3c 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -633,6 +633,9 @@ noinline static void slc_entire_op(const int op)
write_aux_reg(ARC_REG_SLC_INVALIDATE, 1);
+ /* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
+ read_aux_reg(r);
+
/* Important to wait for flush to complete */
while (read_aux_reg(r) & SLC_CTRL_BUSY);
}