]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Remove cpu arg from cpu_raise_irq
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 2 Jul 2003 17:32:49 +0000 (10:32 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 2 Jul 2003 17:32:49 +0000 (10:32 -0700)
The function cpu_raise_softirq() takes a softirq number, and a cpu number,
but cannot be used with cpu != smp_processor_id(), because there's no
locking around the pending softirq lists.  Since noone does this, remove
that arg.

As per Linus' suggestion, names changed:
raise_softirq(int nr)
cpu_raise_softirq(int cpu, int nr) -> raise_softirq_irqoff(int nr)
__cpu_raise_softirq(int cpu, int nr) -> __raise_softirq_irqoff(int nr)

drivers/scsi/scsi.c
include/linux/interrupt.h
include/linux/netdevice.h
kernel/ksyms.c
kernel/softirq.c
net/core/dev.c

index af35f91fe3b2e756276df033d715c885eafffbe4..633c9a028e29af6d90808791340d791dd6c5e11f 100644 (file)
@@ -582,7 +582,7 @@ void scsi_done(struct scsi_cmnd *cmd)
        local_irq_save(flags);
        cpu = smp_processor_id();
        list_add_tail(&cmd->eh_entry, &done_q[cpu]);
-       cpu_raise_softirq(cpu, SCSI_SOFTIRQ);
+       raise_softirq_irqoff(SCSI_SOFTIRQ);
        local_irq_restore(flags);
 }
 
index da2eaeb181182be6a054a15bd6924b9b54037102..21e48723b3862be0ffcf71dfa70d8ea1356351db 100644 (file)
@@ -94,8 +94,8 @@ struct softirq_action
 asmlinkage void do_softirq(void);
 extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
 extern void softirq_init(void);
-#define __cpu_raise_softirq(cpu, nr) do { softirq_pending(cpu) |= 1UL << (nr); } while (0)
-extern void FASTCALL(cpu_raise_softirq(unsigned int cpu, unsigned int nr));
+#define __raise_softirq_irqoff(nr) do { local_softirq_pending() |= 1UL << (nr); } while (0)
+extern void FASTCALL(raise_softirq_irqoff(unsigned int nr));
 extern void FASTCALL(raise_softirq(unsigned int nr));
 
 #ifndef invoke_softirq
index d79375c33273bb2f326374da4a04501692c1917f..3aef822b449315cd20e30395292b179acee75059 100644 (file)
@@ -561,7 +561,7 @@ static inline void __netif_schedule(struct net_device *dev)
                cpu = smp_processor_id();
                dev->next_sched = softnet_data[cpu].output_queue;
                softnet_data[cpu].output_queue = dev;
-               cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);
+               raise_softirq_irqoff(NET_TX_SOFTIRQ);
                local_irq_restore(flags);
        }
 }
@@ -612,7 +612,7 @@ static inline void dev_kfree_skb_irq(struct sk_buff *skb)
                cpu = smp_processor_id();
                skb->next = softnet_data[cpu].completion_queue;
                softnet_data[cpu].completion_queue = skb;
-               cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);
+               raise_softirq_irqoff(NET_TX_SOFTIRQ);
                local_irq_restore(flags);
        }
 }
@@ -779,7 +779,7 @@ static inline void __netif_rx_schedule(struct net_device *dev)
                dev->quota += dev->weight;
        else
                dev->quota = dev->weight;
-       __cpu_raise_softirq(cpu, NET_RX_SOFTIRQ);
+       __raise_softirq_irqoff(NET_RX_SOFTIRQ);
        local_irq_restore(flags);
 }
 
@@ -805,7 +805,7 @@ static inline int netif_rx_reschedule(struct net_device *dev, int undo)
                local_irq_save(flags);
                cpu = smp_processor_id();
                list_add_tail(&dev->poll_list, &softnet_data[cpu].poll_list);
-               __cpu_raise_softirq(cpu, NET_RX_SOFTIRQ);
+               __raise_softirq_irqoff(NET_RX_SOFTIRQ);
                local_irq_restore(flags);
                return 1;
        }
