Remove softirq_pending cpu arg.
Subsystems (3)
PATCH 4/4 Remove softirq_pending cpu arg.
Every user of softirq_pending(cpu) could be using local_softirq_pending, since it only really makes sense to ask about your own softirq state (and that's what every user does). This also makes the future per-cpu-ification of the irq_cpustat_t more efficient.
Name: Remove softirq_pending.
Author: Rusty Russell
Status: Tested on 2.5.74
Depends: Percpu/softirq_local.patch.gz
D: Every user of softirq_pending(cpu) could be using
D: local_softirq_pending, since it only really makes sense to ask
D: about your own softirq state (and that's what every user does).
D: This also makes the future per-cpu-ification of the irq_cpustat_t
D: more efficient.
arch/cris/kernel/irq.c +1 -1
@@ -284,7 +284,7 @@ asmlinkage void do_IRQ(int irq, struct p }irq_exit (cpu); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq ();/* unmasking and bottom half handling is done magically for us. */
arch/mips/au1000/common/time.c +1 -1
@@ -102,7 +102,7 @@ void mips_timer_interrupt(struct pt_regsirq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq ();return ;
arch/mips/kernel/time.c +2 -2
@@ -441,7 +441,7 @@ asmlinkage void ll_timer_interrupt(int iirq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
@@ -457,7 +457,7 @@ asmlinkage void ll_local_timer_interruptirq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
arch/mips/mips-boards/sead/sead_time.c +1 -1
@@ -84,7 +84,7 @@ void mips_timer_interrupt(struct pt_regs - r4k_cur) < 0x7fffffff);irq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
arch/mips/sgi-ip22/ip22-time.c +1 -1
@@ -193,7 +193,7 @@ void indy_r4k_timer_interrupt(struct pt_timer_interrupt (irq,NULL , regs);irq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
arch/mips/sgi-ip27/ip27-timer.c +1 -1
@@ -136,7 +136,7 @@ again:write_sequnlock (&xtime_lock);irq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
arch/mips64/kernel/time.c +2 -2
@@ -441,7 +441,7 @@ asmlinkage void ll_timer_interrupt(int iirq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
@@ -457,7 +457,7 @@ asmlinkage void ll_local_timer_interruptirq_exit (); -if (softirq_pending (cpu)) +if (local_softirq_pending ())do_softirq (); }
include/asm-alpha/hardirq.h +1 -1
@@ -90,7 +90,7 @@ typedef struct {do { \preempt_count () -=IRQ_EXIT_OFFSET ; \if (!in_interrupt () && \ -softirq_pending (smp_processor_id ())) \ +local_softirq_pending ()) \do_softirq (); \preempt_enable_no_resched (); \ }while (0 )
include/asm-arm/hardirq.h +1 -1
@@ -83,7 +83,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ __asm__("bl __do_softirq": : : "lr", "cc");/* out of line */ \preempt_enable_no_resched (); \ }while (0 )
include/asm-arm/mach/irq.h +1 -1
@@ -104,7 +104,7 @@ static inline void call_irq(struct pt_re desc->handle (irq, desc, regs);spin_unlock (&irq_controller_lock); -if (softirq_pending (smp_processor_id ())) + if (local_softirq_pending() do_softirq(); }#endif
include/asm-arm26/hardirq.h +1 -1
@@ -80,7 +80,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= HARDIRQ_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ __asm__("bl%? __do_softirq": : : "lr");/* out of line */ \preempt_enable_no_resched (); \ }while (0 )
include/asm-arm26/irqchip.h +1 -1
@@ -97,7 +97,7 @@ static inline void call_irq(struct pt_re desc->handle (irq, desc, regs);spin_unlock (&irq_controller_lock); -if (softirq_pending (smp_processor_id ())) +if (local_softirq_pending ()) do_softirq(); }#endif
include/asm-arm26/softirq.h +1 -1
@@ -12,7 +12,7 @@#define local_bh_enable () \ do { \ __local_bh_enable(); \ - if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \ + if (unlikely(!in_interrupt() && local_softirq_pending()) \ __asm__("bl%? __do_softirq": : : "lr");/* out of line */ \preempt_check_resched (); \ }while (0 )
include/asm-h8300/hardirq.h +1 -1
@@ -91,7 +91,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-h8300/softirq.h +1 -1
@@ -12,7 +12,7 @@#define local_bh_enable () \ do { \ __local_bh_enable(); \ - if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \ + if (unlikely(!in_interrupt() && local_softirq_pending())) \ do_softirq(); \ preempt_check_resched(); \ } while (0)
include/asm-i386/hardirq.h +1 -1
@@ -86,7 +86,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-ia64/hardirq.h +0 -1
@@ -19,7 +19,6 @@#define __ARCH_IRQ_STAT 1 -#define softirq_pending (cpu) (cpu_data(cpu)->softirq_pending)#define syscall_count (cpu)/* unused on IA-64 */ #define ksoftirqd_task (cpu) (cpu_data(cpu)->ksoftirqd)#define nmi_count (cpu) 0
include/asm-m68k/hardirq.h +1 -1
@@ -83,7 +83,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-m68knommu/hardirq.h +1 -1
@@ -89,7 +89,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-mips/hardirq.h +1 -1
@@ -91,7 +91,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-mips/softirq.h +1 -1
@@ -12,7 +12,7 @@#define local_bh_enable () \ do { \ __local_bh_enable(); \ - if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \ + if (unlikely(!in_interrupt() && local_softirq_pending())) \ do_softirq(); \ preempt_check_resched(); \ } while (0)
include/asm-mips64/hardirq.h +1 -1
@@ -91,7 +91,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-mips64/softirq.h +1 -1
@@ -12,7 +12,7 @@#define local_bh_enable () \ do { \ __local_bh_enable(); \ - if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \ + if (unlikely(!in_interrupt() && local_softirq_pending())) \ do_softirq(); \ preempt_check_resched(); \ } while (0)
include/asm-parisc/hardirq.h +1 -1
@@ -99,7 +99,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending())) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-ppc/hardirq.h +1 -1
@@ -93,7 +93,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-ppc64/hardirq.h +1 -1
@@ -92,7 +92,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-s390/hardirq.h +1 -1
@@ -93,7 +93,7 @@ extern void do_call_softirq(void);#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \/* Use the async. stack for softirq */ \do_call_softirq (); \preempt_enable_no_resched (); \
include/asm-sparc/hardirq.h +1 -1
@@ -99,7 +99,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-sparc64/hardirq.h +1 -1
@@ -94,7 +94,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-v850/hardirq.h +1 -1
@@ -83,7 +83,7 @@ typedef struct {#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/asm-x86_64/hardirq.h +1 -1
@@ -87,7 +87,7 @@#define irq_exit () \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ - if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + if (!in_interrupt() && local_softirq_pending()) \ do_softirq(); \ preempt_enable_no_resched(); \ } while (0)
include/linux/irq_cpustat.h +1 -2
@@ -18,7 +19,6 @@#endif /* arch independent irq_stat fields */ -#define softirq_pending (cpu) __IRQ_STAT((cpu), __softirq_pending) -#define local_softirq_pending () softirq_pending(smp_processor_id()) +#define local_softirq_pending () __IRQ_STAT(smp_processor_id(), __softirq_pending)/* arch dependent irq_stat fields */
include/linux/netdevice.h +1 -1
@@ -648,7 +648,7 @@ extern int netdev_nit;static inline int netif_rx_ni (struct sk_buff *skb) {int err =netif_rx (skb); -if (softirq_pending (smp_processor_id ())) +if (local_softirq_pending ())do_softirq ();return err; }
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.