Commit 6a6efbb4 authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Will Deacon

arm64: Verify CPU errata work arounds on hotplugged CPU

CPU Errata work arounds are detected and applied to the
kernel code at boot time and the data is then freed up.
If a new hotplugged CPU requires a work around which
was not applied at boot time, there is nothing we can
do but simply fail the booting.

Cc: Will Deacon <>
Cc: Mark Rutland <>
Cc: Andre Przywara <>
Reviewed-by: default avatarCatalin Marinas <>
Signed-off-by: default avatarSuzuki K Poulose <>
Signed-off-by: default avatarWill Deacon <>
parent 25fc11ae
......@@ -193,6 +193,7 @@ void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
const char *info);
void check_local_cpu_errata(void);
void verify_local_cpu_errata(void);
void verify_local_cpu_capabilities(void);
u64 read_system_reg(u32 id);
......@@ -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",
caps->desc ? : "an erratum");
void check_local_cpu_errata(void)
update_cpu_capabilities(arm64_errata, "enabling workaround for");
......@@ -998,6 +998,7 @@ void verify_local_cpu_capabilities(void)
if (!sys_caps_initialised)
if (system_supports_32bit_el0())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment