diff options
Diffstat (limited to 'arch/arc/kernel/smp.c')
-rw-r--r-- | arch/arc/kernel/smp.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index 4cb3add77c75..f183cc648851 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -126,11 +126,6 @@ void start_kernel_secondary(void) | |||
126 | current->active_mm = mm; | 126 | current->active_mm = mm; |
127 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 127 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
128 | 128 | ||
129 | notify_cpu_starting(cpu); | ||
130 | set_cpu_online(cpu, true); | ||
131 | |||
132 | pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); | ||
133 | |||
134 | /* Some SMP H/w setup - for each cpu */ | 129 | /* Some SMP H/w setup - for each cpu */ |
135 | if (plat_smp_ops.init_per_cpu) | 130 | if (plat_smp_ops.init_per_cpu) |
136 | plat_smp_ops.init_per_cpu(cpu); | 131 | plat_smp_ops.init_per_cpu(cpu); |
@@ -138,7 +133,10 @@ void start_kernel_secondary(void) | |||
138 | if (machine_desc->init_per_cpu) | 133 | if (machine_desc->init_per_cpu) |
139 | machine_desc->init_per_cpu(cpu); | 134 | machine_desc->init_per_cpu(cpu); |
140 | 135 | ||
141 | arc_local_timer_setup(); | 136 | notify_cpu_starting(cpu); |
137 | set_cpu_online(cpu, true); | ||
138 | |||
139 | pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); | ||
142 | 140 | ||
143 | local_irq_enable(); | 141 | local_irq_enable(); |
144 | preempt_disable(); | 142 | preempt_disable(); |
@@ -346,6 +344,10 @@ irqreturn_t do_IPI(int irq, void *dev_id) | |||
346 | 344 | ||
347 | /* | 345 | /* |
348 | * API called by platform code to hookup arch-common ISR to their IPI IRQ | 346 | * API called by platform code to hookup arch-common ISR to their IPI IRQ |
347 | * | ||
348 | * Note: If IPI is provided by platform (vs. say ARC MCIP), their intc setup/map | ||
349 | * function needs to call call irq_set_percpu_devid() for IPI IRQ, otherwise | ||
350 | * request_percpu_irq() below will fail | ||
349 | */ | 351 | */ |
350 | static DEFINE_PER_CPU(int, ipi_dev); | 352 | static DEFINE_PER_CPU(int, ipi_dev); |
351 | 353 | ||
@@ -353,7 +355,16 @@ int smp_ipi_irq_setup(int cpu, int irq) | |||
353 | { | 355 | { |
354 | int *dev = per_cpu_ptr(&ipi_dev, cpu); | 356 | int *dev = per_cpu_ptr(&ipi_dev, cpu); |
355 | 357 | ||
356 | arc_request_percpu_irq(irq, cpu, do_IPI, "IPI Interrupt", dev); | 358 | /* Boot cpu calls request, all call enable */ |
359 | if (!cpu) { | ||
360 | int rc; | ||
361 | |||
362 | rc = request_percpu_irq(irq, do_IPI, "IPI Interrupt", dev); | ||
363 | if (rc) | ||
364 | panic("Percpu IRQ request failed for %d\n", irq); | ||
365 | } | ||
366 | |||
367 | enable_percpu_irq(irq, 0); | ||
357 | 368 | ||
358 | return 0; | 369 | return 0; |
359 | } | 370 | } |