diff options
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 5ace266bc0e6..671f9594e368 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -310,31 +310,21 @@ void irq_enter(void) | |||
310 | __irq_enter(); | 310 | __irq_enter(); |
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED | ||
314 | static inline void invoke_softirq(void) | 313 | static inline void invoke_softirq(void) |
315 | { | 314 | { |
316 | if (!force_irqthreads) | 315 | if (!force_irqthreads) { |
316 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED | ||
317 | __do_softirq(); | 317 | __do_softirq(); |
318 | else { | ||
319 | __local_bh_disable((unsigned long)__builtin_return_address(0), | ||
320 | SOFTIRQ_OFFSET); | ||
321 | wakeup_softirqd(); | ||
322 | __local_bh_enable(SOFTIRQ_OFFSET); | ||
323 | } | ||
324 | } | ||
325 | #else | 318 | #else |
326 | static inline void invoke_softirq(void) | ||
327 | { | ||
328 | if (!force_irqthreads) | ||
329 | do_softirq(); | 319 | do_softirq(); |
330 | else { | 320 | #endif |
321 | } else { | ||
331 | __local_bh_disable((unsigned long)__builtin_return_address(0), | 322 | __local_bh_disable((unsigned long)__builtin_return_address(0), |
332 | SOFTIRQ_OFFSET); | 323 | SOFTIRQ_OFFSET); |
333 | wakeup_softirqd(); | 324 | wakeup_softirqd(); |
334 | __local_bh_enable(SOFTIRQ_OFFSET); | 325 | __local_bh_enable(SOFTIRQ_OFFSET); |
335 | } | 326 | } |
336 | } | 327 | } |
337 | #endif | ||
338 | 328 | ||
339 | /* | 329 | /* |
340 | * Exit an interrupt context. Process softirqs if needed and possible: | 330 | * Exit an interrupt context. Process softirqs if needed and possible: |
@@ -353,7 +343,7 @@ void irq_exit(void) | |||
353 | tick_nohz_irq_exit(); | 343 | tick_nohz_irq_exit(); |
354 | #endif | 344 | #endif |
355 | rcu_irq_exit(); | 345 | rcu_irq_exit(); |
356 | preempt_enable_no_resched(); | 346 | sched_preempt_enable_no_resched(); |
357 | } | 347 | } |
358 | 348 | ||
359 | /* | 349 | /* |
@@ -385,6 +375,12 @@ void raise_softirq(unsigned int nr) | |||
385 | local_irq_restore(flags); | 375 | local_irq_restore(flags); |
386 | } | 376 | } |
387 | 377 | ||
378 | void __raise_softirq_irqoff(unsigned int nr) | ||
379 | { | ||
380 | trace_softirq_raise(nr); | ||
381 | or_softirq_pending(1UL << nr); | ||
382 | } | ||
383 | |||
388 | void open_softirq(int nr, void (*action)(struct softirq_action *)) | 384 | void open_softirq(int nr, void (*action)(struct softirq_action *)) |
389 | { | 385 | { |
390 | softirq_vec[nr].action = action; | 386 | softirq_vec[nr].action = action; |
@@ -744,9 +740,7 @@ static int run_ksoftirqd(void * __bind_cpu) | |||
744 | while (!kthread_should_stop()) { | 740 | while (!kthread_should_stop()) { |
745 | preempt_disable(); | 741 | preempt_disable(); |
746 | if (!local_softirq_pending()) { | 742 | if (!local_softirq_pending()) { |
747 | preempt_enable_no_resched(); | 743 | schedule_preempt_disabled(); |
748 | schedule(); | ||
749 | preempt_disable(); | ||
750 | } | 744 | } |
751 | 745 | ||
752 | __set_current_state(TASK_RUNNING); | 746 | __set_current_state(TASK_RUNNING); |
@@ -761,7 +755,7 @@ static int run_ksoftirqd(void * __bind_cpu) | |||
761 | if (local_softirq_pending()) | 755 | if (local_softirq_pending()) |
762 | __do_softirq(); | 756 | __do_softirq(); |
763 | local_irq_enable(); | 757 | local_irq_enable(); |
764 | preempt_enable_no_resched(); | 758 | sched_preempt_enable_no_resched(); |
765 | cond_resched(); | 759 | cond_resched(); |
766 | preempt_disable(); | 760 | preempt_disable(); |
767 | rcu_note_context_switch((long)__bind_cpu); | 761 | rcu_note_context_switch((long)__bind_cpu); |