From patchwork Wed Aug 22 15:36:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 1362251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id D338A3FC71 for ; Wed, 22 Aug 2012 15:40:38 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4CzS-0006OE-Mw; Wed, 22 Aug 2012 15:37:06 +0000 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T4CzN-0006Mp-HZ for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2012 15:37:02 +0000 Received: from mail-gg0-f179.google.com ([209.85.161.179]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKUDT8mwv6DpfS4QXigoZdfBXsvRObrGZS@postini.com; Wed, 22 Aug 2012 08:37:01 PDT Received: by ggni2 with SMTP id i2so746522ggn.38 for ; Wed, 22 Aug 2012 08:36:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=s9KKPskgJ9EA54b7E3WmdXnLyNOrgf1LEyhLu00SMOg=; b=Ve0X/YnA320FzjIChdNtvB0ploomkNqWX6uCHSJolSg2RMUDT1TKOPEr/yWmf3bVUZ tZ2HP80Ot8WV6mK1BAA4iBAXUJP46IjhqtWm6fvCqNOybvqsheX78O+9X1XccufhR3MV O58eyiXkxyf4T1omGQJHBylhR0wva+ml9TvGzg6RIK5YBMReFdj+npTBiEqbm+3WAZYl gxhOzGNI1yvH0TzWbxOQRZ4XVv299RJcYgt6aeHMEcizo/Lhi8bTY3ZPhG+Dc4dcOzgJ h1BlBiG+k+UY05HhOOUd7r9txzwJQvMWAonD7OviAvDfO9pQRNVrnhsCi/DYyuKhSLln eGuw== Received: by 10.50.15.202 with SMTP id z10mr2630358igc.50.1345649818976; Wed, 22 Aug 2012 08:36:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.65.85 with HTTP; Wed, 22 Aug 2012 08:36:38 -0700 (PDT) In-Reply-To: <1345648390-4234-3-git-send-email-arnd@arndb.de> References: <1345648390-4234-1-git-send-email-arnd@arndb.de> <1345648390-4234-3-git-send-email-arnd@arndb.de> From: "Shilimkar, Santosh" Date: Wed, 22 Aug 2012 21:06:38 +0530 Message-ID: Subject: Re: [PATCH 2/6] ARM: omap: allow building omap44xx without SMP To: Arnd Bergmann X-Gm-Message-State: ALoCoQlos5RMjWATJHoZ4smw/2VKSTMUIoRdkjObb04moYlKhVVw+grjFX9KTr9L26rYmO5bE5AL X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.211 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kevin Hilman , Russell King , Tony Lindgren , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Wed, Aug 22, 2012 at 8:43 PM, Arnd Bergmann wrote: > The new omap4 cpuidle implementation currently requires > ARCH_NEEDS_CPU_IDLE_COUPLED, which only works on SMP. > > This patch makes it possible to build a non-SMP kernel > for that platform. This is not normally desired for > end-users but can be useful for testing. > > Without this patch, building rand-0y2jSKT results in: > > drivers/cpuidle/coupled.c: In function 'cpuidle_coupled_poke': > drivers/cpuidle/coupled.c:317:3: error: implicit declaration of function '__smp_call_function_single' [-Werror=implicit-function-declaration] > > It's not clear if this patch is the best solution for > the problem at hand. I have made sure that we can now > build the kernel in all configurations, but that does > not mean it will actually work on an OMAP44xx. > Am not sure either about the subject patch. > Signed-off-by: Arnd Bergmann > Cc: Santosh Shilimkar > Cc: Kevin Hilman > Cc: Tony Lindgren > --- > arch/arm/mach-omap2/Kconfig | 2 +- > arch/arm/mach-omap2/cpuidle44xx.c | 3 ++- > include/linux/cpuidle.h | 4 ++++ > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig > index dd2db02..66a8be3 100644 > --- a/arch/arm/mach-omap2/Kconfig > +++ b/arch/arm/mach-omap2/Kconfig > @@ -62,7 +62,7 @@ config ARCH_OMAP4 > select PM_OPP if PM > select USB_ARCH_HAS_EHCI if USB_SUPPORT > select ARM_CPU_SUSPEND if PM > - select ARCH_NEEDS_CPU_IDLE_COUPLED > + select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP > > config SOC_OMAP5 > bool "TI OMAP5" > diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c > index ee05e19..288bee6 100644 > --- a/arch/arm/mach-omap2/cpuidle44xx.c > +++ b/arch/arm/mach-omap2/cpuidle44xx.c > @@ -238,8 +238,9 @@ int __init omap4_idle_init(void) > for_each_cpu(cpu_id, cpu_online_mask) { > dev = &per_cpu(omap4_idle_dev, cpu_id); > dev->cpu = cpu_id; > +#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED > dev->coupled_cpus = *cpu_online_mask; > - > +#endif Was just thinking whether we should just take care of it at core cpuidle level itself. Will below be enough to kill the build error what you mentioned in the change log ? Regards Santosh diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 2c9bf26..df34534 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c @@ -314,7 +314,9 @@ static void cpuidle_coupled_poke(int cpu) struct call_single_data *csd = &per_cpu(cpuidle_coupled_poke_cb, cpu); if (!cpumask_test_and_set_cpu(cpu, &cpuidle_coupled_poked_mask)) +#ifdef CONFIG_SMP __smp_call_function_single(cpu, csd, 0); +#endif } /**