From patchwork Wed Jan 17 13:39:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 862271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hC79sp61"; dkim-atps=neutral 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 3zM7WH2jHBz9s1h for ; Thu, 18 Jan 2018 00:40:11 +1100 (AEDT) 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=/7kk2Py/HDIJ/RjdDc144yCmG98wgjtWTVK0h3s1K5U=; b=hC7 9sp61/QXI9VG7zzpA/lB519PB7HtO9Xuh/dOXnIN7I+YmsTGtjzjIdoRzfGVLhbdNu4gMHNx2LtgL hssJe8ViErkisgoj56t0sIYX1PAyAY9yvOErj3tv1BwcN7kzqPm5f6xRQV26emTvBB1l+lr6rUDDB LqOGbBaFYkFc4NQJcedseSdOnuoHZMKaivCtxyqhvmhIYIIXOROJ2ZgYlqyu9p7CTQfHUcK02vfCQ WYPEaPumU/72Y5oCc1smUvVIO/2ZafzjNPcDAXkiaZtK7WmfVpnceO+zUeTUoZ+wZjDEtElVzgubm I1PkmFmRDu8/r8CKAtlXSWirkAIiF2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ebnwm-0005U9-Ia; Wed, 17 Jan 2018 13:40:08 +0000 Received: from smtprelay.synopsys.com ([198.182.47.9]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ebnwD-0004AJ-Sh for linux-snps-arc@lists.infradead.org; Wed, 17 Jan 2018 13:39:35 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id A928924E1727; Wed, 17 Jan 2018 05:39:21 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 902C2BF9; Wed, 17 Jan 2018 05:39:21 -0800 (PST) Received: from localhost.internal.synopsys.com (unknown [10.121.3.12]) by mailhost.synopsys.com (Postfix) with ESMTP id 21191BF1; Wed, 17 Jan 2018 05:39:19 -0800 (PST) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Subject: [PATCH v2] ARC: ARCv2: CACHE: fix slc_entire_op: flush only instead of flush-n-inv Date: Wed, 17 Jan 2018 16:39:17 +0300 Message-Id: <20180117133917.30649-1-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.9.3 X-Spam-Note: CRM114 invocation failed 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 T_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] -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [198.182.47.9 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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 , Eugeniy Paltsev , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org As for today slc_entire_op with OP_FLUSH command flush and invalidate SLC entry instead of flush only. Fix that. NOTE: As for today we use slc_entire_op only with OP_FLUSH_N_INV command, so it is kinda preventiv fix. Signed-off-by: Eugeniy Paltsev --- V1 patch is for u-boot (with u-boot AUX registers name), mistakenly sent it to linux. arch/arc/mm/cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c index 55c3de2..5cb647c 100644 --- a/arch/arc/mm/cache.c +++ b/arch/arc/mm/cache.c @@ -787,7 +787,10 @@ noinline static void slc_entire_op(const int op) write_aux_reg(r, ctrl); - write_aux_reg(ARC_REG_SLC_INVALIDATE, 1); + if (op & OP_INV) /* Inv or flush-n-inv use same cmd reg */ + write_aux_reg(ARC_REG_SLC_INVALIDATE, 0x1); + else + write_aux_reg(ARC_REG_SLC_FLUSH, 0x1); /* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */ read_aux_reg(r);