Skip to content

Commit 173a44d

Browse files
committed
sh: smp: Provide a generic IPI handler.
This provides a generic smp_message_recv() routine (based on the PPC one), that IPI IRQs can wrap in to. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 04ec080 commit 173a44d

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎arch/sh/include/asm/smp.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ extern int __cpu_logical_map[NR_CPUS];
2626
#define SMP_MSG_FUNCTION_SINGLE 2
2727
#define SMP_MSG_NR 3
2828

29+
void smp_message_recv(unsigned int msg);
2930
void plat_smp_setup(void);
3031
void plat_prepare_cpus(unsigned int max_cpus);
3132
int plat_smp_processor_id(void);

‎arch/sh/kernel/smp.c‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SMP support for the SuperH processors.
55
*
6-
* Copyright (C) 2002 - 2007 Paul Mundt
6+
* Copyright (C) 2002 - 2008 Paul Mundt
77
* Copyright (C) 2006 - 2007 Akio Idehara
88
*
99
* This file is subject to the terms and conditions of the GNU General Public
@@ -184,6 +184,24 @@ void arch_send_call_function_single_ipi(int cpu)
184184
plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE);
185185
}
186186

187+
void smp_message_recv(unsigned int msg)
188+
{
189+
switch (msg) {
190+
case SMP_MSG_FUNCTION:
191+
generic_smp_call_function_interrupt();
192+
break;
193+
case SMP_MSG_RESCHEDULE:
194+
break;
195+
case SMP_MSG_FUNCTION_SINGLE:
196+
generic_smp_call_function_single_interrupt();
197+
break;
198+
default:
199+
printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n",
200+
smp_processor_id(), __func__, msg);
201+
break;
202+
}
203+
}
204+
187205
/* Not really SMP stuff ... */
188206
int setup_profiling_timer(unsigned int multiplier)
189207
{

0 commit comments

Comments
 (0)