aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2017-07-07 05:25:14 -0400
committerVineet Gupta <vgupta@synopsys.com>2017-08-04 04:20:07 -0400
commitb37174d95b0251611a80ef60abf03752e9d66d67 (patch)
treed2623b26d405e65cd5d57e720ea2db0d1db2a464
parent33460f86ad2c982f3172a10b17948ccaf923f07f (diff)
ARCv2: SLC: Make sure busy bit is set properly for region ops
c70c473396cb "ARCv2: SLC: Make sure busy bit is set properly on SLC flushing" fixes problem for entire SLC operation where the problem was initially caught. But given a nature of the issue it is perfectly possible for busy bit to be read incorrectly even when region operation was started. So extending initial fix for regional operation as well. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: stable@vger.kernel.org #4.10 Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-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 a867575a758b..bebc24cb7912 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -697,6 +697,9 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
697 write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1)); 697 write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1));
698 write_aux_reg(ARC_REG_SLC_RGN_START, paddr); 698 write_aux_reg(ARC_REG_SLC_RGN_START, paddr);
699 699
700 /* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
701 read_aux_reg(ARC_REG_SLC_CTRL);
702
700 while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY); 703 while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY);
701 704
702 spin_unlock_irqrestore(&lock, flags); 705 spin_unlock_irqrestore(&lock, flags);