From patchwork Fri Jan 3 15:45:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3432091 Return-Path: X-Original-To: patchwork-linux-arm@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 C72589F2E9 for ; Fri, 3 Jan 2014 15:46:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E40F12010F for ; Fri, 3 Jan 2014 15:46:41 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2BF9200E6 for ; Fri, 3 Jan 2014 15:46:40 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vz6xB-0002xV-By; Fri, 03 Jan 2014 15:46:29 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vz6x8-0001NW-Uh; Fri, 03 Jan 2014 15:46:26 +0000 Received: from juliette.telenet-ops.be ([195.130.137.74]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vz6x5-0001Mh-Mq for linux-arm-kernel@lists.infradead.org; Fri, 03 Jan 2014 15:46:24 +0000 Received: from ayla.of.borg ([84.193.72.141]) by juliette.telenet-ops.be with bizsmtp id 9Tm21n00432ts5g06Tm2Nx; Fri, 03 Jan 2014 16:46:02 +0100 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1Vz6wj-00079v-T1; Fri, 03 Jan 2014 16:46:01 +0100 From: Geert Uytterhoeven To: Russell King , Arnd Bergmann , Marc Zyngier Subject: [PATCH] arm/smp: Make boot_secondary() static Date: Fri, 3 Jan 2014 16:45:59 +0100 Message-Id: <1388763959-27491-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140103_104623_957923_773344EC X-CRM114-Status: GOOD ( 11.93 ) X-Spam-Score: -1.9 (-) Cc: Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: Geert Uytterhoeven After becoming a mandatory function, boot_secondary() is no longer used outside arch/arm/kernel/smp.c. Hence make it static. The code is reshuffled a bit to avoid a forward declaration. Signed-off-by: Geert Uytterhoeven --- arch/arm/include/asm/smp.h | 6 ------ arch/arm/kernel/smp.c | 18 +++++++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 22a3b9b5d4a1..0d2c8c6f8d1d 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h @@ -49,12 +49,6 @@ extern void smp_init_cpus(void); extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int)); /* - * Boot a secondary CPU, and assign it the specified idle task. - * This also gives us the initial stack to use for this CPU. - */ -extern int boot_secondary(unsigned int cpu, struct task_struct *); - -/* * Called from platform specific assembly code, this is the * secondary CPU entry point. */ diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index dc894ab3622b..d05259a33d93 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -88,6 +88,17 @@ static unsigned long get_arch_pgd(pgd_t *pgd) return pgdir >> ARCH_PGD_SHIFT; } +/* + * Boot a secondary CPU, and assign it the specified idle task. + * This also gives us the initial stack to use for this CPU. + */ +static int boot_secondary(unsigned int cpu, struct task_struct *idle) +{ + if (smp_ops.smp_boot_secondary) + return smp_ops.smp_boot_secondary(cpu, idle); + return -ENOSYS; +} + int __cpu_up(unsigned int cpu, struct task_struct *idle) { int ret; @@ -140,13 +151,6 @@ void __init smp_init_cpus(void) smp_ops.smp_init_cpus(); } -int boot_secondary(unsigned int cpu, struct task_struct *idle) -{ - if (smp_ops.smp_boot_secondary) - return smp_ops.smp_boot_secondary(cpu, idle); - return -ENOSYS; -} - int platform_can_cpu_hotplug(void) { #ifdef CONFIG_HOTPLUG_CPU