diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-05-07 15:25:10 +0530 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-07-23 11:16:45 +0530 |
commit | 2b75c0f93e395aa6130c20a08016b143e6ec8c53 (patch) | |
tree | df879f7748f993f2e11150208e0c9ab01ef78112 /arch/arc/kernel/smp.c | |
parent | 4c834452aad01531db949414f94f817a86348d59 (diff) | |
download | blackbird-obmc-linux-2b75c0f93e395aa6130c20a08016b143e6ec8c53.tar.gz blackbird-obmc-linux-2b75c0f93e395aa6130c20a08016b143e6ec8c53.zip |
ARC: [SMP] unify cpu private IRQ requests (TIMER/IPI)
The current cpu-private IRQ registration is ugly as it requires need to
expose arch_unmask_irq() outside of intc code.
So switch to percpu IRQ APIs:
-request_percpu_irq [boot core]
-enable_percpu_irq [all cores]
Encapsulated in helper arc_request_percpu_irq()
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/smp.c')
-rw-r--r-- | arch/arc/kernel/smp.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index c802bb500602..1790c21760a1 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c @@ -136,7 +136,7 @@ void start_kernel_secondary(void) pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); if (machine_desc->init_smp) - machine_desc->init_smp(smp_processor_id()); + machine_desc->init_smp(cpu); arc_local_timer_setup(); @@ -338,18 +338,11 @@ irqreturn_t do_IPI(int irq, void *dev_id) */ static DEFINE_PER_CPU(int, ipi_dev); -static struct irqaction arc_ipi_irq = { - .name = "IPI Interrupt", - .flags = IRQF_PERCPU, - .handler = do_IPI, -}; - int smp_ipi_irq_setup(int cpu, int irq) { - if (!cpu) - return setup_irq(irq, &arc_ipi_irq); - else - arch_unmask_irq(irq); + int *dev = per_cpu_ptr(&ipi_dev, cpu); + + arc_request_percpu_irq(irq, cpu, do_IPI, "IPI Interrupt", dev); return 0; } |