Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp51767img; Sun, 17 Mar 2019 20:06:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAmihUiNCmnJfiKjhVQMkwZcsWONM14NV+cMxm4GMkn7OD1beaT5gPX3jUOMmenzjxbWI7 X-Received: by 2002:a17:902:f302:: with SMTP id gb2mr17853625plb.51.1552878382638; Sun, 17 Mar 2019 20:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552878382; cv=none; d=google.com; s=arc-20160816; b=hWGDzahHA3DoeGFVu0sGa1cTZgixfdNVsQlMhEHvZ3XuMkDV+u8PnbMPW/n1FxwSAN nLGhUZdVi8Nml+8cBm5z7Imly77qt8jxghSk8FR1sM6IrP6rxJjYuA/3LGMVKg7oeoj5 jMvuaCbqFM2P24cd0hmhAovcuHd0rONrWKEVl1QmnyE1eeRmkwHDtdtQ7DVr7kHTUh4l NAx5zRGoUlws0jIeM9qkWwCVR6KybYOL3pxJwocbUVrGzjDiLGEoLDfsx85fZF5xcDYI nPFC1gW/2uD7ajzdKDokoGnSS3Nva35hDDvO6NFHe7+vIed7xg4w5PTAb7l7GJ9UCNDJ UFBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=9Ku5aBhFgBTkemXrcgaKC9cKZh558ABAaYSPTfPP6Fo=; b=QHCkd2Iqnib9yJFf+GJfYREcnZ+kEh/dbagsjDzRU2oR99nTXOTpNnQxTzhLoytSWn G7RyWH33gnfL0g6euYMJIceVBdFvbKdDzMNzUupM8bnUSipuPmutx/us2jYDNsIvzEiU U/TbAQjIc8ufnUOxLNdr41dsRGGp3lQNoM5xuf59zoNyTgGwHIby3czJqeu5SRSdZ3su 1VpYGb9pGd7VbcWOWSh0dliQdg6/kTpjXCmm55RiddizrSpDy6PWiWNPD5ywa6hUUeY3 Ocj/FoIBMsRvBRekPkdEu6pm9gohA8Si3iUyzEhdBgAhEsRU/GM0Fzq/tVsqoX6gyGie tTMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14si1007091pga.584.2019.03.17.20.06.07; Sun, 17 Mar 2019 20:06:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727748AbfCRDFO (ORCPT + 99 others); Sun, 17 Mar 2019 23:05:14 -0400 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:43485 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727159AbfCRDFO (ORCPT ); Sun, 17 Mar 2019 23:05:14 -0400 Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [192.168.231.133]) by mgwkm03.jp.fujitsu.com with smtp id 7aff_2ae6_0457e3c2_6e84_414c_9436_52e0c1940dbe; Mon, 18 Mar 2019 12:05:11 +0900 Received: from g01jpfmpwkw01.exch.g01.fujitsu.local (g01jpfmpwkw01.exch.g01.fujitsu.local [10.0.193.38]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id 147D6AC00AA for ; Mon, 18 Mar 2019 12:05:11 +0900 (JST) Received: from G01JPEXCHKW16.g01.fujitsu.local (G01JPEXCHKW16.g01.fujitsu.local [10.0.194.55]) by g01jpfmpwkw01.exch.g01.fujitsu.local (Postfix) with ESMTP id EB4866923F5; Mon, 18 Mar 2019 12:05:09 +0900 (JST) Received: from G01JPEXMBKW03.g01.fujitsu.local ([10.0.194.67]) by g01jpexchkw16 ([10.0.194.55]) with mapi id 14.03.0439.000; Mon, 18 Mar 2019 12:05:09 +0900 From: "Zhang, Lei" To: 'Mark Rutland' , "Okamoto, Takayuki" CC: 'Catalin Marinas' , 'Will Deacon' , "'linux-kernel@vger.kernel.org'" , 'James Morse' , "'linux-arm-kernel@lists.infradead.org'" Subject: RE: [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be applied on A64FX v1r0 Thread-Topic: [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be applied on A64FX v1r0 Thread-Index: AdTbJFde57o7xnMQR9OpSdZTOYeW4///o4KA//uP4VA= Date: Mon, 18 Mar 2019 03:05:09 +0000 Message-ID: <8898674D84E3B24BA3A2D289B872026A6A35627D@G01JPEXMBKW03> References: <5FA513F682BE7F4EAAB8EE035D5B08E44E9363CC@G01JPEXMBKW02> <20190315151241.GC48314@lakrids.cambridge.arm.com> In-Reply-To: <20190315151241.GC48314@lakrids.cambridge.arm.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-securitypolicycheck: OK by SHieldMailChecker v2.2.3 x-shieldmailcheckerpolicyversion: FJ-ISEC-20140219 x-originating-ip: [10.18.70.198] Content-Type: text/plain; charset="iso-2022-jp" MIME-Version: 1.0 X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, > -----Original Message----- > From: linux-arm-kernel On > Behalf Of Mark Rutland > Sent: Saturday, March 16, 2019 12:13 AM > To: Okamoto, Takayuki/岡本 高幸 > Cc: 'Catalin Marinas' ; 'Will Deacon' > ; 'linux-kernel@vger.kernel.org' > ; Zhang, Lei/張 雷 ; > 'James Morse' ; hange-folder>? > ; > 'linux-arm-kernel@lists.infradead.org' > Subject: Re: [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be > applied on A64FX v1r0 > > On Fri, Mar 15, 2019 at 12:22:36PM +0000, Okamoto, Takayuki wrote: > > I resend the patch due to whitespace munging. > > > > > -----Original Message----- > > > From: James Morse > > > Sent: Wednesday, February 27, 2019 3:44 AM > > > To: james.morse@arm.com; linux-arm-kernel@lists.infradead.org > > > Cc: linux-kernel@vger.kernel.org; Catalin Marinas > > > ; Mark Rutland ; Will > > > Deacon ; Zhang, Lei > > > Subject: [PATCH v5] arm64: Add workaround for Fujitsu A64FX erratum > > > 010001 > > > > > > +/* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and > > > +v1r0) */ #define MIDR_FUJITSU_ERRATUM_010001 > > > MIDR_FUJITSU_A64FX > > > +#define MIDR_FUJITSU_ERRATUM_010001_MASK > > > (~MIDR_VARIANT(1)) > > > > This workaround for the erratum should be applied for both A64FX v1r0 > > and v0r0, however, the patch v5 is only enabled on A64FX > > v0r0(MIDR.Variant == 0 && MIDR.Revision == 0). > > This issue is caused by the macro MIDR_FUJITSU_ERRATUM_010001_MASK. > > > > I have tested on both A64FX v1r0 and v0r0. This new patch will effect > > only for A64FX. > > > > -- > > Changed to be applied for not only A64FX v0r0 but also v1r0. > > > > Signed-off-by: Zhang Lei > > --- > > arch/arm64/include/asm/cputype.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/include/asm/cputype.h > > b/arch/arm64/include/asm/cputype.h > > index 2afb133..1fb47b5 100644 > > --- a/arch/arm64/include/asm/cputype.h > > +++ b/arch/arm64/include/asm/cputype.h > > @@ -129,7 +129,7 @@ > > > > /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ > > #define MIDR_FUJITSU_ERRATUM_010001 > MIDR_FUJITSU_A64FX > > -#define MIDR_FUJITSU_ERRATUM_010001_MASK > (~MIDR_VARIANT(1)) > > The bug is is that MIDR_VARIANT() is meant to extract the variant from a full > MIDR value, not generate an in-place field value. > > > +#define MIDR_FUJITSU_ERRATUM_010001_MASK (~(0x1 << > MIDR_VARIANT_SHIFT)) > > I beleive this can be: > > #define MIDR_FUJITSU_ERRATUM_010001_MASK (~MIDR_VAR_REV(1, > 0)) Thanks for your comments. I also have considered to use MIDR_CPU_VAR_REV macro, but the implication of (~MIDR_CPU_VAR_REV(1, 0)) is "NOT v1r0". I think it may cause confusion, so I choose the simple way (~(0x1 << MIDR_VARIANT_SHIFT)). > But otherwise this looks fine to me. Will this patch be merged to v5.1? Thanks, Zhang Lei