Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbeAQNjX (ORCPT + 1 other); Wed, 17 Jan 2018 08:39:23 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:38302 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbeAQNjW (ORCPT ); Wed, 17 Jan 2018 08:39:22 -0500 From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Vineet Gupta , Alexey Brodkin , Eugeniy Paltsev 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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); -- 2.9.3