aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2015-03-17 14:26:11 -0400
committerKukjin Kim <kgene@kernel.org>2015-03-17 14:26:11 -0400
commitcfdda3535f87e752780ca18a57d13db58f6a6913 (patch)
treec2112dacf6de729860ed987418581ce56efcadf4
parent435c3454485158cbc65e986e584023d35e04edd0 (diff)
ARM: EXYNOS: Fix build breakage cpuidle on !SMP
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>
-rw-r--r--arch/arm/mach-exynos/exynos.c2
-rw-r--r--arch/arm/mach-exynos/pm.c2
-rw-r--r--drivers/cpuidle/cpuidle-exynos.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 9e9dfdfad9d7..4031a96c904b 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -211,7 +211,7 @@ static void __init exynos_dt_machine_init(void)
211 if (!IS_ENABLED(CONFIG_SMP)) 211 if (!IS_ENABLED(CONFIG_SMP))
212 exynos_sysram_init(); 212 exynos_sysram_init();
213 213
214#ifdef CONFIG_ARM_EXYNOS_CPUIDLE 214#if defined(CONFIG_SMP) && defined(CONFIG_ARM_EXYNOS_CPUIDLE)
215 if (of_machine_is_compatible("samsung,exynos4210")) 215 if (of_machine_is_compatible("samsung,exynos4210"))
216 exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data; 216 exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data;
217#endif 217#endif
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index e6209dadc00d..5685250693fd 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -181,6 +181,7 @@ void exynos_enter_aftr(void)
181 cpu_pm_exit(); 181 cpu_pm_exit();
182} 182}
183 183
184#if defined(CONFIG_SMP) && defined(CONFIG_ARM_EXYNOS_CPUIDLE)
184static atomic_t cpu1_wakeup = ATOMIC_INIT(0); 185static atomic_t cpu1_wakeup = ATOMIC_INIT(0);
185 186
186static int exynos_cpu0_enter_aftr(void) 187static int exynos_cpu0_enter_aftr(void)
@@ -302,3 +303,4 @@ struct cpuidle_exynos_data cpuidle_coupled_exynos_data = {
302 .pre_enter_aftr = exynos_pre_enter_aftr, 303 .pre_enter_aftr = exynos_pre_enter_aftr,
303 .post_enter_aftr = exynos_post_enter_aftr, 304 .post_enter_aftr = exynos_post_enter_aftr,
304}; 305};
306#endif /* CONFIG_SMP && CONFIG_ARM_EXYNOS_CPUIDLE */
diff --git a/drivers/cpuidle/cpuidle-exynos.c b/drivers/cpuidle/cpuidle-exynos.c
index 26f5f29fdb03..9bb5348995a9 100644
--- a/drivers/cpuidle/cpuidle-exynos.c
+++ b/drivers/cpuidle/cpuidle-exynos.c
@@ -117,7 +117,8 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
117{ 117{
118 int ret; 118 int ret;
119 119
120 if (of_machine_is_compatible("samsung,exynos4210")) { 120 if (IS_ENABLED(CONFIG_SMP) &&
121 of_machine_is_compatible("samsung,exynos4210")) {
121 exynos_cpuidle_pdata = pdev->dev.platform_data; 122 exynos_cpuidle_pdata = pdev->dev.platform_data;
122 123
123 ret = cpuidle_register(&exynos_coupled_idle_driver, 124 ret = cpuidle_register(&exynos_coupled_idle_driver,