From patchwork Thu Jun 5 05:15:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4303021 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0BDC7BEEA7 for ; Thu, 5 Jun 2014 05:13:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C2A9201F7 for ; Thu, 5 Jun 2014 05:13:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 653AD20179 for ; Thu, 5 Jun 2014 05:13:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbaFEFNS (ORCPT ); Thu, 5 Jun 2014 01:13:18 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:63223 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751851AbaFEFNR (ORCPT ); Thu, 5 Jun 2014 01:13:17 -0400 Received: by mail-pd0-f171.google.com with SMTP id y13so551815pdi.16 for ; Wed, 04 Jun 2014 22:13:16 -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=IZH85oHJe0Lccig4L2rJCEJ8ZMXdLXYeUdi40uriCg0hRvmGoT/nARhgHAr8EBw80R ZVhymgolIBsjfq6sWiCIpmhWxRdd1TkkZa59qv51dMEi7MUGywNq0hLjeX1RqRaB9nvo VyhGDnhkVxiINrQRmEeQwW3MhG/1hWDtEdyaEND9XCGzyFioKWS40Wee9t4cUhi+93mQ Jc8tQSW+hZwjaGggGwDu+zUL0C3Lpb+DK/pgNQ7pSixjlUWi+IMyWVXqqVA7cEPACYd8 z0eg/8Da4veghVhaVCKbNS7ZOqgoSI25/+B91kV1uSY1kPz/mlG+OyXuv9NpgJ8OwcTi sArQ== X-Received: by 10.68.213.74 with SMTP id nq10mr72456132pbc.4.1401945196859; Wed, 04 Jun 2014 22:13:16 -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 gw8sm17692926pbc.28.2014.06.04.22.13.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jun 2014 22:13:16 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au, keita.kobayashi.ym@renesas.com Date: Thu, 05 Jun 2014 14:15:20 +0900 Message-Id: <20140605051520.18075.77930.sendpatchset@w520> In-Reply-To: <20140605051505.18075.76727.sendpatchset@w520> References: <20140605051505.18075.76727.sendpatchset@w520> Subject: [PATCH 02/08] 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 */