diff options
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 68eb5efec388..56e5dec837f0 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -54,7 +54,7 @@ EXPORT_SYMBOL(irq_stat); | |||
54 | 54 | ||
55 | static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp; | 55 | static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp; |
56 | 56 | ||
57 | static DEFINE_PER_CPU(struct task_struct *, ksoftirqd); | 57 | DEFINE_PER_CPU(struct task_struct *, ksoftirqd); |
58 | 58 | ||
59 | char *softirq_to_name[NR_SOFTIRQS] = { | 59 | char *softirq_to_name[NR_SOFTIRQS] = { |
60 | "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", | 60 | "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", |
@@ -311,9 +311,21 @@ void irq_enter(void) | |||
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED | 313 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED |
314 | # define invoke_softirq() __do_softirq() | 314 | static inline void invoke_softirq(void) |
315 | { | ||
316 | if (!force_irqthreads) | ||
317 | __do_softirq(); | ||
318 | else | ||
319 | wakeup_softirqd(); | ||
320 | } | ||
315 | #else | 321 | #else |
316 | # define invoke_softirq() do_softirq() | 322 | static inline void invoke_softirq(void) |
323 | { | ||
324 | if (!force_irqthreads) | ||
325 | do_softirq(); | ||
326 | else | ||
327 | wakeup_softirqd(); | ||
328 | } | ||
317 | #endif | 329 | #endif |
318 | 330 | ||
319 | /* | 331 | /* |
@@ -721,7 +733,6 @@ static int run_ksoftirqd(void * __bind_cpu) | |||
721 | { | 733 | { |
722 | set_current_state(TASK_INTERRUPTIBLE); | 734 | set_current_state(TASK_INTERRUPTIBLE); |
723 | 735 | ||
724 | current->flags |= PF_KSOFTIRQD; | ||
725 | while (!kthread_should_stop()) { | 736 | while (!kthread_should_stop()) { |
726 | preempt_disable(); | 737 | preempt_disable(); |
727 | if (!local_softirq_pending()) { | 738 | if (!local_softirq_pending()) { |
@@ -738,7 +749,10 @@ static int run_ksoftirqd(void * __bind_cpu) | |||
738 | don't process */ | 749 | don't process */ |
739 | if (cpu_is_offline((long)__bind_cpu)) | 750 | if (cpu_is_offline((long)__bind_cpu)) |
740 | goto wait_to_die; | 751 | goto wait_to_die; |
741 | do_softirq(); | 752 | local_irq_disable(); |
753 | if (local_softirq_pending()) | ||
754 | __do_softirq(); | ||
755 | local_irq_enable(); | ||
742 | preempt_enable_no_resched(); | 756 | preempt_enable_no_resched(); |
743 | cond_resched(); | 757 | cond_resched(); |
744 | preempt_disable(); | 758 | preempt_disable(); |