All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
@ 2022-08-09  4:38 ` Zenghui Yu
  0 siblings, 0 replies; 8+ messages in thread
From: Zenghui Yu @ 2022-08-09  4:38 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: catalin.marinas, will, wanghaibin.wang, Zenghui Yu, Shreyas K K

Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its
entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.

Fix this issue by creating a separate entry for Kryo4xx Gold.

Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs")
Cc: Shreyas K K <quic_shrekk@quicinc.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 arch/arm64/kernel/cpu_errata.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 7e6289e709fc..0f7e9087d900 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities arm64_repeat_tlbi_list[] = {
 #ifdef CONFIG_ARM64_ERRATUM_1286807
 	{
 		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
+	},
+	{
 		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
 		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
 	},
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
@ 2022-08-09  4:38 ` Zenghui Yu
  0 siblings, 0 replies; 8+ messages in thread
From: Zenghui Yu @ 2022-08-09  4:38 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: catalin.marinas, will, wanghaibin.wang, Zenghui Yu, Shreyas K K

Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its
entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.

Fix this issue by creating a separate entry for Kryo4xx Gold.

Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs")
Cc: Shreyas K K <quic_shrekk@quicinc.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 arch/arm64/kernel/cpu_errata.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 7e6289e709fc..0f7e9087d900 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities arm64_repeat_tlbi_list[] = {
 #ifdef CONFIG_ARM64_ERRATUM_1286807
 	{
 		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
+	},
+	{
 		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
 		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
 	},
-- 
2.33.0


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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
  2022-08-09  4:38 ` Zenghui Yu
@ 2022-08-09  6:08   ` Marc Zyngier
  -1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2022-08-09  6:08 UTC (permalink / raw)
  To: Zenghui Yu
  Cc: linux-arm-kernel, linux-kernel, catalin.marinas, will,
	wanghaibin.wang, Shreyas K K

On 2022-08-09 05:38, Zenghui Yu wrote:
> Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on 
> KRYO4XX
> gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because 
> its
> entry in arm64_repeat_tlbi_list[] was accidently corrupted by this 
> commit.
> 
> Fix this issue by creating a separate entry for Kryo4xx Gold.
> 
> Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
> gold CPUs")
> Cc: Shreyas K K <quic_shrekk@quicinc.com>
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  arch/arm64/kernel/cpu_errata.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/kernel/cpu_errata.c 
> b/arch/arm64/kernel/cpu_errata.c
> index 7e6289e709fc..0f7e9087d900 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities
> arm64_repeat_tlbi_list[] = {
>  #ifdef CONFIG_ARM64_ERRATUM_1286807
>  	{
>  		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
> +	},
> +	{
>  		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
>  		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
>  	},

Ouch. It isn't the first time we end-up with this sort
of thing, and I wonder whether we should restructure
the ERRATA_MIDR_* macros to prevent this sort of
accidental override...

Anyway, thanks for spotting it!

Cc: stable@vger.kernel.org
Acked-by: Marc Zyngier <maz@kernel.org>

         M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
@ 2022-08-09  6:08   ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2022-08-09  6:08 UTC (permalink / raw)
  To: Zenghui Yu
  Cc: linux-arm-kernel, linux-kernel, catalin.marinas, will,
	wanghaibin.wang, Shreyas K K

On 2022-08-09 05:38, Zenghui Yu wrote:
> Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on 
> KRYO4XX
> gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because 
> its
> entry in arm64_repeat_tlbi_list[] was accidently corrupted by this 
> commit.
> 
> Fix this issue by creating a separate entry for Kryo4xx Gold.
> 
> Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
> gold CPUs")
> Cc: Shreyas K K <quic_shrekk@quicinc.com>
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  arch/arm64/kernel/cpu_errata.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/kernel/cpu_errata.c 
> b/arch/arm64/kernel/cpu_errata.c
> index 7e6289e709fc..0f7e9087d900 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities
> arm64_repeat_tlbi_list[] = {
>  #ifdef CONFIG_ARM64_ERRATUM_1286807
>  	{
>  		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
> +	},
> +	{
>  		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
>  		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
>  	},

Ouch. It isn't the first time we end-up with this sort
of thing, and I wonder whether we should restructure
the ERRATA_MIDR_* macros to prevent this sort of
accidental override...

Anyway, thanks for spotting it!

Cc: stable@vger.kernel.org
Acked-by: Marc Zyngier <maz@kernel.org>

         M.
-- 
Jazz is not dead. It just smells funny...

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
  2022-08-09  6:08   ` Marc Zyngier
@ 2022-08-09  8:41     ` Will Deacon
  -1 siblings, 0 replies; 8+ messages in thread
From: Will Deacon @ 2022-08-09  8:41 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Zenghui Yu, linux-arm-kernel, linux-kernel, catalin.marinas,
	wanghaibin.wang, Shreyas K K

On Tue, Aug 09, 2022 at 07:08:07AM +0100, Marc Zyngier wrote:
> On 2022-08-09 05:38, Zenghui Yu wrote:
> > Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on
> > KRYO4XX
> > gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because
> > its
> > entry in arm64_repeat_tlbi_list[] was accidently corrupted by this
> > commit.
> > 
> > Fix this issue by creating a separate entry for Kryo4xx Gold.
> > 
> > Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
> > gold CPUs")
> > Cc: Shreyas K K <quic_shrekk@quicinc.com>
> > Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> > ---
> >  arch/arm64/kernel/cpu_errata.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm64/kernel/cpu_errata.c
> > b/arch/arm64/kernel/cpu_errata.c
> > index 7e6289e709fc..0f7e9087d900 100644
> > --- a/arch/arm64/kernel/cpu_errata.c
> > +++ b/arch/arm64/kernel/cpu_errata.c
> > @@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities
> > arm64_repeat_tlbi_list[] = {
> >  #ifdef CONFIG_ARM64_ERRATUM_1286807
> >  	{
> >  		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
> > +	},
> > +	{
> >  		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
> >  		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
> >  	},
> 
> Ouch. It isn't the first time we end-up with this sort
> of thing, and I wonder whether we should restructure
> the ERRATA_MIDR_* macros to prevent this sort of
> accidental override...

Agreed. I think we may have gone a bit too far with the macros in
cpu_errata.c and cpufeature.c. Although the files would be larger, I think
it would be clearer if we removed some of the abstractions and forced this
stuff to be spelled out each time.

> Anyway, thanks for spotting it!
> 
> Cc: stable@vger.kernel.org
> Acked-by: Marc Zyngier <maz@kernel.org>

I'll queue this as a fix at -rc1 along with any other fixes which come in.

Will

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
@ 2022-08-09  8:41     ` Will Deacon
  0 siblings, 0 replies; 8+ messages in thread
From: Will Deacon @ 2022-08-09  8:41 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Zenghui Yu, linux-arm-kernel, linux-kernel, catalin.marinas,
	wanghaibin.wang, Shreyas K K

On Tue, Aug 09, 2022 at 07:08:07AM +0100, Marc Zyngier wrote:
> On 2022-08-09 05:38, Zenghui Yu wrote:
> > Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on
> > KRYO4XX
> > gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because
> > its
> > entry in arm64_repeat_tlbi_list[] was accidently corrupted by this
> > commit.
> > 
> > Fix this issue by creating a separate entry for Kryo4xx Gold.
> > 
> > Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
> > gold CPUs")
> > Cc: Shreyas K K <quic_shrekk@quicinc.com>
> > Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> > ---
> >  arch/arm64/kernel/cpu_errata.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm64/kernel/cpu_errata.c
> > b/arch/arm64/kernel/cpu_errata.c
> > index 7e6289e709fc..0f7e9087d900 100644
> > --- a/arch/arm64/kernel/cpu_errata.c
> > +++ b/arch/arm64/kernel/cpu_errata.c
> > @@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities
> > arm64_repeat_tlbi_list[] = {
> >  #ifdef CONFIG_ARM64_ERRATUM_1286807
> >  	{
> >  		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
> > +	},
> > +	{
> >  		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
> >  		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
> >  	},
> 
> Ouch. It isn't the first time we end-up with this sort
> of thing, and I wonder whether we should restructure
> the ERRATA_MIDR_* macros to prevent this sort of
> accidental override...

Agreed. I think we may have gone a bit too far with the macros in
cpu_errata.c and cpufeature.c. Although the files would be larger, I think
it would be clearer if we removed some of the abstractions and forced this
stuff to be spelled out each time.

> Anyway, thanks for spotting it!
> 
> Cc: stable@vger.kernel.org
> Acked-by: Marc Zyngier <maz@kernel.org>

I'll queue this as a fix at -rc1 along with any other fixes which come in.

Will

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
  2022-08-09  4:38 ` Zenghui Yu
@ 2022-08-17 14:58   ` Will Deacon
  -1 siblings, 0 replies; 8+ messages in thread
From: Will Deacon @ 2022-08-17 14:58 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Zenghui Yu
  Cc: catalin.marinas, kernel-team, Will Deacon, Shreyas K K, wanghaibin.wang

On Tue, 9 Aug 2022 12:38:48 +0800, Zenghui Yu wrote:
> Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
> gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its
> entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.
> 
> Fix this issue by creating a separate entry for Kryo4xx Gold.
> 
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
      https://git.kernel.org/arm64/c/5e1e087457c9

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
@ 2022-08-17 14:58   ` Will Deacon
  0 siblings, 0 replies; 8+ messages in thread
From: Will Deacon @ 2022-08-17 14:58 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Zenghui Yu
  Cc: catalin.marinas, kernel-team, Will Deacon, Shreyas K K, wanghaibin.wang

On Tue, 9 Aug 2022 12:38:48 +0800, Zenghui Yu wrote:
> Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
> gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its
> entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.
> 
> Fix this issue by creating a separate entry for Kryo4xx Gold.
> 
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
      https://git.kernel.org/arm64/c/5e1e087457c9

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-17 14:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09  4:38 [PATCH] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76 Zenghui Yu
2022-08-09  4:38 ` Zenghui Yu
2022-08-09  6:08 ` Marc Zyngier
2022-08-09  6:08   ` Marc Zyngier
2022-08-09  8:41   ` Will Deacon
2022-08-09  8:41     ` Will Deacon
2022-08-17 14:58 ` Will Deacon
2022-08-17 14:58   ` Will Deacon

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.