All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Run enable method for errata work arounds on late CPUs
@ 2018-01-17 10:05 ` Suzuki K Poulose
  0 siblings, 0 replies; 20+ messages in thread
From: Suzuki K Poulose @ 2018-01-17 10:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, catalin.marinas, will.deacon, Suzuki K Poulose,
	Mark Rutland, Andre Przywara, Dave Martin

When a CPU is brought up after we have finalised the system
wide capabilities (i.e, features and errata), we make sure the
new CPU doesn't need a new errata work around which has not been
detected already. However we don't run enable() method on the new
CPU for the errata work arounds already detected. This could
cause the new CPU running without potential work arounds.
It is upto the "enable()" method to decide if this CPU should
do something about the errata.

Fixes: commit 6a6efbb45b7d95c84 ("arm64: Verify CPU errata work arounds on hotplugged CPU")
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 arch/arm64/kernel/cpu_errata.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 90a9e465339c..54e41dfe41f6 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -373,15 +373,18 @@ void verify_local_cpu_errata_workarounds(void)
 {
 	const struct arm64_cpu_capabilities *caps = arm64_errata;
 
-	for (; caps->matches; caps++)
-		if (!cpus_have_cap(caps->capability) &&
-			caps->matches(caps, SCOPE_LOCAL_CPU)) {
+	for (; caps->matches; caps++) {
+		if (cpus_have_cap(caps->capability)) {
+			if (caps->enable)
+				caps->enable((void *)caps);
+		} else if (caps->matches(caps, SCOPE_LOCAL_CPU)) {
 			pr_crit("CPU%d: Requires work around for %s, not detected"
 					" at boot time\n",
 				smp_processor_id(),
 				caps->desc ? : "an erratum");
 			cpu_die_early();
 		}
+	}
 }
 
 void update_cpu_errata_workarounds(void)
-- 
2.13.6

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

end of thread, other threads:[~2018-01-17 16:30 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 10:05 [PATCH] arm64: Run enable method for errata work arounds on late CPUs Suzuki K Poulose
2018-01-17 10:05 ` Suzuki K Poulose
2018-01-17 12:25 ` Dave Martin
2018-01-17 12:25   ` Dave Martin
2018-01-17 13:20   ` Robin Murphy
2018-01-17 13:20     ` Robin Murphy
2018-01-17 13:31     ` Suzuki K Poulose
2018-01-17 13:31       ` Suzuki K Poulose
2018-01-17 13:43       ` Robin Murphy
2018-01-17 13:43         ` Robin Murphy
2018-01-17 14:04         ` Suzuki K Poulose
2018-01-17 14:04           ` Suzuki K Poulose
2018-01-17 13:22   ` Suzuki K Poulose
2018-01-17 13:22     ` Suzuki K Poulose
2018-01-17 14:38     ` Dave Martin
2018-01-17 14:38       ` Dave Martin
2018-01-17 14:52       ` Suzuki K Poulose
2018-01-17 14:52         ` Suzuki K Poulose
2018-01-17 16:29         ` Dave Martin
2018-01-17 16:29           ` Dave Martin

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.