diff options
Diffstat (limited to 'arch/arc/kernel/smp.c')
-rw-r--r-- | arch/arc/kernel/smp.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index 8ee010fdbc18..3af3e06dcf02 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -37,6 +37,8 @@ | |||
37 | arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED; | 37 | arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED; |
38 | arch_spinlock_t smp_bitops_lock = __ARCH_SPIN_LOCK_UNLOCKED; | 38 | arch_spinlock_t smp_bitops_lock = __ARCH_SPIN_LOCK_UNLOCKED; |
39 | 39 | ||
40 | struct plat_smp_ops plat_smp_ops; | ||
41 | |||
40 | /* XXX: per cpu ? Only needed once in early seconday boot */ | 42 | /* XXX: per cpu ? Only needed once in early seconday boot */ |
41 | struct task_struct *secondary_idle_tsk; | 43 | struct task_struct *secondary_idle_tsk; |
42 | 44 | ||
@@ -105,6 +107,11 @@ void __attribute__((weak)) arc_platform_smp_wait_to_boot(int cpu) | |||
105 | " b 1b \n"); | 107 | " b 1b \n"); |
106 | } | 108 | } |
107 | 109 | ||
110 | const char *arc_platform_smp_cpuinfo(void) | ||
111 | { | ||
112 | return plat_smp_ops.info; | ||
113 | } | ||
114 | |||
108 | /* | 115 | /* |
109 | * The very first "C" code executed by secondary | 116 | * The very first "C" code executed by secondary |
110 | * Called from asm stub in head.S | 117 | * Called from asm stub in head.S |
@@ -156,7 +163,8 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) | |||
156 | pr_info("Idle Task [%d] %p", cpu, idle); | 163 | pr_info("Idle Task [%d] %p", cpu, idle); |
157 | pr_info("Trying to bring up CPU%u ...\n", cpu); | 164 | pr_info("Trying to bring up CPU%u ...\n", cpu); |
158 | 165 | ||
159 | arc_platform_smp_wakeup_cpu(cpu, | 166 | if (plat_smp_ops.cpu_kick) |
167 | plat_smp_ops.cpu_kick(cpu, | ||
160 | (unsigned long)first_lines_of_secondary); | 168 | (unsigned long)first_lines_of_secondary); |
161 | 169 | ||
162 | /* wait for 1 sec after kicking the secondary */ | 170 | /* wait for 1 sec after kicking the secondary */ |
@@ -225,7 +233,8 @@ static void ipi_send_msg(const struct cpumask *callmap, enum ipi_msg_type msg) | |||
225 | } | 233 | } |
226 | 234 | ||
227 | /* Call the platform specific cross-CPU call function */ | 235 | /* Call the platform specific cross-CPU call function */ |
228 | arc_platform_ipi_send(callmap); | 236 | if (plat_smp_ops.ipi_send) |
237 | plat_smp_ops.ipi_send((void *)callmap); | ||
229 | 238 | ||
230 | local_irq_restore(flags); | 239 | local_irq_restore(flags); |
231 | } | 240 | } |
@@ -299,7 +308,8 @@ irqreturn_t do_IPI(int irq, void *dev_id) | |||
299 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 308 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |
300 | unsigned long ops; | 309 | unsigned long ops; |
301 | 310 | ||
302 | arc_platform_ipi_clear(cpu, irq); | 311 | if (plat_smp_ops.ipi_clear) |
312 | plat_smp_ops.ipi_clear(cpu, irq); | ||
303 | 313 | ||
304 | /* | 314 | /* |
305 | * XXX: is this loop really needed | 315 | * XXX: is this loop really needed |