/* arch independent irq_stat fields */
#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
+#define local_softirq_pending() softirq_pending(smp_processor_id())
#define syscall_count(cpu) __IRQ_STAT((cpu), __syscall_count)
#define ksoftirqd_task(cpu) __IRQ_STAT((cpu), __ksoftirqd_task)
/* arch dependent irq_stat fields */
__u32 pending;
unsigned long flags;
__u32 mask;
- int cpu;
if (in_interrupt())
return;
local_irq_save(flags);
- cpu = smp_processor_id();
- pending = softirq_pending(cpu);
+ pending = local_softirq_pending();
if (pending) {
struct softirq_action *h;
local_bh_disable();
restart:
/* Reset the pending bitmask before enabling irqs */
- softirq_pending(cpu) = 0;
+ local_softirq_pending() = 0;
local_irq_enable();
local_irq_disable();
- pending = softirq_pending(cpu);
+ pending = local_softirq_pending();
if (pending & mask) {
mask &= ~pending;
goto restart;
}
if (pending)
- wakeup_softirqd(cpu);
+ wakeup_softirqd(smp_processor_id());
__local_bh_enable();
}
__local_bh_enable();
BUG_ON(irqs_disabled());
if (unlikely(!in_interrupt() &&
- softirq_pending(smp_processor_id())))
+ local_softirq_pending()))
do_softirq();
preempt_check_resched();
}
ksoftirqd_task(cpu) = current;
for (;;) {
- if (!softirq_pending(cpu))
+ if (!local_softirq_pending())
schedule();
__set_current_state(TASK_RUNNING);
- while (softirq_pending(cpu)) {
+ while (local_softirq_pending()) {
do_softirq();
cond_resched();
}