From patchwork Tue Feb 12 15:45:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2129101 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 485BE3FD4F for ; Tue, 12 Feb 2013 15:42:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5Hy1-0003gl-5B; Tue, 12 Feb 2013 15:40:21 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5Hxg-0003Vl-Js for linux-arm-kernel@lists.infradead.org; Tue, 12 Feb 2013 15:40:01 +0000 Received: by mail-pa0-f46.google.com with SMTP id kp14so147417pab.33 for ; Tue, 12 Feb 2013 07:39:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:date:message-id:in-reply-to:references :subject; bh=TpDzzZ7mAYrByrFKO6VH/u1PTR8aG88X5cQWIsuf+z8=; b=n6fHK4d92xPsPnKMXAsxW5D3R0odxYfiPKiABZ/u7+vjFn1kX7+kmOdi7oLIk5QcPD cmIlJKBdZz9K4l+REY7dyexE5XKINbMIaqFcopTDEUqFXHp5DQLYqSQ/CjiwhpnyJzF2 0CZHj1RZbHBNs8U2VA9/XRQxKOfOiPNzNcyBkKeKUgPzrXvWz3MIXBTS4kpN3k8xKbUA FxXksCulopDT1icb2dBxykshByKyFQL68yhAFgFAFLf1GicvB/hs9gRv3hYAqoX7M3hW BJogwdIEaLc2VDVFravdxdQLzL5vbsSn1YLCRdDAeWRg5LyYnDwXH9pEfpG0o8nZNMW/ a4TQ== X-Received: by 10.66.76.37 with SMTP id h5mr53143253paw.33.1360683599146; Tue, 12 Feb 2013 07:39:59 -0800 (PST) Received: from [127.0.0.1] (FL1-122-133-79-190.tky.mesh.ad.jp. [122.133.79.190]) by mx.google.com with ESMTPS id x2sm75892742paw.8.2013.02.12.07.39.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Feb 2013 07:39:58 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 13 Feb 2013 00:45:34 +0900 Message-Id: <20130212154534.13067.45412.sendpatchset@w520> In-Reply-To: <20130212154438.13067.77359.sendpatchset@w520> References: <20130212154438.13067.77359.sendpatchset@w520> Subject: [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count() X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130212_104000_750500_9F7FF7AB X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.46 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: horms@verge.net.au, Magnus Damm , 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Magnus Damm Reduce the number of lines of code in smp-emev2.c by getting rid of the emev2_get_core_count() function. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/smp-emev2.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) --- 0007/arch/arm/mach-shmobile/smp-emev2.c +++ work/arch/arm/mach-shmobile/smp-emev2.c 2013-02-12 23:51:54.000000000 +0900 @@ -50,18 +50,6 @@ static void modify_scu_cpu_psr(unsigned } -static unsigned int __init emev2_get_core_count(void) -{ - if (!scu_base) { - scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); - emev2_clock_init(); /* need ioremapped SMU */ - } - - WARN_ON_ONCE(!scu_base); - - return scu_base ? scu_get_core_count(scu_base) : 1; -} - static void __cpuinit emev2_secondary_init(unsigned int cpu) { gic_secondary_init(0); @@ -93,7 +81,14 @@ static void __init emev2_smp_prepare_cpu static void __init emev2_smp_init_cpus(void) { - unsigned int ncores = emev2_get_core_count(); + unsigned int ncores; + + if (!scu_base) { + scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); + emev2_clock_init(); /* need ioremapped SMU */ + } + + ncores = scu_base ? scu_get_core_count(scu_base) : 1; shmobile_smp_init_cpus(ncores); }