All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Lei" <zhang.lei@jp.fujitsu.com>
To: 'Mark Rutland' <mark.rutland@arm.com>,
	"Okamoto, Takayuki" <tokamoto@jp.fujitsu.com>
Cc: 'Catalin Marinas' <catalin.marinas@arm.com>,
	'Will Deacon' <will.deacon@arm.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	'James Morse' <james.morse@arm.com>,
	"'linux-arm-kernel@lists.infradead.org'" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be applied on A64FX v1r0
Date: Mon, 18 Mar 2019 03:05:09 +0000	[thread overview]
Message-ID: <8898674D84E3B24BA3A2D289B872026A6A35627D@G01JPEXMBKW03> (raw)
In-Reply-To: <20190315151241.GC48314@lakrids.cambridge.arm.com>

Hi guys,

> -----Original Message-----
> From: linux-arm-kernel <linux-arm-kernel-bounces@lists.infradead.org> On
> Behalf Of Mark Rutland
> Sent: Saturday, March 16, 2019 12:13 AM
> To: Okamoto, Takayuki/岡本 高幸 <tokamoto@jp.fujitsu.com>
> Cc: 'Catalin Marinas' <catalin.marinas@arm.com>; 'Will Deacon'
> <will.deacon@arm.com>; 'linux-kernel@vger.kernel.org'
> <linux-kernel@vger.kernel.org>; Zhang, Lei/張 雷 <zhang.lei@jp.fujitsu.com>;
> 'James Morse' <james.morse@arm.com>; hange-folder>?
> <toggle-mailboxes@lakrids.cambridge.arm.com>;
> 'linux-arm-kernel@lists.infradead.org' <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 <james.morse@arm.com>
> > > 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
> > > <catalin.marinas@arm.com>; Mark Rutland <mark.rutland@arm.com>; Will
> > > Deacon <will.deacon@arm.com>; Zhang, Lei <zhang.lei@jp.fujitsu.com>
> > > 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 <zhang.lei@jp.fujitsu.com>
> > ---
> >  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



WARNING: multiple messages have this Message-ID (diff)
From: "Zhang, Lei" <zhang.lei@jp.fujitsu.com>
To: 'Mark Rutland' <mark.rutland@arm.com>,
	"Okamoto, Takayuki" <tokamoto@jp.fujitsu.com>
Cc: 'Catalin Marinas' <catalin.marinas@arm.com>,
	'Will Deacon' <will.deacon@arm.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'linux-arm-kernel@lists.infradead.org'"
	<linux-arm-kernel@lists.infradead.org>,
	'James Morse' <james.morse@arm.com>
Subject: RE: [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be applied on A64FX v1r0
Date: Mon, 18 Mar 2019 03:05:09 +0000	[thread overview]
Message-ID: <8898674D84E3B24BA3A2D289B872026A6A35627D@G01JPEXMBKW03> (raw)
In-Reply-To: <20190315151241.GC48314@lakrids.cambridge.arm.com>

Hi guys,

> -----Original Message-----
> From: linux-arm-kernel <linux-arm-kernel-bounces@lists.infradead.org> On
> Behalf Of Mark Rutland
> Sent: Saturday, March 16, 2019 12:13 AM
> To: Okamoto, Takayuki/岡本 高幸 <tokamoto@jp.fujitsu.com>
> Cc: 'Catalin Marinas' <catalin.marinas@arm.com>; 'Will Deacon'
> <will.deacon@arm.com>; 'linux-kernel@vger.kernel.org'
> <linux-kernel@vger.kernel.org>; Zhang, Lei/張 雷 <zhang.lei@jp.fujitsu.com>;
> 'James Morse' <james.morse@arm.com>; hange-folder>?
> <toggle-mailboxes@lakrids.cambridge.arm.com>;
> 'linux-arm-kernel@lists.infradead.org' <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 <james.morse@arm.com>
> > > 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
> > > <catalin.marinas@arm.com>; Mark Rutland <mark.rutland@arm.com>; Will
> > > Deacon <will.deacon@arm.com>; Zhang, Lei <zhang.lei@jp.fujitsu.com>
> > > 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 <zhang.lei@jp.fujitsu.com>
> > ---
> >  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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-03-18  3:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 12:22 [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be applied on A64FX v1r0 Okamoto, Takayuki
2019-03-15 12:22 ` Okamoto, Takayuki
2019-03-15 15:12 ` Mark Rutland
2019-03-15 15:12   ` Mark Rutland
2019-03-18  3:05   ` Zhang, Lei [this message]
2019-03-18  3:05     ` Zhang, Lei
2019-03-18 12:06     ` Mark Rutland
2019-03-18 12:06       ` Mark Rutland
2019-03-19 12:52       ` Catalin Marinas
2019-03-19 12:52         ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8898674D84E3B24BA3A2D289B872026A6A35627D@G01JPEXMBKW03 \
    --to=zhang.lei@jp.fujitsu.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=tokamoto@jp.fujitsu.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.