From patchwork Wed Sep 12 14:58:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11357 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 B141F23F6B for ; Wed, 12 Sep 2012 14:58:43 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1D3BF3EFA225 for ; Wed, 12 Sep 2012 14:58:43 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so1342486iaf.11 for ; Wed, 12 Sep 2012 07:58:42 -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=MNVkS/nB34vYbi1u2PsdOEg1wO/NgWmPd59n1FfwDBk=; b=Qr093wiNCFNbXqMAjZ5W1eRhqT+VjpdkYPSknuri1gb2Y/LmjfVi/3Kx32yn8xnhld 1MZEtMEWSAD3VUI7lOS6+hw6F1uRvf94+4qfEsL/Eh3VL9nHDAuTjbB+ZlenlBuSc8S7 jjDgM4QNq/OpnNNLHhhpJYG6OcnEB+GDY1KBY3r9gfL6nWm0GH8D0d2bhjGpN3K8WZlF QpP5xqdlBfnGKupRVjpduML1n6ObF1ifcUK+oH5nx75zgkKRmqzIVPaoPnu+WImmIWf2 QuT0Xtj3O7KDYLJ8slAY8TFBNmhGQUb1rp3QijUc4/B1VgEkfD0RsT9ntY4gxXiMf5yT cATA== Received: by 10.50.237.41 with SMTP id uz9mr21233932igc.43.1347461922883; Wed, 12 Sep 2012 07:58:42 -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 ex8csp75418igc; Wed, 12 Sep 2012 07:58:41 -0700 (PDT) Received: by 10.204.148.82 with SMTP id o18mr6085435bkv.41.1347461921024; Wed, 12 Sep 2012 07:58:41 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTP id go4si12690888bkc.60.2012.09.12.07.58.40; Wed, 12 Sep 2012 07:58:40 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.10; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0Lltn3-1Tl99K49AH-00ZdVY; Wed, 12 Sep 2012 16:58:40 +0200 From: Arnd Bergmann To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v9 12/13] ARM: smp: Make SoC descriptor mandatory for SMP platforms Date: Wed, 12 Sep 2012 16:58:25 +0200 Message-Id: <1347461906-13527-13-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1347461906-13527-1-git-send-email-arnd@arndb.de> References: <1347461906-13527-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:N/TjJyUOvQAhgBQ9XUe57LAEREsZDaM6qzNPyjBlyys N2Pt9qSWLZ/JwM6uukKwunLXERIcM+S/hbgwhpvJd5pGI0oNfW UeGq2wPQniyE3+9n4RlM/9TW/aA5H/C7AOsnkCyD7KQqgFmlWL H3j5zw29c+iDdRVhiOSJ2/h92phGLg04xgFq0nb8hVIQMgQIFX Y75PcgyHP95MSYXzsZjsgT2O+YLM+0WF4B+YgLfOe4jKjkotlv pRNSKvJ32dk+CI6H9r0dwU29RrbvrjyBC4HwpWqyBrTAc9VJN0 M0tRdfj6o0kS+Vukd/5kf0yDQI6UFtF9obzLCrwV7NcN1nkvq/ VorFxwQk5gnF+E4dA+OTBoTtkPo1n7eeDoaFec86PQXvRw+nhG +37qjl8UuZbiwZDFj612bh12SR4It5LQFU= X-Gm-Message-State: ALoCoQl8r07j9GBw50jCQ9XVzfhv7GN7Xay+YSkZ7Tr441VmZwPeY9xJEGYXXqajiPIH/ZIG7DnW From: Marc Zyngier Now that all SMP platforms have been converted to the SOC descriptor and its SMP operations, remove the "weak" attribute from the hooks in smp.c, and make the functions static wherever possible. Signed-off-by: Marc Zyngier Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/smp.h | 14 -------------- arch/arm/kernel/smp.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index f79a9f5..3a8cfee 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h @@ -60,15 +60,6 @@ extern int boot_secondary(unsigned int cpu, struct task_struct *); */ asmlinkage void secondary_start_kernel(void); -/* - * Perform platform specific initialisation of the specified CPU. - */ -extern void platform_secondary_init(unsigned int cpu); - -/* - * Initialize cpu_possible map, and enable coherency - */ -extern void platform_smp_prepare_cpus(unsigned int); /* * Initial data for bringing up a secondary CPU. @@ -81,15 +72,10 @@ struct secondary_data { extern struct secondary_data secondary_data; extern int __cpu_disable(void); -extern int platform_cpu_disable(unsigned int cpu); extern void __cpu_die(unsigned int cpu); extern void cpu_die(void); -extern void platform_cpu_die(unsigned int cpu); -extern int platform_cpu_kill(unsigned int cpu); -extern void platform_cpu_enable(unsigned int cpu); - extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index d924188..ac3ce02 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -110,25 +110,25 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) } /* platform specific SMP operations */ -void __attribute__((weak)) __init smp_init_cpus(void) +void __init smp_init_cpus(void) { if (smp_ops.smp_init_cpus) smp_ops.smp_init_cpus(); } -void __attribute__((weak)) __init platform_smp_prepare_cpus(unsigned int max_cpus) +static void __init platform_smp_prepare_cpus(unsigned int max_cpus) { if (smp_ops.smp_prepare_cpus) smp_ops.smp_prepare_cpus(max_cpus); } -void __attribute__((weak)) __cpuinit platform_secondary_init(unsigned int cpu) +static void __cpuinit platform_secondary_init(unsigned int cpu) { if (smp_ops.smp_secondary_init) smp_ops.smp_secondary_init(cpu); } -int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) { if (smp_ops.smp_boot_secondary) return smp_ops.smp_boot_secondary(cpu, idle); @@ -138,20 +138,20 @@ int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task #ifdef CONFIG_HOTPLUG_CPU static void percpu_timer_stop(void); -int __attribute__((weak)) platform_cpu_kill(unsigned int cpu) +static int platform_cpu_kill(unsigned int cpu) { if (smp_ops.cpu_kill) return smp_ops.cpu_kill(cpu); return 1; } -void __attribute__((weak)) platform_cpu_die(unsigned int cpu) +static void platform_cpu_die(unsigned int cpu) { if (smp_ops.cpu_die) smp_ops.cpu_die(cpu); } -int __attribute__((weak)) platform_cpu_disable(unsigned int cpu) +static int platform_cpu_disable(unsigned int cpu) { if (smp_ops.cpu_disable) return smp_ops.cpu_disable(cpu); @@ -166,7 +166,7 @@ int __attribute__((weak)) platform_cpu_disable(unsigned int cpu) /* * __cpu_disable runs on the processor to be shutdown. */ -int __cpu_disable(void) +int __cpuinit __cpu_disable(void) { unsigned int cpu = smp_processor_id(); int ret; @@ -209,7 +209,7 @@ static DECLARE_COMPLETION(cpu_died); * called on the thread which is asking for a CPU to be shutdown - * waits until shutdown has completed, or it is timed out. */ -void __cpu_die(unsigned int cpu) +void __cpuinit __cpu_die(unsigned int cpu) { if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) { pr_err("CPU%u: cpu didn't die\n", cpu);