From patchwork Fri Jun 6 07:20:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4310171 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 70AB29F387 for ; Fri, 6 Jun 2014 07:18:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FBFA201D3 for ; Fri, 6 Jun 2014 07:18:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B564201C7 for ; Fri, 6 Jun 2014 07:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbaFFHSh (ORCPT ); Fri, 6 Jun 2014 03:18:37 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:50390 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbaFFHSg (ORCPT ); Fri, 6 Jun 2014 03:18:36 -0400 Received: by mail-pd0-f181.google.com with SMTP id z10so2225477pdj.12 for ; Fri, 06 Jun 2014 00:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=kD12F7ndDNqxTeOHaf71RovRTPeGF+mb838Rgdpf4Eo=; b=jooTVtn6JnItW9cpjXWoSmiiKOlBATVdF44K91C032JrzHe2N3x0vlRtqR4iPDGPRU MMAuZVfgW78xcOvUs21ZQ3Ynbhqh286y2BrRecItoSI6y8OL9X+31NgypOPl/zGRCeWx mHlTEBzPtGtNN/oDBuQZUJYTgyzz3o1EOOO8LXKQikmAdTNyZBIah3/eiX7Q4+XmCHnd 8k6j7GXIF930tHevJucRQzi0CFoudHXzD/AKL3xdC/+nRE8O2bpkN/XK20OGhaDv9ViS fxjkWApKmyfbf8IkR7CF1/zGDhwrSY8ivfxhrtrP75pDyDwVOsukaNyL/VAEI3Rlm5uw iwWA== X-Received: by 10.68.166.36 with SMTP id zd4mr5709114pbb.54.1402039114332; Fri, 06 Jun 2014 00:18:34 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id jd5sm32067893pbb.18.2014.06.06.00.18.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2014 00:18:13 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au, geert@linux-m68k.org, keita.kobayashi.ym@renesas.com Date: Fri, 06 Jun 2014 16:20:18 +0900 Message-Id: <20140606072018.14868.50095.sendpatchset@w520> In-Reply-To: <20140606072010.14868.5474.sendpatchset@w520> References: <20140606072010.14868.5474.sendpatchset@w520> Subject: [PATCH v2 02/07] ARM: shmobile: Adjust APMU code to build for non-SMP Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Magnus Damm Adjust the APMU code to allow build when CONFIG_SMP=n. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/platsmp-apmu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/platsmp-apmu.c +++ work/arch/arm/mach-shmobile/platsmp-apmu.c 2014-06-05 11:20:35.000000000 +0900 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -25,13 +26,13 @@ static struct { void __iomem *iomem; int bit; -} apmu_cpus[CONFIG_NR_CPUS]; +} apmu_cpus[NR_CPUS]; #define WUPCR_OFFS 0x10 #define PSTR_OFFS 0x40 #define CPUNCR_OFFS(n) (0x100 + (0x10 * (n))) -static int apmu_power_on(void __iomem *p, int bit) +static int __maybe_unused apmu_power_on(void __iomem *p, int bit) { /* request power on */ writel_relaxed(BIT(bit), p + WUPCR_OFFS); @@ -50,7 +51,7 @@ static int apmu_power_off(void __iomem * return 0; } -static int apmu_power_off_poll(void __iomem *p, int bit) +static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) { int k; @@ -73,7 +74,7 @@ static int apmu_wrap(int cpu, int (*fn)( static void apmu_init_cpu(struct resource *res, int cpu, int bit) { - if (apmu_cpus[cpu].iomem) + if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem) return; apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res)); @@ -137,6 +138,7 @@ void __init shmobile_smp_apmu_prepare_cp apmu_parse_cfg(apmu_init_cpu); } +#ifdef CONFIG_SMP int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle) { /* For this particular CPU register boot vector */ @@ -144,6 +146,7 @@ int shmobile_smp_apmu_boot_secondary(uns return apmu_wrap(cpu, apmu_power_on); } +#endif #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) /* nicked from arch/arm/mach-exynos/hotplug.c */