]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
xen/arm: cpuerrata: Actually check errata on non-boot CPUs
authorJulien Grall <julien.grall@arm.com>
Wed, 14 Feb 2018 12:22:23 +0000 (12:22 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 14 Feb 2018 18:40:48 +0000 (10:40 -0800)
The cpu errata framework was introduced in commit 8b01f6364f "xen/arm:
Detect silicon revision and set cap bits accordingly" and was meant to
detect errata present on any CPUs (via check_local_cpu_errata). However,
the function to check the MIDR (is_affected_midr_range) mistakenly
always use the boot CPU MIDR.

Fix is_affected_midr_range to use the current CPU MIDR.

Reported-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/cpuerrata.c

index 9c7458ef066730b4e254398bf7861218fdac9483..c243521ed40dadc96729d8b1bf7048b156ee1183 100644 (file)
@@ -230,7 +230,7 @@ static int enable_ic_inv_hardening(void *data)
 static bool __maybe_unused
 is_affected_midr_range(const struct arm_cpu_capabilities *entry)
 {
-    return MIDR_IS_CPU_MODEL_RANGE(boot_cpu_data.midr.bits, entry->midr_model,
+    return MIDR_IS_CPU_MODEL_RANGE(current_cpu_data.midr.bits, entry->midr_model,
                                    entry->midr_range_min,
                                    entry->midr_range_max);
 }