|
@@ -103,6 +103,26 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+/*
|
|
|
+ * The CPU Errata work arounds are detected and applied at boot time
|
|
|
+ * and the related information is freed soon after. If the new CPU requires
|
|
|
+ * an errata not detected at boot, fail this CPU.
|
|
|
+ */
|
|
|
+void verify_local_cpu_errata(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)) {
|
|
|
+ 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 check_local_cpu_errata(void)
|
|
|
{
|
|
|
update_cpu_capabilities(arm64_errata, "enabling workaround for");
|