Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: cpufeature: Add "or" to mitigations for multiple errata
@ 2020-05-12 12:42 Geert Uytterhoeven
  2020-05-12 14:12 ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-05-12 12:42 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Geert Uytterhoeven, linux-kernel, linux-arm-kernel

Several actions are not mitigations for a single erratum, but for
multiple errata.  However, printing a line like

    CPU features: detected: ARM errata 1165522, 1319367, 1530923

may give the false impression that all three listed errata have been
detected.  This can confuse the user, who may think his Cortex-A57 is
suddenly affected by Cortex-A76 and Cortex-A55 errata.

Add "or" to all descriptions for mitigations for multiple errata, to
make it clear that only one or more of the errata printed are
applicable, and not necessarily all of them.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm64/kernel/cpu_errata.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 95006a7910262288..b0ce6bf14f6a92c8 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -778,7 +778,7 @@ static const struct midr_range erratum_speculative_at_list[] = {
 const struct arm64_cpu_capabilities arm64_errata[] = {
 #ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE
 	{
-		.desc = "ARM errata 826319, 827319, 824069, 819472",
+		.desc = "ARM errata 826319, 827319, 824069, or 819472",
 		.capability = ARM64_WORKAROUND_CLEAN_CACHE,
 		ERRATA_MIDR_RANGE_LIST(workaround_clean_cache),
 		.cpu_enable = cpu_enable_cache_maint_trap,
@@ -860,7 +860,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
 #endif
 #ifdef CONFIG_ARM64_WORKAROUND_REPEAT_TLBI
 	{
-		.desc = "Qualcomm erratum 1009, ARM erratum 1286807",
+		.desc = "Qualcomm erratum 1009, or ARM erratum 1286807",
 		.capability = ARM64_WORKAROUND_REPEAT_TLBI,
 		.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
 		.matches = cpucap_multi_entry_cap_matches,
@@ -903,7 +903,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
 #endif
 #ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT
 	{
-		.desc = "ARM errata 1165522, 1319367, 1530923",
+		.desc = "ARM errata 1165522, 1319367, or 1530923",
 		.capability = ARM64_WORKAROUND_SPECULATIVE_AT,
 		ERRATA_MIDR_RANGE_LIST(erratum_speculative_at_list),
 	},
-- 
2.17.1


_______________________________________________
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] 4+ messages in thread

* Re: [PATCH] arm64: cpufeature: Add "or" to mitigations for multiple errata
  2020-05-12 12:42 [PATCH] arm64: cpufeature: Add "or" to mitigations for multiple errata Geert Uytterhoeven
@ 2020-05-12 14:12 ` Will Deacon
  2020-05-12 14:38   ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2020-05-12 14:12 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Catalin Marinas, linux-kernel, linux-arm-kernel

On Tue, May 12, 2020 at 02:42:38PM +0200, Geert Uytterhoeven wrote:
> Several actions are not mitigations for a single erratum, but for
> multiple errata.  However, printing a line like
> 
>     CPU features: detected: ARM errata 1165522, 1319367, 1530923
> 
> may give the false impression that all three listed errata have been
> detected.  This can confuse the user, who may think his Cortex-A57 is
> suddenly affected by Cortex-A76 and Cortex-A55 errata.
> 
> Add "or" to all descriptions for mitigations for multiple errata, to
> make it clear that only one or more of the errata printed are
> applicable, and not necessarily all of them.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  arch/arm64/kernel/cpu_errata.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

This seems to conflict with the other patch you sent to reorder the entries.
Please can you send another version, based on the arm64 for-next/kconfig
branch?

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] 4+ messages in thread

* Re: [PATCH] arm64: cpufeature: Add "or" to mitigations for multiple errata
  2020-05-12 14:12 ` Will Deacon
@ 2020-05-12 14:38   ` Geert Uytterhoeven
  2020-05-12 14:44     ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-05-12 14:38 UTC (permalink / raw)
  To: Will Deacon; +Cc: Catalin Marinas, Linux Kernel Mailing List, Linux ARM

Hi Will,

On Tue, May 12, 2020 at 4:12 PM Will Deacon <will@kernel.org> wrote:
> On Tue, May 12, 2020 at 02:42:38PM +0200, Geert Uytterhoeven wrote:
> > Several actions are not mitigations for a single erratum, but for
> > multiple errata.  However, printing a line like
> >
> >     CPU features: detected: ARM errata 1165522, 1319367, 1530923
> >
> > may give the false impression that all three listed errata have been
> > detected.  This can confuse the user, who may think his Cortex-A57 is
> > suddenly affected by Cortex-A76 and Cortex-A55 errata.
> >
> > Add "or" to all descriptions for mitigations for multiple errata, to
> > make it clear that only one or more of the errata printed are
> > applicable, and not necessarily all of them.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> >  arch/arm64/kernel/cpu_errata.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
>
> This seems to conflict with the other patch you sent to reorder the entries.

My reordering applied to the Kconfig file.
This patch applies fine to arm64/for-next/core.

> Please can you send another version, based on the arm64 for-next/kconfig
> branch?

Then it will conflict with commit 02ab1f5018c3ad0b ("arm64: Unify
WORKAROUND_SPECULATIVE_AT_{NVHE,VHE}") from for-next/kvm/errata?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
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] 4+ messages in thread

* Re: [PATCH] arm64: cpufeature: Add "or" to mitigations for multiple errata
  2020-05-12 14:38   ` Geert Uytterhoeven
@ 2020-05-12 14:44     ` Will Deacon
  0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2020-05-12 14:44 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Catalin Marinas, Linux Kernel Mailing List, Linux ARM

On Tue, May 12, 2020 at 04:38:19PM +0200, Geert Uytterhoeven wrote:
> On Tue, May 12, 2020 at 4:12 PM Will Deacon <will@kernel.org> wrote:
> > On Tue, May 12, 2020 at 02:42:38PM +0200, Geert Uytterhoeven wrote:
> > > Several actions are not mitigations for a single erratum, but for
> > > multiple errata.  However, printing a line like
> > >
> > >     CPU features: detected: ARM errata 1165522, 1319367, 1530923
> > >
> > > may give the false impression that all three listed errata have been
> > > detected.  This can confuse the user, who may think his Cortex-A57 is
> > > suddenly affected by Cortex-A76 and Cortex-A55 errata.
> > >
> > > Add "or" to all descriptions for mitigations for multiple errata, to
> > > make it clear that only one or more of the errata printed are
> > > applicable, and not necessarily all of them.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > >  arch/arm64/kernel/cpu_errata.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > This seems to conflict with the other patch you sent to reorder the entries.
> 
> My reordering applied to the Kconfig file.

Sorry, you're right. Your patch didn't apply on top of that, so I wrongly
assumed that it was the culprit.

> > Please can you send another version, based on the arm64 for-next/kconfig
> > branch?
> 
> Then it will conflict with commit 02ab1f5018c3ad0b ("arm64: Unify
> WORKAROUND_SPECULATIVE_AT_{NVHE,VHE}") from for-next/kvm/errata?

Ah, that's ok. I recreate for-next/core so I have flexibility in dropping
branches if they cause problems. Please can you send a version against
for-next/kconfig, and I'll handle the conflict now that you've pointed it
out/

Cheers,

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] 4+ messages in thread

end of thread, other threads:[~2020-05-12 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-12 12:42 [PATCH] arm64: cpufeature: Add "or" to mitigations for multiple errata Geert Uytterhoeven
2020-05-12 14:12 ` Will Deacon
2020-05-12 14:38   ` Geert Uytterhoeven
2020-05-12 14:44     ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox