diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c --- a/sys/arm64/arm64/cpu_errata.c +++ b/sys/arm64/arm64/cpu_errata.c @@ -42,7 +42,7 @@ #include -typedef void (cpu_quirk_install)(void); +typedef void (cpu_quirk_install)(u_int); struct cpu_quirks { cpu_quirk_install *quirk_install; u_int midr_mask; @@ -106,7 +106,7 @@ }; static void -install_psci_bp_hardening(void) +install_psci_bp_hardening(u_int midr __unused) { if (smccc_arch_features(SMCCC_ARCH_WORKAROUND_1) != SMCCC_RET_SUCCESS) @@ -116,7 +116,7 @@ } static void -install_ssbd_workaround(void) +install_ssbd_workaround(u_int misr __unused) { char *env; @@ -155,11 +155,8 @@ * Invalidate the local icache when changing address spaces. */ static void -install_thunderx_bcast_tlbi_workaround(void) +install_thunderx_bcast_tlbi_workaround(u_int midr) { - u_int midr; - - midr = get_midr(); if (CPU_PART(midr) == CPU_PART_THUNDERX_81XX) PCPU_SET(bcast_tlbi_workaround, 1); else if (CPU_PART(midr) == CPU_PART_THUNDERX) { @@ -184,7 +181,7 @@ for (i = 0; i < nitems(cpu_quirks); i++) { if ((midr & cpu_quirks[i].midr_mask) == cpu_quirks[i].midr_value) { - cpu_quirks[i].quirk_install(); + cpu_quirks[i].quirk_install(midr); } } }