From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbdGGJZX (ORCPT ); Fri, 7 Jul 2017 05:25:23 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:51183 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbdGGJZW (ORCPT ); Fri, 7 Jul 2017 05:25:22 -0400 From: Alexey Brodkin To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Alexey Brodkin , Vineet Gupta , stable@vger.kernel.org Subject: [PATCH] ARCv2: SLC: Make sure busy bit is set properly for region ops Date: Fri, 7 Jul 2017 12:25:14 +0300 Message-Id: <1499419514-13171-1-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.7.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Vineet Gupta Cc: stable@vger.kernel.org --- arch/arc/mm/cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c index bdb5227241cf..08427d572850 100644 --- a/arch/arc/mm/cache.c +++ b/arch/arc/mm/cache.c @@ -697,6 +697,8 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op) write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1)); write_aux_reg(ARC_REG_SLC_RGN_START, paddr); + /* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */ + read_aux_reg(ARC_REG_SLC_CTRL); while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY); spin_unlock_irqrestore(&lock, flags); -- 2.7.5