From patchwork Wed Feb 4 18:07:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 5778471 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 34AB4BF6C3 for ; Wed, 4 Feb 2015 18:08:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B07620221 for ; Wed, 4 Feb 2015 18:08:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36D3A20295 for ; Wed, 4 Feb 2015 18:08:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934036AbbBDSIS (ORCPT ); Wed, 4 Feb 2015 13:08:18 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:33092 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934021AbbBDSIR convert rfc822-to-8bit (ORCPT ); Wed, 4 Feb 2015 13:08:17 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJ9007R1EDFVX20@mailout3.samsung.com>; Thu, 05 Feb 2015 03:08:03 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-07-54d260030532 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id CF.A9.09430.30062D45; Thu, 05 Feb 2015 03:08:03 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NJ9006YQEDEG070@mmp2.samsung.com>; Thu, 05 Feb 2015 03:08:03 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Krzysztof Kozlowski Cc: Daniel Lezcano , Kukjin Kim , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marek Szyprowski , Kyungmin Park Subject: Re: [PATCH] ARM: EXYNOS: cpuidle: Fix build breakage on !SMP Date: Wed, 04 Feb 2015 19:07:53 +0100 Message-id: <8043345.BDfdhXvZOx@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-70-generic-pae; KDE/4.8.5; i686; ; ) In-reply-to: <1423045646-20592-1-git-send-email-k.kozlowski@samsung.com> References: <1423045646-20592-1-git-send-email-k.kozlowski@samsung.com> MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=UTF-8 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsVy+t9jQV3mhEshBvOmaVvM+yxr8fqFoUX/ 49fMFmeb3rBbbHp8jdXi8q45bBafe48wWsw4v4/JYu2Ru+wWZ05fYnXg8ti0qpPN4861PWwe m5fUe2y52s7i0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBkXHr5nLThrUHF9jlUD40GtLkZO DgkBE4kLu84wQthiEhfurWfrYuTiEBKYzijxZ9VaFginhUmi+9hHJpAqNgEriYntq8A6RAQM JQ7u3s4EUsQscJ1JYsfkeWwgCWEBV4nH1+axgNgsAqoSlxbeBWvmFdCU2L1/L1iNqICnxM7p B8AGcQp4SBzYtAaohgNom7vE/xUOEOWCEj8m3wMbwyygLfHk3QVWCFtdYtK8RcwTGAVmISmb haRsFpKyBYzMqxhFUwuSC4qT0nON9IoTc4tL89L1kvNzNzGC4+CZ9A7GVQ0WhxgFOBiVeHgF 8i+GCLEmlhVX5h5ilOBgVhLh7fC6FCLEm5JYWZValB9fVJqTWnyIUZqDRUmcV8m+LURIID2x JDU7NbUgtQgmy8TBKdXAqNqskPKkeddXw9+TDP8+mf/ixaHsZ1aWu9XeSzVzBb1SOKs/+dnB nQodsn8NtQy/st/ec1WVkafceVUFw6uWg+9KPnL6MZ/Wirb57ndk9vGAqT5mE37r9xi/PW75 nytyd+oD+xAXxwnV2QYhcldEDD2v6UQURfHYLKjM5am3yL9yZP/LCdZlSizFGYmGWsxFxYkA e2n92n8CAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On Wednesday, February 04, 2015 11:27:26 AM Krzysztof Kozlowski wrote: > 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' > > Make the cpuidle driver depending on SMP because this will be the > fastest way to fix build break without adding a bunch of ifdefs in few > places. There shouldn't be a lot of new ifdefs (please see below) and I would very much prefer for cpuidle to stay supported also on UP kernels. > Signed-off-by: Krzysztof Kozlowski > --- > arch/arm/mach-exynos/pm.c | 2 ++ > drivers/cpuidle/Kconfig.arm | 3 ++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c > index e6209dadc00d..17db00ff7f3a 100644 > --- a/arch/arm/mach-exynos/pm.c > +++ b/arch/arm/mach-exynos/pm.c > @@ -181,6 +181,7 @@ void exynos_enter_aftr(void) > cpu_pm_exit(); > } > > +#ifdef 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_ARM_EXYNOS_CPUIDLE */ > diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm > index 8e07c9419153..5eb86a4f74d9 100644 > --- a/drivers/cpuidle/Kconfig.arm > +++ b/drivers/cpuidle/Kconfig.arm > @@ -55,7 +55,8 @@ config ARM_AT91_CPUIDLE > config ARM_EXYNOS_CPUIDLE > bool "Cpu Idle Driver for the Exynos processors" > depends on ARCH_EXYNOS > - select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP > + depends on SMP > + select ARCH_NEEDS_CPU_IDLE_COUPLED > help > Select this to enable cpuidle for Exynos processors How's about the patch below instead? It builds fine for UP and SMP. I will do more testing tomorrow (unfortunately it seems that something else broke Origen4210 in -next). From: Bartlomiej Zolnierkiewicz Subject: [PATCH] ARM: EXYNOS: cpuidle: Fix build breakage 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 Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/exynos.c | 2 +- arch/arm/mach-exynos/pm.c | 2 ++ drivers/cpuidle/cpuidle-exynos.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/arch/arm/mach-exynos/exynos.c =================================================================== --- a/arch/arm/mach-exynos/exynos.c 2015-02-04 18:30:23.555819717 +0100 +++ b/arch/arm/mach-exynos/exynos.c 2015-02-04 18:43:23.539807815 +0100 @@ -211,7 +211,7 @@ static void __init exynos_dt_machine_ini 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: b/arch/arm/mach-exynos/pm.c =================================================================== --- a/arch/arm/mach-exynos/pm.c 2015-02-04 18:30:23.563819719 +0100 +++ b/arch/arm/mach-exynos/pm.c 2015-02-04 18:47:32.951804008 +0100 @@ -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_coupl .pre_enter_aftr = exynos_pre_enter_aftr, .post_enter_aftr = exynos_post_enter_aftr, }; +#endif /* CONFIG_SMP && CONFIG_ARM_EXYNOS_CPUIDLE */ Index: b/drivers/cpuidle/cpuidle-exynos.c =================================================================== --- a/drivers/cpuidle/cpuidle-exynos.c 2015-02-04 18:30:32.935819577 +0100 +++ b/drivers/cpuidle/cpuidle-exynos.c 2015-02-04 18:46:01.619805400 +0100 @@ -117,7 +117,8 @@ static int exynos_cpuidle_probe(struct p { 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,