From patchwork Tue Mar 3 15:48:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 5924051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1829F9F380 for ; Tue, 3 Mar 2015 15:52:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3A1E2038A for ; Tue, 3 Mar 2015 15:52:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D84C20364 for ; Tue, 3 Mar 2015 15:52:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSp54-0003d7-HP; Tue, 03 Mar 2015 15:49:58 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSp4y-0003XN-Df for linux-arm-kernel@lists.infradead.org; Tue, 03 Mar 2015 15:49:54 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NKN00E577YFDA90@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 04 Mar 2015 00:49:27 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-dc-54f5d80764ce Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 65.25.20081.708D5F45; Wed, 04 Mar 2015 00:49:27 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NKN00BVI7Y9EG90@mmp1.samsung.com>; Wed, 04 Mar 2015 00:49:27 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Kukjin Kim Subject: Re: [GIT PULL 1/2] Samsung fixes-1 for v4.0 Date: Tue, 03 Mar 2015 16:48:39 +0100 Message-id: <1651242.NSDETIvUSP@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-70-generic-pae; KDE/4.8.5; i686; ; ) In-reply-to: <54F4B250.5080200@kernel.org> References: <54F4B250.5080200@kernel.org> MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRmVeSWpSXmKPExsVy+t9jAV32G19DDF7M07U49mULm8XfScfY Lfofv2a2+Hp4BaPFpsfXWC1mnN/HZHHq+mc2i80fXrI5cHi0NPewefz+NYnRY9OqTjaPO9f2 sHlsXlLvceVEE6vH501yAexRXDYpqTmZZalF+nYJXBnt26MLtrhUtC09wdrAuNemi5GTQ0LA ROLItmVsELaYxIV764FsLg4hgUWMEndnHWaFcFqYJH7MmMkIUsUmYCUxsX0VkM3BISKgKLF5 gQJIDbPAYSaJY0s/sIPUCANNvfr3HRtIDYuAqsScD4YgYV4BTYm9s2+ClYgKeErsnH4AbAyn gJbEvumhIGEhoJKF+94xQ5QLSvyYfI8FxGYW0JZ48u4CK0g5s4C6xJQpuRMYBWYhqZqFpGoW QtUCRuZVjKKpBckFxUnpuYZ6xYm5xaV56XrJ+bmbGMGB/0xqB+PKBotDjAIcjEo8vC84v4YI sSaWFVfmHmKU4GBWEuGVvQIU4k1JrKxKLcqPLyrNSS0+xCjNwaIkzqtk3xYiJJCeWJKanZpa kFoEk2Xi4JRqYFQxnVQ79eKqnTJdyeIsp6LEK1vfTjs7p+WIX8XN94d/rZ/ZaLDtkorZtTMl spKu2lfTvBhs8vcsclsb65rrr3VKXEW+PuCZpIByh4ssa0qTa92nsBTnYrncVxsdD97elv9m qfoNnom2z1sDLB+Yuuapl9c77161vUtEMcf+R+oao6RerclLlViKMxINtZiLihMBySutUHgC AAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150303_074952_657687_4D1AFD3F X-CRM114-Status: GOOD ( 18.93 ) X-Spam-Score: -5.0 (-----) Cc: Kevin Hilman , arm@kernel.org, Arnd Bergmann , "linux-samsung-soc@vger.kernel.org" , 'Olof Johansson' , Russell King , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Tuesday, March 03, 2015 03:56:16 AM Kukjin Kim wrote: > The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539: > > Linux 4.0-rc1 (2015-02-22 18:21:14 -0800) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git > tags/samsung-fixes-1 > > for you to fetch changes up to 8a68de64e984cfc49ecc22ac18155a7fe6dbbfaf: > > ARM: EXYNOS: fix exynos randconfig build error (2015-03-03 03:37:57 +0900) > > ---------------------------------------------------------------- > Samsung fixes for v4.0 > > - fix exynos randconfig build error with SMP=n > - fix wrong hwirq of RTC interrupt for exynos3250 > - fix usage of LDREX and STREX after disabling cache coherency > > ---------------------------------------------------------------- > Chanwoo Choi (1): > ARM: EXYNOS: Fix wrong hwirq of RTC interrupt for Exynos3250 SoC > > Krzysztof Kozlowski (1): > ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency > > Russell King (1): > ARM: EXYNOS: fix exynos randconfig build error Has anyone actually tested this patch with SMP=n && PM_SLEEP=y or SMP=n && CONFIG_ARM_EXYNOS_CPUIDLE=y? The patch is just insufficient as it prevents build of arch/arm/mach-exynos/pm.o and arch/arm/mach-exynos/sleep.o for SMP=n. Both files are needed for PM_SLEEP=y code that resides in arch/arm/mach-exynos/suspend.c: LD init/built-in.o arch/arm/mach-exynos/built-in.o: In function `exynos_save_cp15': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/firmware.c:36: undefined reference to `exynos_cpu_resume_ns' /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/firmware.c:36: undefined reference to `cp15_save_power' /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/firmware.c:36: undefined reference to `cp15_save_diag' arch/arm/mach-exynos/built-in.o: In function `exynos5420_pm_resume': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:435: undefined reference to `exynos_pm_central_resume' arch/arm/mach-exynos/built-in.o: In function `__virt_to_phys': /home/bzolnier/sam/linux-sprc/./arch/arm/include/asm/memory.h:228: undefined reference to `exynos_cpu_resume' /home/bzolnier/sam/linux-sprc/./arch/arm/include/asm/memory.h:228: undefined reference to `exynos_cpu_resume' arch/arm/mach-exynos/built-in.o: In function `exynos3250_pm_resume': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:395: undefined reference to `exynos_pm_central_resume' /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:405: undefined reference to `exynos_cpu_restore_register' arch/arm/mach-exynos/built-in.o: In function `exynos_pm_resume': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:365: undefined reference to `exynos_pm_central_resume' /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:382: undefined reference to `exynos_cpu_restore_register' arch/arm/mach-exynos/built-in.o: In function `exynos_pm_prepare': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:253: undefined reference to `exynos_cpu_resume' arch/arm/mach-exynos/built-in.o: In function `exynos_pm_suspend': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:322: undefined reference to `exynos_pm_central_suspend' /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:329: undefined reference to `exynos_cpu_save_register' arch/arm/mach-exynos/built-in.o: In function `exynos5420_pm_suspend': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/suspend.c:338: undefined reference to `exynos_pm_central_suspend' arch/arm/mach-exynos/built-in.o: In function `exynos_dt_machine_init': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/exynos.c:284: undefined reference to `cpuidle_coupled_exynos_data' arch/arm/mach-exynos/built-in.o:(.data+0x70): undefined reference to `exynos_enter_aftr' make: *** [vmlinux] Error 1 Moreover it still allows to select Exynos cpuidle support (CONFIG_ARM_EXYNOS_CPUIDLE=y) with SMP=n which results in: LD init/built-in.o arch/arm/mach-exynos/built-in.o: In function `exynos_dt_machine_init': /home/bzolnier/sam/linux-sprc/arch/arm/mach-exynos/exynos.c:284: undefined reference to `cpuidle_coupled_exynos_data' arch/arm/mach-exynos/built-in.o:(.data+0x70): undefined reference to `exynos_enter_aftr' make: *** [vmlinux] Error 1 The full solution for issue that "ARM: EXYNOS: fix exynos randconfig build error" patch attempted to fix has been posted by me on 4th of February (https://lkml.org/lkml/2015/2/4/521) and for completness is also included below. It fixes a v4.0-rc1 regression caused by a recent addition of cpuidle coupled support for Exynos4210 SoC. It makes only the new Exynos4210 coupled cpuidle support to be dependent on SMP. On UP cpuidle will use the old non-coupled code for Exynos4210 which is an expected behavior (as it was in v3.19). The patch has been tested on Exynos4210 Origen board with both SMP and UP kernels and in both cases it worked fine. 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(-) 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,