]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sparc32: Kill smp_message_pass() and related code.
authorDavid S. Miller <davem@davemloft.net>
Tue, 29 Apr 2008 08:14:10 +0000 (01:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Apr 2008 08:14:10 +0000 (01:14 -0700)
Completely unused, and it just makes the SMP message
passing code on 32-bit sparc look more complex than
it is.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
include/asm-sparc/smp.h

index 0def48158c7d165ca34688a51053205372e79cf4..dfde77ff084870810b3a8e94e40f089b796418be 100644 (file)
@@ -335,37 +335,6 @@ void smp4d_cross_call_irq(void)
        ccall_info.processors_out[i] = 1;
 }
 
-static int smp4d_stop_cpu_sender;
-
-static void smp4d_stop_cpu(void)
-{
-       int me = hard_smp4d_processor_id();
-       
-       if (me != smp4d_stop_cpu_sender)
-               while(1) barrier();
-}
-
-/* Cross calls, in order to work efficiently and atomically do all
- * the message passing work themselves, only stopcpu and reschedule
- * messages come through here.
- */
-void smp4d_message_pass(int target, int msg, unsigned long data, int wait)
-{
-       int me = hard_smp4d_processor_id();
-
-       SMP_PRINTK(("smp4d_message_pass %d %d %08lx %d\n", target, msg, data, wait));
-       if (msg == MSG_STOP_CPU && target == MSG_ALL_BUT_SELF) {
-               unsigned long flags;
-               static DEFINE_SPINLOCK(stop_cpu_lock);
-               spin_lock_irqsave(&stop_cpu_lock, flags);
-               smp4d_stop_cpu_sender = me;
-               smp4d_cross_call((smpfunc_t)smp4d_stop_cpu, 0, 0, 0, 0, 0);
-               spin_unlock_irqrestore(&stop_cpu_lock, flags);
-       }
-       printk("Yeeee, trying to send SMP msg(%d) to %d on cpu %d\n", msg, target, me);
-       panic("Bogon SMP message pass.");
-}
-
 void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
 {
        struct pt_regs *old_regs;
@@ -439,7 +408,6 @@ void __init sun4d_init_smp(void)
        BTFIXUPSET_BLACKBOX(hard_smp_processor_id, smp4d_blackbox_id);
        BTFIXUPSET_BLACKBOX(load_current, smp4d_blackbox_current);
        BTFIXUPSET_CALL(smp_cross_call, smp4d_cross_call, BTFIXUPCALL_NORM);
-       BTFIXUPSET_CALL(smp_message_pass, smp4d_message_pass, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(__hard_smp_processor_id, __smp4d_processor_id, BTFIXUPCALL_NORM);
        
        for (i = 0; i < NR_CPUS; i++) {
index 0b94072671623287c6c819fb4f405b18a0bb7038..ffb875aacb7e4ccb14b5e4c9f248f24eb48a5844 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "irq.h"
 
-#define IRQ_RESCHEDULE         13
-#define IRQ_STOP_CPU           14
 #define IRQ_CROSS_CALL         15
 
 extern ctxd_t *srmmu_ctx_table_phys;
@@ -232,48 +230,6 @@ void smp4m_irq_rotate(int cpu)
                set_irq_udt(next);
 }
 
-/* Cross calls, in order to work efficiently and atomically do all
- * the message passing work themselves, only stopcpu and reschedule
- * messages come through here.
- */
-void smp4m_message_pass(int target, int msg, unsigned long data, int wait)
-{
-       static unsigned long smp_cpu_in_msg[NR_CPUS];
-       cpumask_t mask;
-       int me = smp_processor_id();
-       int irq, i;
-
-       if(msg == MSG_RESCHEDULE) {
-               irq = IRQ_RESCHEDULE;
-
-               if(smp_cpu_in_msg[me])
-                       return;
-       } else if(msg == MSG_STOP_CPU) {
-               irq = IRQ_STOP_CPU;
-       } else {
-               goto barf;
-       }
-
-       smp_cpu_in_msg[me]++;
-       if(target == MSG_ALL_BUT_SELF || target == MSG_ALL) {
-               mask = cpu_online_map;
-               if(target == MSG_ALL_BUT_SELF)
-                       cpu_clear(me, mask);
-               for(i = 0; i < 4; i++) {
-                       if (cpu_isset(i, mask))
-                               set_cpu_int(i, irq);
-               }
-       } else {
-               set_cpu_int(target, irq);
-       }
-       smp_cpu_in_msg[me]--;
-
-       return;
-barf:
-       printk("Yeeee, trying to send SMP msg(%d) on cpu %d\n", msg, me);
-       panic("Bogon SMP message pass.");
-}
-
 static struct smp_funcall {
        smpfunc_t func;
        unsigned long arg1;
@@ -413,6 +369,5 @@ void __init sun4m_init_smp(void)
        BTFIXUPSET_BLACKBOX(hard_smp_processor_id, smp4m_blackbox_id);
        BTFIXUPSET_BLACKBOX(load_current, smp4m_blackbox_current);
        BTFIXUPSET_CALL(smp_cross_call, smp4m_cross_call, BTFIXUPCALL_NORM);
-       BTFIXUPSET_CALL(smp_message_pass, smp4m_message_pass, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(__hard_smp_processor_id, __smp4m_processor_id, BTFIXUPCALL_NORM);
 }
index b3f492208fd20168d2615a6bf51ae8a9101f63b3..e6d561599726a9223bb2026457de5a0b636acf5f 100644 (file)
@@ -51,13 +51,11 @@ void smp_bogo(struct seq_file *);
 void smp_info(struct seq_file *);
 
 BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
-BTFIXUPDEF_CALL(void, smp_message_pass, int, int, unsigned long, int)
 BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void)
 BTFIXUPDEF_BLACKBOX(hard_smp_processor_id)
 BTFIXUPDEF_BLACKBOX(load_current)
 
 #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5)
-#define smp_message_pass(target,msg,data,wait) BTFIXUP_CALL(smp_message_pass)(target,msg,data,wait)
 
 static inline void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); }
 static inline void xc1(smpfunc_t func, unsigned long arg1)