]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: mediatek-hw: Fix double devm_remap in hotplug case
authorHector.Yuan <hector.yuan@mediatek.com>
Fri, 29 Oct 2021 11:42:23 +0000 (19:42 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 27 Dec 2021 04:14:53 +0000 (09:44 +0530)
commitbb6ee598c8bff0502855f7a2f0ce6dffc26a987e
tree1d89c2b7bdb4595aaad80152bbde105b0a14de3e
parent42ee543304e23dad6065643581a26f7a60c94518
cpufreq: mediatek-hw: Fix double devm_remap in hotplug case

When hotpluging policy cpu, cpu policy init will be called multiple times.
Unplug CPU7 -> CPU6 -> CPU5 -> CPU4, then plug CPU4 again.
In this case, devm_remap will double remap and resource allocate fail.
So replace devm_remap to ioremap and release resources in cpu policy exit.

Signed-off-by: Hector.Yuan <hector.yuan@mediatek.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/mediatek-cpufreq-hw.c