lkml.org 
[lkml]   [2020]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 1/2] cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP table
On 09-11-20, 13:42, Marek Szyprowski wrote:
> This patch landed in linux next-20201109 as commit e8f7703f8fe5
> ("cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP
> table"). Sadly it causes regression on some Samsung Exynos based boards:
>
> 8<--- cut here ---
> Unable to handle kernel paging request at virtual address ffffff37
> pgd = (ptrval)
> [ffffff37] *pgd=4ffff841, *pte=00000000, *ppte=00000000
> Internal error: Oops: 27 [#1] PREEMPT SMP ARM
> Modules linked in:
> usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.10.0-rc1-00007-ge8f7703f8fe5
> #1908
> Hardware name: Samsung Exynos (Flattened Device Tree)
> PC is at dev_pm_opp_put_regulators+0x8/0xf0
> LR is at dt_cpufreq_probe+0x19c/0x3fc

Does this fix it for you ?

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 66b3db5efb53..5aa3d4e3140d 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -228,7 +228,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu)
if (ret != -EPROBE_DEFER)
dev_err(cpu_dev, "failed to set regulators: %d\n",
ret);
- goto out;
+ goto free_cpumask;
}
}

@@ -293,6 +293,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu)
dev_pm_opp_of_cpumask_remove_table(priv->cpus);
if (priv->opp_table)
dev_pm_opp_put_regulators(priv->opp_table);
+free_cpumask:
free_cpumask_var(priv->cpus);
return ret;
}

--
viresh

\
 
 \ /
  Last update: 2020-11-10 07:01    [W:0.067 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site