|
39 | 39 | #include <asm/amon.h> |
40 | 40 | #include <asm/gic.h> |
41 | 41 |
|
42 | | -static void ipi_call_function(unsigned int cpu) |
43 | | -{ |
44 | | - pr_debug("CPU%d: %s cpu %d status %08x\n", |
45 | | - smp_processor_id(), __func__, cpu, read_c0_status()); |
46 | | - |
47 | | - gic_send_ipi(plat_ipi_call_int_xlate(cpu)); |
48 | | -} |
49 | | - |
50 | | - |
51 | | -static void ipi_resched(unsigned int cpu) |
52 | | -{ |
53 | | - pr_debug("CPU%d: %s cpu %d status %08x\n", |
54 | | - smp_processor_id(), __func__, cpu, read_c0_status()); |
55 | | - |
56 | | - gic_send_ipi(plat_ipi_resched_int_xlate(cpu)); |
57 | | -} |
58 | | - |
59 | | -/* |
60 | | - * FIXME: This isn't restricted to CMP |
61 | | - * The SMVP kernel could use GIC interrupts if available |
62 | | - */ |
63 | | -void cmp_send_ipi_single(int cpu, unsigned int action) |
64 | | -{ |
65 | | - unsigned long flags; |
66 | | - |
67 | | - local_irq_save(flags); |
68 | | - |
69 | | - switch (action) { |
70 | | - case SMP_CALL_FUNCTION: |
71 | | - ipi_call_function(cpu); |
72 | | - break; |
73 | | - |
74 | | - case SMP_RESCHEDULE_YOURSELF: |
75 | | - ipi_resched(cpu); |
76 | | - break; |
77 | | - } |
78 | | - |
79 | | - local_irq_restore(flags); |
80 | | -} |
81 | | - |
82 | | -static void cmp_send_ipi_mask(const struct cpumask *mask, unsigned int action) |
83 | | -{ |
84 | | - unsigned int i; |
85 | | - |
86 | | - for_each_cpu(i, mask) |
87 | | - cmp_send_ipi_single(i, action); |
88 | | -} |
89 | | - |
90 | 42 | static void cmp_init_secondary(void) |
91 | 43 | { |
92 | 44 | struct cpuinfo_mips *c = ¤t_cpu_data; |
@@ -210,8 +162,8 @@ void __init cmp_prepare_cpus(unsigned int max_cpus) |
210 | 162 | } |
211 | 163 |
|
212 | 164 | struct plat_smp_ops cmp_smp_ops = { |
213 | | - .send_ipi_single = cmp_send_ipi_single, |
214 | | - .send_ipi_mask = cmp_send_ipi_mask, |
| 165 | + .send_ipi_single = gic_send_ipi_single, |
| 166 | + .send_ipi_mask = gic_send_ipi_mask, |
215 | 167 | .init_secondary = cmp_init_secondary, |
216 | 168 | .smp_finish = cmp_smp_finish, |
217 | 169 | .cpus_done = cmp_cpus_done, |
|
0 commit comments