ARM: EXYNOS: Fix build breakage cpuidle on !SMP
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 17 Mar 2015 18:26:11 +0000 (03:26 +0900)
committerKukjin Kim <kgene@kernel.org>
Tue, 17 Mar 2015 18:26:11 +0000 (03:26 +0900)
The Exynos cpuidle driver has coupled cpuidle built-in so it cannot be
built without SMP:

arch/arm/mach-exynos/pm.c: In function 'exynos_cpu0_enter_aftr':
arch/arm/mach-exynos/pm.c:246:4: error: implicit declaration of function 'arch_send_wakeup_ipi_mask' [-Werror=implicit-function-declaration]
arch/arm/mach-exynos/built-in.o: In function 'exynos_pre_enter_aftr':
../arch/arm/mach-exynos/pm.c:300: undefined reference to 'cpu_boot_reg_base'
arch/arm/mach-exynos/built-in.o: In function 'exynos_cpu1_powerdown':
../arch/arm/mach-exynos/pm.c:282: undefined reference to 'exynos_cpu_power_down'

Fix it by adding missing checks for SMP.

Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
arch/arm/mach-exynos/exynos.c
arch/arm/mach-exynos/pm.c
drivers/cpuidle/cpuidle-exynos.c

index 9e9dfdfad9d77fd670fd186d61907f503815cde3..4031a96c904bf2314ba80857242c227cabe37a3b 100644 (file)
@@ -211,7 +211,7 @@ static void __init exynos_dt_machine_init(void)
        if (!IS_ENABLED(CONFIG_SMP))
                exynos_sysram_init();
 
-#ifdef CONFIG_ARM_EXYNOS_CPUIDLE
+#if defined(CONFIG_SMP) && defined(CONFIG_ARM_EXYNOS_CPUIDLE)
        if (of_machine_is_compatible("samsung,exynos4210"))
                exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data;
 #endif
index e6209dadc00d483c6e85b2b2870bc82828ad749d..5685250693fdf8b5b547674ae845e06c8d6130fe 100644 (file)
@@ -181,6 +181,7 @@ void exynos_enter_aftr(void)
        cpu_pm_exit();
 }
 
+#if defined(CONFIG_SMP) && defined(CONFIG_ARM_EXYNOS_CPUIDLE)
 static atomic_t cpu1_wakeup = ATOMIC_INIT(0);
 
 static int exynos_cpu0_enter_aftr(void)
@@ -302,3 +303,4 @@ struct cpuidle_exynos_data cpuidle_coupled_exynos_data = {
        .pre_enter_aftr         = exynos_pre_enter_aftr,
        .post_enter_aftr                = exynos_post_enter_aftr,
 };
+#endif /* CONFIG_SMP && CONFIG_ARM_EXYNOS_CPUIDLE */
index 26f5f29fdb03f8765ed67e22c5e6a97cb222c43d..9bb5348995a982dd989ffdf8bc0b629348bdd98e 100644 (file)
@@ -117,7 +117,8 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
 {
        int ret;
 
-       if (of_machine_is_compatible("samsung,exynos4210")) {
+       if (IS_ENABLED(CONFIG_SMP) &&
+           of_machine_is_compatible("samsung,exynos4210")) {
                exynos_cpuidle_pdata = pdev->dev.platform_data;
 
                ret = cpuidle_register(&exynos_coupled_idle_driver,