diff options
Diffstat (limited to 'arch/arc/kernel/smp.c')
-rw-r--r-- | arch/arc/kernel/smp.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index c802bb500602..dcd317c47d09 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -12,23 +12,15 @@ | |||
12 | * -- Initial Write (Borrowed heavily from ARM) | 12 | * -- Initial Write (Borrowed heavily from ARM) |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
18 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
19 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
20 | #include <linux/profile.h> | 18 | #include <linux/profile.h> |
21 | #include <linux/errno.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
24 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
25 | #include <linux/smp.h> | ||
26 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
27 | #include <linux/delay.h> | ||
28 | #include <linux/atomic.h> | 22 | #include <linux/atomic.h> |
29 | #include <linux/percpu.h> | ||
30 | #include <linux/cpumask.h> | 23 | #include <linux/cpumask.h> |
31 | #include <linux/spinlock_types.h> | ||
32 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
33 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
34 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
@@ -136,7 +128,7 @@ void start_kernel_secondary(void) | |||
136 | pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); | 128 | pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); |
137 | 129 | ||
138 | if (machine_desc->init_smp) | 130 | if (machine_desc->init_smp) |
139 | machine_desc->init_smp(smp_processor_id()); | 131 | machine_desc->init_smp(cpu); |
140 | 132 | ||
141 | arc_local_timer_setup(); | 133 | arc_local_timer_setup(); |
142 | 134 | ||
@@ -338,18 +330,11 @@ irqreturn_t do_IPI(int irq, void *dev_id) | |||
338 | */ | 330 | */ |
339 | static DEFINE_PER_CPU(int, ipi_dev); | 331 | static DEFINE_PER_CPU(int, ipi_dev); |
340 | 332 | ||
341 | static struct irqaction arc_ipi_irq = { | ||
342 | .name = "IPI Interrupt", | ||
343 | .flags = IRQF_PERCPU, | ||
344 | .handler = do_IPI, | ||
345 | }; | ||
346 | |||
347 | int smp_ipi_irq_setup(int cpu, int irq) | 333 | int smp_ipi_irq_setup(int cpu, int irq) |
348 | { | 334 | { |
349 | if (!cpu) | 335 | int *dev = per_cpu_ptr(&ipi_dev, cpu); |
350 | return setup_irq(irq, &arc_ipi_irq); | 336 | |
351 | else | 337 | arc_request_percpu_irq(irq, cpu, do_IPI, "IPI Interrupt", dev); |
352 | arch_unmask_irq(irq); | ||
353 | 338 | ||
354 | return 0; | 339 | return 0; |
355 | } | 340 | } |