]> Pileus Git - ~andy/linux/blobdiff - arch/sparc/kernel/smp_32.c
sparc32: implement SMP IPIs using the generic functions
[~andy/linux] / arch / sparc / kernel / smp_32.c
index 4a1d5b7f20d35ce0dfcca469f15ae382d461d1e7..2710602281de1318c24ac4ca2c5be7247b259b3b 100644 (file)
@@ -123,13 +123,58 @@ struct linux_prom_registers smp_penguin_ctable __cpuinitdata = { 0 };
 
 void smp_send_reschedule(int cpu)
 {
-       /* See sparc64 */
+       /*
+        * CPU model dependent way of implementing IPI generation targeting
+        * a single CPU. The trap handler needs only to do trap entry/return
+        * to call schedule.
+        */
+       BTFIXUP_CALL(smp_ipi_resched)(cpu);
 }
 
 void smp_send_stop(void)
 {
 }
 
+void arch_send_call_function_single_ipi(int cpu)
+{
+       /* trigger one IPI single call on one CPU */
+       BTFIXUP_CALL(smp_ipi_single)(cpu);
+}
+
+void arch_send_call_function_ipi_mask(const struct cpumask *mask)
+{
+       int cpu;
+
+       /* trigger IPI mask call on each CPU */
+       for_each_cpu(cpu, mask)
+               BTFIXUP_CALL(smp_ipi_mask_one)(cpu);
+}
+
+void smp_resched_interrupt(void)
+{
+       local_cpu_data().irq_resched_count++;
+       /*
+        * do nothing, since it all was about calling re-schedule
+        * routine called by interrupt return code.
+        */
+}
+
+void smp_call_function_single_interrupt(void)
+{
+       irq_enter();
+       generic_smp_call_function_single_interrupt();
+       local_cpu_data().irq_call_count++;
+       irq_exit();
+}
+
+void smp_call_function_interrupt(void)
+{
+       irq_enter();
+       generic_smp_call_function_interrupt();
+       local_cpu_data().irq_call_count++;
+       irq_exit();
+}
+
 void smp_flush_cache_all(void)
 {
        xc0((smpfunc_t) BTFIXUP_CALL(local_flush_cache_all));