From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760218AbdEYLBF (ORCPT ); Thu, 25 May 2017 07:01:05 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:47125 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbdEYLBD (ORCPT ); Thu, 25 May 2017 07:01:03 -0400 From: Alexey Brodkin To: "noamca@mellanox.com" CC: "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH 06/10] ARC: [plat-eznps] Fix TLB Errata Thread-Topic: [PATCH 06/10] ARC: [plat-eznps] Fix TLB Errata Thread-Index: AQHS1P+OdL1cObVExkuOBprdPFKJy6IEwNoA Date: Thu, 25 May 2017 11:00:59 +0000 Message-ID: <1495710058.5393.23.camel@synopsys.com> References: <1495679660-9598-1-git-send-email-noamca@mellanox.com> <1495679660-9598-7-git-send-email-noamca@mellanox.com> In-Reply-To: <1495679660-9598-7-git-send-email-noamca@mellanox.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.121.8.122] Content-Type: text/plain; charset="utf-8" Content-ID: <319932D56BD65F4EB909AFD68F8CB142@internal.synopsys.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v4PB1Lr5017540 Hi Noam, On Thu, 2017-05-25 at 05:34 +0300, Noam Camus wrote: > From: Noam Camus > > Due to a HW bug in NPS400 we get from time to time false TLB miss. > Workaround this by validating each miss. > > Signed-off-by: Noam Camus > --- >  arch/arc/mm/tlbex.S |   10 ++++++++++ >  1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/arch/arc/mm/tlbex.S b/arch/arc/mm/tlbex.S > index b30e4e3..1d48723 100644 > --- a/arch/arc/mm/tlbex.S > +++ b/arch/arc/mm/tlbex.S > @@ -274,6 +274,13 @@ ex_saved_reg1: >  .macro COMMIT_ENTRY_TO_MMU >  #if (CONFIG_ARC_MMU_VER < 4) >   > +#ifdef CONFIG_EZNPS_MTM_EXT > + /* verify if entry for this vaddr+ASID already exists */ > + sr    TLBProbe, [ARC_REG_TLBCOMMAND] > + lr    r0, [ARC_REG_TLBINDEX] > + bbit0 r0, 31, 88f > +#endif That's funny. I think we used to have something like that in the past. >   /* Get free TLB slot: Set = computed from vaddr, way = random */ >   sr  TLBGetIndex, [ARC_REG_TLBCOMMAND] >   > @@ -287,6 +294,9 @@ ex_saved_reg1: >  #else >   sr TLBInsertEntry, [ARC_REG_TLBCOMMAND] >  #endif > +#ifdef CONFIG_EZNPS_MTM_EXT > +88: > +#endif Not sure if label itself required wrapping in ifdefs. It just makes code bulkier and harder to read. -Alexey