ARM: exynos: Fix timeout when booting secondary CPUs 85/199785/2
authorStuart Menefy <stuart.menefy@mathembedded.com>
Mon, 28 Jan 2019 23:06:45 +0000 (23:06 +0000)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 18 Feb 2019 04:55:04 +0000 (04:55 +0000)
Without this fix the loop waiting for the timeout exits, but the
subsequent test to see if the timeout occurred fails.

Signed-off-by: Stuart Menefy <stuart.menefy@mathembedded.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
[backport of mainline commit 4bdf2f3f20a9de9b07f97907820c42f3a49ba63d]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If43a148b759fa015abd46fdfb60d64fdfe3baf5f

arch/arm/mach-exynos/platsmp.c

index cb6d199..9b9f6fc 100644 (file)
@@ -326,9 +326,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
                /* wait max 10 ms until cpu1 is on */
                while (exynos_cpu_power_state(core_id)
                       != S5P_CORE_LOCAL_PWR_EN) {
-                       if (timeout-- == 0)
+                       if (timeout == 0)
                                break;
-
+                       timeout--;
                        mdelay(1);
                }