[PATCH v3 4/5] arm64: errata: Work around early CME DVMSync acknowledgement
Catalin Marinas
catalin.marinas at arm.com
Fri Mar 27 12:15:31 PDT 2026
On Mon, Mar 23, 2026 at 04:24:04PM +0000, Catalin Marinas wrote:
> +void sme_enable_dvmsync(void)
> +{
> + if ((!cpumask_available(sme_dvmsync_cpus) &&
> + !zalloc_cpumask_var(&sme_dvmsync_cpus, GFP_ATOMIC)) ||
> + (!cpumask_available(sme_active_cpus) &&
> + !zalloc_cpumask_var(&sme_active_cpus, GFP_ATOMIC)))
> + panic("Unable to allocate the cpumasks for SME DVMSync erratum");
> +
> + cpumask_set_cpu(smp_processor_id(), sme_dvmsync_cpus);
> +}
Sashiko (correctly) highlighted a race here. This function, even if the
erratum is a local cpu feature, is still called via stop_machine() on
all active cpus when the non-boot features are initialised. It only
matters if CPUMASK_OFFSTACK is enabled. I'll add a fix, most likely a
lock around this to serialise the cpumask initialisation.
--
Catalin
More information about the linux-arm-kernel
mailing list