diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-03-24 06:19:31 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:12 -0400 |
commit | 0c2cb004b262987f7ab84d0c40b7bff74ed5d17b (patch) | |
tree | 0a10cab45f14dc1c93645c63cf66add32b0bd1ad /arch/mips | |
parent | f0cff5c86f7d3be0084eedbf449c3f47638e76f2 (diff) |
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>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | arch/mips/kernel/smp-mt.c | 23 |
2 files changed, 2 insertions, 22 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index a5ea11d8ec4e..14aeb174e00f 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1918,6 +1918,7 @@ config MIPS_MT_SMP | |||
1918 | select CPU_MIPSR2_IRQ_VI | 1918 | select CPU_MIPSR2_IRQ_VI |
1919 | select CPU_MIPSR2_IRQ_EI | 1919 | select CPU_MIPSR2_IRQ_EI |
1920 | select SYNC_R4K | 1920 | select SYNC_R4K |
1921 | select MIPS_GIC_IPI | ||
1921 | select MIPS_MT | 1922 | select MIPS_MT |
1922 | select SMP | 1923 | select SMP |
1923 | select SMP_UP | 1924 | select SMP_UP |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 3378c452e5d7..f8e13149604d 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -113,27 +113,6 @@ static void __init smvp_tc_init(unsigned int tc, unsigned int mvpconf0) | |||
113 | write_tc_c0_tchalt(TCHALT_H); | 113 | write_tc_c0_tchalt(TCHALT_H); |
114 | } | 114 | } |
115 | 115 | ||
116 | #ifdef CONFIG_IRQ_GIC | ||
117 | static 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 | |||
137 | static void vsmp_send_ipi_single(int cpu, unsigned int action) | 116 | static void vsmp_send_ipi_single(int cpu, unsigned int action) |
138 | { | 117 | { |
139 | int i; | 118 | int i; |
@@ -142,7 +121,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action) | |||
142 | 121 | ||
143 | #ifdef CONFIG_IRQ_GIC | 122 | #ifdef CONFIG_IRQ_GIC |
144 | if (gic_present) { | 123 | if (gic_present) { |
145 | mp_send_ipi_single(cpu, action); | 124 | gic_send_ipi_single(cpu, action); |
146 | return; | 125 | return; |
147 | } | 126 | } |
148 | #endif | 127 | #endif |