index 816627adc50adaf53e957b946fcf58d37977179d..66ea4b6b4d84c04907a95a3ea53daa4de3541f7d 100644 (file)
@@ -587,7 +587,7 @@ EXPORT_SYMBOL(tasklet_kill);
 EXPORT_SYMBOL(do_softirq);
 EXPORT_SYMBOL(raise_softirq);
 EXPORT_SYMBOL(open_softirq);
-EXPORT_SYMBOL(cpu_raise_softirq);
+EXPORT_SYMBOL(raise_softirq_irqoff);
 EXPORT_SYMBOL(__tasklet_schedule);
 EXPORT_SYMBOL(__tasklet_hi_schedule);
 
index 20bf233a14c342cda98eb5700be7ea011e81582d..e581740a6e26d73eb429028555e338931f63d4d0 100644 (file)
@@ -117,9 +117,9 @@ EXPORT_SYMBOL(local_bh_enable);
 /*
  * This function must run with irqs disabled!
  */
-inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr)
+inline void raise_softirq_irqoff(unsigned int nr)
 {
-       __cpu_raise_softirq(cpu, nr);
+       __raise_softirq_irqoff(nr);
 
        /*
         * If we're in an interrupt or softirq, we're done
@@ -139,7 +139,7 @@ void raise_softirq(unsigned int nr)
        unsigned long flags;
 
        local_irq_save(flags);
-       cpu_raise_softirq(smp_processor_id(), nr);
+       raise_softirq_irqoff(nr);
        local_irq_restore(flags);
 }
 
@@ -168,7 +168,7 @@ void __tasklet_schedule(struct tasklet_struct *t)
        local_irq_save(flags);
        t->next = __get_cpu_var(tasklet_vec).list;
        __get_cpu_var(tasklet_vec).list = t;
-       cpu_raise_softirq(smp_processor_id(), TASKLET_SOFTIRQ);
+       raise_softirq_irqoff(TASKLET_SOFTIRQ);
        local_irq_restore(flags);
 }
 
@@ -179,7 +179,7 @@ void __tasklet_hi_schedule(struct tasklet_struct *t)
        local_irq_save(flags);
        t->next = __get_cpu_var(tasklet_hi_vec).list;
        __get_cpu_var(tasklet_hi_vec).list = t;
-       cpu_raise_softirq(smp_processor_id(), HI_SOFTIRQ);
+       raise_softirq_irqoff(HI_SOFTIRQ);
        local_irq_restore(flags);
 }
 
@@ -211,7 +211,7 @@ static void tasklet_action(struct softirq_action *a)
                local_irq_disable();
                t->next = __get_cpu_var(tasklet_vec).list;
                __get_cpu_var(tasklet_vec).list = t;
-               __cpu_raise_softirq(smp_processor_id(), TASKLET_SOFTIRQ);
+               __raise_softirq_irqoff(TASKLET_SOFTIRQ);
                local_irq_enable();
        }
 }
@@ -244,7 +244,7 @@ static void tasklet_hi_action(struct softirq_action *a)
                local_irq_disable();
                t->next = __get_cpu_var(tasklet_hi_vec).list;
                __get_cpu_var(tasklet_hi_vec).list = t;
-               __cpu_raise_softirq(smp_processor_id(), HI_SOFTIRQ);
+               __raise_softirq_irqoff(HI_SOFTIRQ);
                local_irq_enable();
        }
 }
index 5102b235b57cab2d62653b968bf7d2f3b232f68e..0605391589ad50ee505b905f4e2abeb7217b9e81 100644 (file)
@@ -1712,7 +1712,7 @@ out:
 
 softnet_break:
        netdev_rx_stat[this_cpu].time_squeeze++;
-       __cpu_raise_softirq(this_cpu, NET_RX_SOFTIRQ);
+       __raise_softirq_irqoff(NET_RX_SOFTIRQ);
        goto out;
 }