提交 73671500 编写于 作者: D Dmitry Osipenko 提交者: Zheng Zengkai

soc/tegra: regulators: Fix locking up when voltage-spread is out of range

stable inclusion
from stable-5.10.37
commit a1ad124c836816fac8bd5e461d36eaf33cee4e24
bugzilla: 51868
CVE: NA

--------------------------------

commit ef85bb58 upstream.

Fix voltage coupler lockup which happens when voltage-spread is out
of range due to a bug in the code. The max-spread requirement shall be
accounted when CPU regulator doesn't have consumers. This problem is
observed on Tegra30 Ouya game console once system-wide DVFS is enabled
in a device-tree.

Fixes: 78380743 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
Cc: stable@vger.kernel.org
Reported-by: NPeter Geis <pgwipeout@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30
Signed-off-by: NDmitry Osipenko <digetx@gmail.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c2ba336e
...@@ -178,7 +178,7 @@ static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, ...@@ -178,7 +178,7 @@ static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra,
* survive the voltage drop if it's running on a higher frequency. * survive the voltage drop if it's running on a higher frequency.
*/ */
if (!cpu_min_uV_consumers) if (!cpu_min_uV_consumers)
cpu_min_uV = cpu_uV; cpu_min_uV = max(cpu_uV, cpu_min_uV);
/* /*
* Bootloader shall set up voltages correctly, but if it * Bootloader shall set up voltages correctly, but if it
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册