summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-08-06 11:02:48 +0200
committerPaul Mundt <lethal@linux-sh.org>2008-09-08 03:35:02 +0200
commit173a44dd1f406e9aa6fcf46c83b7c972d10ec930 (patch)
tree61784c58c8e566f3717914761aeff5d8cc7c75be /arch/sh
parentsh: Kill off unused defines from asm/smp.h. (diff)
downloadlinux-173a44dd1f406e9aa6fcf46c83b7c972d10ec930.tar.xz
linux-173a44dd1f406e9aa6fcf46c83b7c972d10ec930.zip
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>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/asm/smp.h1
-rw-r--r--arch/sh/kernel/smp.c20
2 files changed, 20 insertions, 1 deletions
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h
index e2b79e6864e7..1292c6d3c53e 100644
--- a/arch/sh/include/asm/smp.h
+++ b/arch/sh/include/asm/smp.h
@@ -26,6 +26,7 @@ extern int __cpu_logical_map[NR_CPUS];
#define SMP_MSG_FUNCTION_SINGLE 2
#define SMP_MSG_NR 3
+void smp_message_recv(unsigned int msg);
void plat_smp_setup(void);
void plat_prepare_cpus(unsigned int max_cpus);
int plat_smp_processor_id(void);
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 60c50841143e..ebfdd364544f 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -3,7 +3,7 @@
*
* SMP support for the SuperH processors.
*
- * Copyright (C) 2002 - 2007 Paul Mundt
+ * Copyright (C) 2002 - 2008 Paul Mundt
* Copyright (C) 2006 - 2007 Akio Idehara
*
* 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)
plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE);
}
+void smp_message_recv(unsigned int msg)
+{
+ switch (msg) {
+ case SMP_MSG_FUNCTION:
+ generic_smp_call_function_interrupt();
+ break;
+ case SMP_MSG_RESCHEDULE:
+ break;
+ case SMP_MSG_FUNCTION_SINGLE:
+ generic_smp_call_function_single_interrupt();
+ break;
+ default:
+ printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n",
+ smp_processor_id(), __func__, msg);
+ break;
+ }
+}
+
/* Not really SMP stuff ... */
int setup_profiling_timer(unsigned int multiplier)
{