mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
MIPS: smp-mt: Use common GIC IPI implementation
Rather than duplicating the GIC IPI send function, share the one already used by CONFIG_MIPS_CPS & CONFIG_MIPS_CMP. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Paul Burton <paul.burton@imgtec.com> Patchwork: https://patchwork.linux-mips.org/patch/6653/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
f0cff5c86f
commit
0c2cb004b2
|
@ -1918,6 +1918,7 @@ config MIPS_MT_SMP
|
||||||
select CPU_MIPSR2_IRQ_VI
|
select CPU_MIPSR2_IRQ_VI
|
||||||
select CPU_MIPSR2_IRQ_EI
|
select CPU_MIPSR2_IRQ_EI
|
||||||
select SYNC_R4K
|
select SYNC_R4K
|
||||||
|
select MIPS_GIC_IPI
|
||||||
select MIPS_MT
|
select MIPS_MT
|
||||||
select SMP
|
select SMP
|
||||||
select SMP_UP
|
select SMP_UP
|
||||||
|
|
|
@ -113,27 +113,6 @@ static void __init smvp_tc_init(unsigned int tc, unsigned int mvpconf0)
|
||||||
write_tc_c0_tchalt(TCHALT_H);
|
write_tc_c0_tchalt(TCHALT_H);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_GIC
|
|
||||||
static void mp_send_ipi_single(int cpu, unsigned int action)
|
|
||||||
{
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
local_irq_save(flags);
|
|
||||||
|
|
||||||
switch (action) {
|
|
||||||
case SMP_CALL_FUNCTION:
|
|
||||||
gic_send_ipi(plat_ipi_call_int_xlate(cpu));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SMP_RESCHEDULE_YOURSELF:
|
|
||||||
gic_send_ipi(plat_ipi_resched_int_xlate(cpu));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
local_irq_restore(flags);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void vsmp_send_ipi_single(int cpu, unsigned int action)
|
static void vsmp_send_ipi_single(int cpu, unsigned int action)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -142,7 +121,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_GIC
|
#ifdef CONFIG_IRQ_GIC
|
||||||
if (gic_present) {
|
if (gic_present) {
|
||||||
mp_send_ipi_single(cpu, action);
|
gic_send_ipi_single(cpu, action);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue