]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ARM: tegra: don't timeout if CPU is powergated
authorStefan Agner <stefan@agner.ch>
Tue, 11 Feb 2014 00:44:13 +0000 (01:44 +0100)
committerStephen Warren <swarren@nvidia.com>
Wed, 12 Feb 2014 19:10:58 +0000 (12:10 -0700)
When booting secondary CPU(s) which are not yet powergated, a wrong
check lead to a timeout after 100 jiffies. With this patch, we only
delay powergating if CPUs are still not powered yet.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
arch/arm/mach-tegra/platsmp.c

index eb72ae709124e4978167b2c38c96a63d44543b46..929d1046e2b413b05987b929746fe645be992655 100644 (file)
@@ -114,7 +114,7 @@ static int tegra30_boot_secondary(unsigned int cpu, struct task_struct *idle)
 
                /* Wait for the power to come up. */
                timeout = jiffies + msecs_to_jiffies(100);
-               while (tegra_pmc_cpu_is_powered(cpu)) {
+               while (!tegra_pmc_cpu_is_powered(cpu)) {
                        if (time_after(jiffies, timeout))
                                return -ETIMEDOUT;
                        udelay(10);