Skip to contentSkip to conversation

arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late

PATCH In review Marc Zyngier 4 participants 4 messages Sep 11, 2020 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late

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.

Fixes bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
---
 arch/arm64/kernel/cpu_errata.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm64/kernel/cpu_errata.c +6 -2
index c332d49780dc..560ba69e13c1 100644
@@ -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
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 22 lines · Marc Zyngier

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.

Fixes bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
---
 arch/arm64/kernel/cpu_errata.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm64/kernel/cpu_errata.c +0 -0
index c332d49780dc..560ba69e13c1 100644
@@ -910,8 +910,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
 		.desc = "ARM erratum 1418040",

arch/arm64/kernel/cpu_errata.c const struct arm64_cpu_capabilities arm64_errata[] = { · line 918

Quoted 10 lines
arch/arm64/kernel/cpu_errata.c +6 -2
 		.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,

Will

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Tested-by on v1 1/1
#2 lore raw
In reply to Marc Zyngier
Quoted 5 lines · Marc Zyngier

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).

Quoted 7 lines

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.

Fixes bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")

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 :)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Hi,

Quoted 15 lines · Matthias Kaehlcke
Quoted 5 lines · Marc Zyngier

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).

Quoted 7 lines

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.

Fixes bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040")
Quoted 7 lines

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 :)

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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel