aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp-mt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/smp-mt.c')
-rw-r--r--arch/mips/kernel/smp-mt.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 57a3f7a2b370..0fb8cefc9114 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -71,6 +71,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0,
71 71
72 /* Record this as available CPU */ 72 /* Record this as available CPU */
73 set_cpu_possible(tc, true); 73 set_cpu_possible(tc, true);
74 set_cpu_present(tc, true);
74 __cpu_number_map[tc] = ++ncpu; 75 __cpu_number_map[tc] = ++ncpu;
75 __cpu_logical_map[ncpu] = tc; 76 __cpu_logical_map[ncpu] = tc;
76 } 77 }
@@ -112,12 +113,39 @@ static void __init smvp_tc_init(unsigned int tc, unsigned int mvpconf0)
112 write_tc_c0_tchalt(TCHALT_H); 113 write_tc_c0_tchalt(TCHALT_H);
113} 114}
114 115
116#ifdef CONFIG_IRQ_GIC
117static void mp_send_ipi_single(int cpu, unsigned int action)
118{
119 unsigned long flags;
120
121 local_irq_save(flags);
122
123 switch (action) {
124 case SMP_CALL_FUNCTION:
125 gic_send_ipi(plat_ipi_call_int_xlate(cpu));
126 break;
127
128 case SMP_RESCHEDULE_YOURSELF:
129 gic_send_ipi(plat_ipi_resched_int_xlate(cpu));
130 break;
131 }
132
133 local_irq_restore(flags);
134}
135#endif
136
115static void vsmp_send_ipi_single(int cpu, unsigned int action) 137static void vsmp_send_ipi_single(int cpu, unsigned int action)
116{ 138{
117 int i; 139 int i;
118 unsigned long flags; 140 unsigned long flags;
119 int vpflags; 141 int vpflags;
120 142
143#ifdef CONFIG_IRQ_GIC
144 if (gic_present) {
145 mp_send_ipi_single(cpu, action);
146 return;
147 }
148#endif
121 local_irq_save(flags); 149 local_irq_save(flags);
122 150
123 vpflags = dvpe(); /* can't access the other CPU's registers whilst MVPE enabled */ 151 vpflags = dvpe(); /* can't access the other CPU's registers whilst MVPE enabled */