linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late
@ 2020-09-11 18:16 Marc Zyngier
  2020-09-11 18:31 ` Will Deacon
  2020-09-11 18:59 ` Matthias Kaehlcke
  0 siblings, 2 replies; 4+ messages in thread
From: Marc Zyngier @ 2020-09-11 18:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Catalin Marinas, Sai Prakash Ranjan, kernel-team, Will Deacon,
	Doug Anderson

Now that we allow CPUs affected by erratum 1418040 to come in late,
this prevents their unaffected sibblings from coming in late (or
coming back after a suspend or hotplug-off, which amounts to the
same thing).

To allow this, we need to add ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU,
which amounts to set .type to ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE.

Reported-by: Doug Anderson <dianders@google.com>
Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Fixes: bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 arch/arm64/kernel/cpu_errata.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index c332d49780dc..560ba69e13c1 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -910,8 +910,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
 		.desc = "ARM erratum 1418040",
 		.capability = ARM64_WORKAROUND_1418040,
 		ERRATA_MIDR_RANGE_LIST(erratum_1418040_list),
-		.type = (ARM64_CPUCAP_SCOPE_LOCAL_CPU |
-			 ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU),
+		/*
+		 * We need to allow affected CPUs to come in late, but
+		 * also need the non-affected CPUs to be able to come
+		 * in at any point in time. Wonderful.
+		 */
+		.type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
 	},
 #endif
 #ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT
-- 
2.28.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] 4+ messages in thread

* Re: [PATCH] arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late
  2020-09-11 18:16 [PATCH] arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late Marc Zyngier
@ 2020-09-11 18:31 ` Will Deacon
  2020-09-11 18:59 ` Matthias Kaehlcke
  1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2020-09-11 18:31 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Catalin Marinas, Sai Prakash Ranjan, kernel-team,
	linux-arm-kernel, Doug Anderson

On Fri, Sep 11, 2020 at 07:16:11PM +0100, Marc Zyngier wrote:
> Now that we allow CPUs affected by erratum 1418040 to come in late,
> this prevents their unaffected sibblings from coming in late (or
> coming back after a suspend or hotplug-off, which amounts to the
> same thing).
> 
> To allow this, we need to add ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU,
> which amounts to set .type to ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE.
> 
> Reported-by: Doug Anderson <dianders@google.com>
> Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> Fixes: bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  arch/arm64/kernel/cpu_errata.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
> index c332d49780dc..560ba69e13c1 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -910,8 +910,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
>  		.desc = "ARM erratum 1418040",
>  		.capability = ARM64_WORKAROUND_1418040,
>  		ERRATA_MIDR_RANGE_LIST(erratum_1418040_list),
> -		.type = (ARM64_CPUCAP_SCOPE_LOCAL_CPU |
> -			 ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU),
> +		/*
> +		 * We need to allow affected CPUs to come in late, but
> +		 * also need the non-affected CPUs to be able to come
> +		 * in at any point in time. Wonderful.
> +		 */
> +		.type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,

Acked-by: Will Deacon <will@kernel.org>

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: Allow CPUs unffected by ARM erratum 1418040 to come in late
  2020-09-11 18:16 [PATCH] arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late Marc Zyngier
  2020-09-11 18:31 ` Will Deacon
@ 2020-09-11 18:59 ` Matthias Kaehlcke
  2020-09-11 19:51   ` Doug Anderson
  1 sibling, 1 reply; 4+ messages in thread
From: Matthias Kaehlcke @ 2020-09-11 18:59 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Sai Prakash Ranjan, kernel-team, Catalin Marinas, Doug Anderson,
	Will Deacon, linux-arm-kernel

On Fri, Sep 11, 2020 at 07:16:11PM +0100, Marc Zyngier wrote:
> Now that we allow CPUs affected by erratum 1418040 to come in late,
> this prevents their unaffected sibblings from coming in late (or
> coming back after a suspend or hotplug-off, which amounts to the
> same thing).
> 
> To allow this, we need to add ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU,
> which amounts to set .type to ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE.
> 
> Reported-by: Doug Anderson <dianders@google.com>
> Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> Fixes: bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Tested-by: Matthias Kaehlcke <mka@chromium.org>

And I guess I deserve brownie points for having found the problem
initially and identified the offending commit, even though it was
Doug who reported it to the list :)

Reported-by: Matthias Kaehlcke <mka@chromium.org>

_______________________________________________
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: Allow CPUs unffected by ARM erratum 1418040 to come in late
  2020-09-11 18:59 ` Matthias Kaehlcke
@ 2020-09-11 19:51   ` Doug Anderson
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2020-09-11 19:51 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Sai Prakash Ranjan, kernel-team, Marc Zyngier, Catalin Marinas,
	Will Deacon, Linux ARM

Hi,

On Fri, Sep 11, 2020 at 11:59 AM Matthias Kaehlcke <mka@chromium.org> wrote:
>
> On Fri, Sep 11, 2020 at 07:16:11PM +0100, Marc Zyngier wrote:
> > Now that we allow CPUs affected by erratum 1418040 to come in late,
> > this prevents their unaffected sibblings from coming in late (or
> > coming back after a suspend or hotplug-off, which amounts to the
> > same thing).
> >
> > To allow this, we need to add ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU,
> > which amounts to set .type to ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE.
> >
> > Reported-by: Doug Anderson <dianders@google.com>
> > Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> > Fixes: bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
>
> Tested-by: Matthias Kaehlcke <mka@chromium.org>
>
> And I guess I deserve brownie points for having found the problem
> initially and identified the offending commit, even though it was
> Doug who reported it to the list :)
>
> Reported-by: Matthias Kaehlcke <mka@chromium.org>

LOL, I was just thinking that.  Feel free to just use Matthias's
Reported-by and leave mine off.  I don't think my contributions here
are enough to warrant a tag.  ;-)

-Doug

_______________________________________________
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-09-11 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 18:16 [PATCH] arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late Marc Zyngier
2020-09-11 18:31 ` Will Deacon
2020-09-11 18:59 ` Matthias Kaehlcke
2020-09-11 19:51   ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).