From patchwork Fri Jul 7 09:25:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 785397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x3q3J3R0Cz9s4s for ; Fri, 7 Jul 2017 19:25:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EFsLZp1P"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ZZeVQvAXuwNUVVhVp9v3ZFOG4J86RgdPmOpLo3WqGXE=; b=EFs LZp1PcbzWVRlVVgumlUqnTu8EwkY5KH8c1JLsTu4nWT5j/ZiQbYc3+hoPg4LY11SMZxfRi+rzcYOq 5V2GRlREYc6uOpRuEory0eGtUAPsCVthipy+3WzNQHnlPZY4+hb68iU0O2VOJVLlUPJWLzGf9uJHY kUHmv6QDJoVh+G9XqaA3JLDF1tTjI7zmEi5RrQUQGfxoRP0qDK+JxEuoonXJYmEeceOSndDoyd6xn 34zzM6D7FEWivf3x6yj924bvqb7YjRy9uVQDYv6Q/riB8B/P4VMWmCbk2Y05b7IEQ1ReqBFeyF+2I rdaHBI5wcu+483XU6iNQJX5IBfDmTPw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dTPWF-0003Gy-4P; Fri, 07 Jul 2017 09:25:47 +0000 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dTPWC-0003Fp-6S for linux-snps-arc@lists.infradead.org; Fri, 07 Jul 2017 09:25:45 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 7B3F224E1275; Fri, 7 Jul 2017 02:25:21 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 5D2AA969; Fri, 7 Jul 2017 02:25:21 -0700 (PDT) Received: from abrodkin-7440l.internal.synopsys.com (unknown [10.121.8.122]) by mailhost.synopsys.com (Postfix) with ESMTP id CBC42936; Fri, 7 Jul 2017 02:25:19 -0700 (PDT) From: Alexey Brodkin To: linux-snps-arc@lists.infradead.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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170707_022544_278065_884918D9 X-CRM114-Status: UNSURE ( 4.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vineet Gupta , Alexey Brodkin , linux-kernel@vger.kernel.org, stable@vger.kernel.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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);