]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/smp.c
sh: smp: Hook up a timer IPI stub.
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / smp.c
index 60c50841143e26103b02a41c04d7ff863055663e..9cb3734dbd49d3f24aeba3e09b5f7c87afb68f5f 100644 (file)
@@ -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,42 @@ void arch_send_call_function_single_ipi(int cpu)
        plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE);
 }
 
+void smp_timer_broadcast(cpumask_t mask)
+{
+       int cpu;
+
+       for_each_cpu_mask(cpu, mask)
+               plat_send_ipi(cpu, SMP_MSG_TIMER);
+}
+
+static void ipi_timer(void)
+{
+       irq_enter();
+       /* XXX ... */
+       irq_exit();
+}
+
+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;
+       case SMP_MSG_TIMER:
+               ipi_timer();
+               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)
 {