Skip to content

Commit d239950

Browse files
mszyprowvireshk
authored andcommitted
cpufreq: dt: always allocate zeroed cpumask
Commit 0499a78 ("ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512") changed the handling of cpumasks on ARM 64bit, what resulted in the strange issues and warnings during cpufreq-dt initialization on some big.LITTLE platforms. This was caused by mixing OPPs between big and LITTLE cores, because OPP-sharing information between big and LITTLE cores is computed on cpumask, which in turn was not zeroed on allocation. Fix this by switching to zalloc_cpumask_var() call. Fixes: dc279ac ("cpufreq: dt: Refactor initialization to handle probe deferral properly") CC: stable@vger.kernel.org # v5.10+ Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Christoph Lameter (Ampere) <cl@linux.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent ad2a910 commit d239950

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cpufreq/cpufreq-dt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu)
208208
if (!priv)
209209
return -ENOMEM;
210210

211-
if (!alloc_cpumask_var(&priv->cpus, GFP_KERNEL))
211+
if (!zalloc_cpumask_var(&priv->cpus, GFP_KERNEL))
212212
return -ENOMEM;
213213

214214
cpumask_set_cpu(cpu, priv->cpus);

0 commit comments

Comments
 (0)