aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2011-09-27 09:48:23 -0400
committerArnd Bergmann <arnd@arndb.de>2012-09-14 05:15:01 -0400
commitac6c7998712d55bd15aa2dd5ae85f5988c0cb526 (patch)
tree4701fee21c526e5aefc46fb1ba48e81383086ace /arch/arm/kernel
parent2d8b21d95f44989e09fd9b36ca9f061ad5bc567e (diff)
ARM: smp: Make SMP operations mandatory
Now that all SMP platforms have been converted to use struct smp_operations, remove the "weak" attribute from the hooks in smp.c, and make the functions static wherever possible. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/smp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index d9241885521b..ac3ce029afb8 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)
110} 110}
111 111
112/* platform specific SMP operations */ 112/* platform specific SMP operations */
113void __attribute__((weak)) __init smp_init_cpus(void) 113void __init smp_init_cpus(void)
114{ 114{
115 if (smp_ops.smp_init_cpus) 115 if (smp_ops.smp_init_cpus)
116 smp_ops.smp_init_cpus(); 116 smp_ops.smp_init_cpus();
117} 117}
118 118
119void __attribute__((weak)) __init platform_smp_prepare_cpus(unsigned int max_cpus) 119static void __init platform_smp_prepare_cpus(unsigned int max_cpus)
120{ 120{
121 if (smp_ops.smp_prepare_cpus) 121 if (smp_ops.smp_prepare_cpus)
122 smp_ops.smp_prepare_cpus(max_cpus); 122 smp_ops.smp_prepare_cpus(max_cpus);
123} 123}
124 124
125void __attribute__((weak)) __cpuinit platform_secondary_init(unsigned int cpu) 125static void __cpuinit platform_secondary_init(unsigned int cpu)
126{ 126{
127 if (smp_ops.smp_secondary_init) 127 if (smp_ops.smp_secondary_init)
128 smp_ops.smp_secondary_init(cpu); 128 smp_ops.smp_secondary_init(cpu);
129} 129}
130 130
131int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) 131int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
132{ 132{
133 if (smp_ops.smp_boot_secondary) 133 if (smp_ops.smp_boot_secondary)
134 return smp_ops.smp_boot_secondary(cpu, idle); 134 return smp_ops.smp_boot_secondary(cpu, idle);
@@ -138,20 +138,20 @@ int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task
138#ifdef CONFIG_HOTPLUG_CPU 138#ifdef CONFIG_HOTPLUG_CPU
139static void percpu_timer_stop(void); 139static void percpu_timer_stop(void);
140 140
141int __attribute__((weak)) platform_cpu_kill(unsigned int cpu) 141static int platform_cpu_kill(unsigned int cpu)
142{ 142{
143 if (smp_ops.cpu_kill) 143 if (smp_ops.cpu_kill)
144 return smp_ops.cpu_kill(cpu); 144 return smp_ops.cpu_kill(cpu);
145 return 1; 145 return 1;
146} 146}
147 147
148void __attribute__((weak)) platform_cpu_die(unsigned int cpu) 148static void platform_cpu_die(unsigned int cpu)
149{ 149{
150 if (smp_ops.cpu_die) 150 if (smp_ops.cpu_die)
151 smp_ops.cpu_die(cpu); 151 smp_ops.cpu_die(cpu);
152} 152}
153 153
154int __attribute__((weak)) platform_cpu_disable(unsigned int cpu) 154static int platform_cpu_disable(unsigned int cpu)
155{ 155{
156 if (smp_ops.cpu_disable) 156 if (smp_ops.cpu_disable)
157 return smp_ops.cpu_disable(cpu); 157 return smp_ops.cpu_disable(cpu);
@@ -166,7 +166,7 @@ int __attribute__((weak)) platform_cpu_disable(unsigned int cpu)
166/* 166/*
167 * __cpu_disable runs on the processor to be shutdown. 167 * __cpu_disable runs on the processor to be shutdown.
168 */ 168 */
169int __cpu_disable(void) 169int __cpuinit __cpu_disable(void)
170{ 170{
171 unsigned int cpu = smp_processor_id(); 171 unsigned int cpu = smp_processor_id();
172 int ret; 172 int ret;
@@ -209,7 +209,7 @@ static DECLARE_COMPLETION(cpu_died);
209 * called on the thread which is asking for a CPU to be shutdown - 209 * called on the thread which is asking for a CPU to be shutdown -
210 * waits until shutdown has completed, or it is timed out. 210 * waits until shutdown has completed, or it is timed out.
211 */ 211 */
212void __cpu_die(unsigned int cpu) 212void __cpuinit __cpu_die(unsigned int cpu)
213{ 213{
214 if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) { 214 if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
215 pr_err("CPU%u: cpu didn't die\n", cpu); 215 pr_err("CPU%u: cpu didn't die\n", cpu);