From patchwork Wed Jan 17 13:31:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 862264 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="lBKrzODk"; 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 3zM7L71cd0z9sP9 for ; Thu, 18 Jan 2018 00:32:12 +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=hKIB/u07kFN+lsSsl99hdNDvPpX0jxYlyY7q2BFh1z0=; b=lBK rzODkjB9j4RCHwxwGTleU4sSQN2VThxpSnjKO2BEVF9hDLXQQmBsgDGpePCfdrZICXZdnbtQWDYPe ly2noJlUNNoN5XjQDI05B1PNRIz5HUS4IaBoMDHToPyOzOhXXkue6P0zWJKeItiGg/8tfBAqiuNE7 gZKCeZ+JfmsQfq7gaAp6aSbRbZan6jmCmZp1XwlTy5iWGPNuWT7mUox+nWPr28pJeNOPGaeYxWIJn fQBs0d34Wcn72w9o998DQaErDioZNCoR5bKakGBSAL3D6bCfjt36ziZaelAfZlGRcXOcAin1U/ml2 YopNIOBeI7+I59FYIPESKCDQpljxvZA==; 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 1ebnp4-0000DC-Jl; Wed, 17 Jan 2018 13:32:10 +0000 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ebnp2-0008LF-9w for linux-snps-arc@lists.infradead.org; Wed, 17 Jan 2018 13:32:09 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0BCEF24E0901; Wed, 17 Jan 2018 05:31:56 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id EC07C26E; Wed, 17 Jan 2018 05:31:55 -0800 (PST) Received: from localhost.internal.synopsys.com (unknown [10.121.3.12]) by mailhost.synopsys.com (Postfix) with ESMTP id 7D4DF26C; Wed, 17 Jan 2018 05:31:54 -0800 (PST) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Subject: [PATCH] ARC: ARCv2: CACHE: fix slc_entire_op: flush only instead of flush-n-inv Date: Wed, 17 Jan 2018 16:31:06 +0300 Message-Id: <20180117133106.30518-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 --- 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);