Commit 5ec2065d authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Sasha Levin

ARM: mvebu: Disable CPU Idle on Armada 38x

[ Upstream commit 548ae94c ]

On Armada 38x SoCs, under heavy I/O load, the system hangs when CPU
Idle is enabled. Waiting for a solution to this issue, this patch
disables the CPU Idle support for this SoC.

As CPU Hot plug support also uses some of the CPU Idle functions it is
also affected by the same issue. This patch disables it also for the
Armada 38x SoCs.
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.17 +
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 870ee204
...@@ -415,6 +415,9 @@ static __init int armada_38x_cpuidle_init(void) ...@@ -415,6 +415,9 @@ static __init int armada_38x_cpuidle_init(void)
void __iomem *mpsoc_base; void __iomem *mpsoc_base;
u32 reg; u32 reg;
pr_warn("CPU idle is currently broken on Armada 38x: disabling");
return 0;
np = of_find_compatible_node(NULL, NULL, np = of_find_compatible_node(NULL, NULL,
"marvell,armada-380-coherency-fabric"); "marvell,armada-380-coherency-fabric");
if (!np) if (!np)
...@@ -476,6 +479,16 @@ static int __init mvebu_v7_cpu_pm_init(void) ...@@ -476,6 +479,16 @@ static int __init mvebu_v7_cpu_pm_init(void)
return 0; return 0;
of_node_put(np); of_node_put(np);
/*
* Currently the CPU idle support for Armada 38x is broken, as
* the CPU hotplug uses some of the CPU idle functions it is
* broken too, so let's disable it
*/
if (of_machine_is_compatible("marvell,armada380")) {
cpu_hotplug_disable();
pr_warn("CPU hotplug support is currently broken on Armada 38x: disabling");
}
if (of_machine_is_compatible("marvell,armadaxp")) if (of_machine_is_compatible("marvell,armadaxp"))
ret = armada_xp_cpuidle_init(); ret = armada_xp_cpuidle_init();
else if (of_machine_is_compatible("marvell,armada370")) else if (of_machine_is_compatible("marvell,armada370"))
...@@ -489,6 +502,7 @@ static int __init mvebu_v7_cpu_pm_init(void) ...@@ -489,6 +502,7 @@ static int __init mvebu_v7_cpu_pm_init(void)
return ret; return ret;
mvebu_v7_pmsu_enable_l2_powerdown_onidle(); mvebu_v7_pmsu_enable_l2_powerdown_onidle();
if (mvebu_v7_cpuidle_device.name)
platform_device_register(&mvebu_v7_cpuidle_device); platform_device_register(&mvebu_v7_cpuidle_device);
cpu_pm_register_notifier(&mvebu_v7_cpu_pm_notifier); cpu_pm_register_notifier(&mvebu_v7_cpu_pm_notifier);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment