This source file includes following definitions.
- ipi_resched_dispatch
- ipi_call_dispatch
- ipi_resched_interrupt
- ipi_call_interrupt
- arch_init_ipiirq
- msp_vsmp_int_init
1
2
3
4
5
6
7
8
9 #include <linux/smp.h>
10 #include <linux/interrupt.h>
11
12 #include <asm/setup.h>
13
14 #ifdef CONFIG_MIPS_MT_SMP
15 #define MIPS_CPU_IPI_RESCHED_IRQ 0
16 #define MIPS_CPU_IPI_CALL_IRQ 1
17
18
19 static void ipi_resched_dispatch(void)
20 {
21 do_IRQ(MIPS_CPU_IPI_RESCHED_IRQ);
22 }
23
24 static void ipi_call_dispatch(void)
25 {
26 do_IRQ(MIPS_CPU_IPI_CALL_IRQ);
27 }
28
29 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
30 {
31 return IRQ_HANDLED;
32 }
33
34 static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
35 {
36 generic_smp_call_function_interrupt();
37
38 return IRQ_HANDLED;
39 }
40
41 static struct irqaction irq_resched = {
42 .handler = ipi_resched_interrupt,
43 .flags = IRQF_PERCPU,
44 .name = "IPI_resched"
45 };
46
47 static struct irqaction irq_call = {
48 .handler = ipi_call_interrupt,
49 .flags = IRQF_PERCPU,
50 .name = "IPI_call"
51 };
52
53 void __init arch_init_ipiirq(int irq, struct irqaction *action)
54 {
55 setup_irq(irq, action);
56 irq_set_handler(irq, handle_percpu_irq);
57 }
58
59 void __init msp_vsmp_int_init(void)
60 {
61 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
62 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
63 arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, &irq_resched);
64 arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, &irq_call);
65 }
66 #endif