From patchwork Wed Aug 22 15:13:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10885 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E1AFB23E00 for ; Wed, 22 Aug 2012 15:13:44 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id A5EA0A18D87 for ; Wed, 22 Aug 2012 15:13:32 +0000 (UTC) Received: by yenl8 with SMTP id l8so766920yen.11 for ; Wed, 22 Aug 2012 08:13:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=m7/K/OxDoORou4OZ9GR/ubCCttjWewQhHzvvC9+xx98=; b=XS+6Z5FFocb8GfSpVttRuyJ6vkdQP6a4wwZmDhV6HmXaPaoKJotnXr7RspRf61un7A F7fDsw5jtXOv72KaT/gDvuE3ZQeUV7DjcRgTvSVSXyyXIV6ocwYSCNakpPDATPc9YG5g PeYQNvJ0jRzPxn6FnIPXlxjTN6KCx03rc8L6lzN06Q23QLqZD8gcM7KgbLK+ffp7FO1/ NK/Bzf1eZdi0MB4GwyrKbgN78Q9H16hzcktGxniM4MWZ8crifmtSNmKGGxkcsaeFfFjb ExONJ7UwkSxyyTFCT8YtbtR0A77xbKtDcyr0eAIpxA7pUwDBPJdT863fRNl6PR0JXHXk fDuw== Received: by 10.50.207.106 with SMTP id lv10mr2600613igc.0.1345648423535; Wed, 22 Aug 2012 08:13:43 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp207641igc; Wed, 22 Aug 2012 08:13:42 -0700 (PDT) Received: by 10.216.85.130 with SMTP id u2mr10856945wee.202.1345648422410; Wed, 22 Aug 2012 08:13:42 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.171]) by mx.google.com with ESMTP id h52si6250789wep.93.2012.08.22.08.13.41; Wed, 22 Aug 2012 08:13:42 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MBBob-1SuXSC2D01-00AEpB; Wed, 22 Aug 2012 17:13:33 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann , Santosh Shilimkar , Kevin Hilman , Tony Lindgren Subject: [PATCH 2/6] ARM: omap: allow building omap44xx without SMP Date: Wed, 22 Aug 2012 17:13:06 +0200 Message-Id: <1345648390-4234-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1345648390-4234-1-git-send-email-arnd@arndb.de> References: <1345648390-4234-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:OVAYQ1enPG8JpghIat1ENGLypfoEEf+ygwBLZVwEXlA AhGOXxu4l+yUROsb0a+D0sUv3EXSHoTUbh8MoxeKdD2q8w+H+x VieRKJLTqIPs81KBiEn+0TmcaYcdSDMSW36LCZjMI9p4G7X1CB N0AdV5sBVTs/yNhAgVy8C251o6dg70DbLGAhmaFK2tiO07OKPv JtWII1J/7DkAtZG0swVuggoqricjQKkcuirSaDhJ18Zao7DFdL Wolzm5ZzSyFI900FyTmlLsHlGZSE0U3JC29x3sMd4b5iTFDDHR SPsIInk5nlMGRvuzxQ3z+Wzd70ndfmEhn56i966wYoJAMYCKNh 0KUNCvLitGNDYbMs7RW8JG1M6QP2vQlXzWlks3ZDjzobeg6r8b SfjlnlNIKqskA== X-Gm-Message-State: ALoCoQm8dqV+QAMNggc9DE9COFVN75khpMlqionvvrOpW1CeNEaMhyL3n57VFNsAExtyvm6vKU6y 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. 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 cpuidle_register_driver(&omap4_idle_driver); if (cpuidle_register_device(dev)) { diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 040b13b..279b1ea 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -194,6 +194,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; } #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); +#else +static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) +{ +} #endif /******************************