From 845637dd20cb648dd6e52a8d1e8c23bdde729345 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Tue, 27 Sep 2011 14:48:23 +0100 Subject: [PATCH] --- yaml --- r: 327125 b: refs/heads/master c: ac6c7998712d55bd15aa2dd5ae85f5988c0cb526 h: refs/heads/master i: 327123: fe71dcce3133bb0846c3e8443c373659b9e70fd1 v: v3 --- [refs] | 2 +- trunk/arch/arm/include/asm/smp.h | 14 -------------- trunk/arch/arm/kernel/smp.c | 18 +++++++++--------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/[refs] b/[refs] index 21aeda428565..148da15294ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2d8b21d95f44989e09fd9b36ca9f061ad5bc567e +refs/heads/master: ac6c7998712d55bd15aa2dd5ae85f5988c0cb526 diff --git a/trunk/arch/arm/include/asm/smp.h b/trunk/arch/arm/include/asm/smp.h index f79a9f51e322..3a8cfee26c91 100644 --- a/trunk/arch/arm/include/asm/smp.h +++ b/trunk/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/trunk/arch/arm/kernel/smp.c b/trunk/arch/arm/kernel/smp.c index d9241885521b..ac3ce029afb8 100644 --- a/trunk/arch/arm/kernel/smp.c +++ b/trunk/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);