diff options
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index f8749e5216e0..7c1a67ef0274 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -302,9 +302,9 @@ void irq_exit(void) | |||
302 | if (!in_interrupt() && local_softirq_pending()) | 302 | if (!in_interrupt() && local_softirq_pending()) |
303 | invoke_softirq(); | 303 | invoke_softirq(); |
304 | 304 | ||
305 | rcu_irq_exit(); | ||
305 | #ifdef CONFIG_NO_HZ | 306 | #ifdef CONFIG_NO_HZ |
306 | /* Make sure that timer wheel updates are propagated */ | 307 | /* Make sure that timer wheel updates are propagated */ |
307 | rcu_irq_exit(); | ||
308 | if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched()) | 308 | if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched()) |
309 | tick_nohz_stop_sched_tick(0); | 309 | tick_nohz_stop_sched_tick(0); |
310 | #endif | 310 | #endif |
@@ -500,22 +500,17 @@ EXPORT_SYMBOL(tasklet_kill); | |||
500 | */ | 500 | */ |
501 | 501 | ||
502 | /* | 502 | /* |
503 | * The trampoline is called when the hrtimer expires. If this is | 503 | * The trampoline is called when the hrtimer expires. It schedules a tasklet |
504 | * called from the hrtimer interrupt then we schedule the tasklet as | 504 | * to run __tasklet_hrtimer_trampoline() which in turn will call the intended |
505 | * the timer callback function expects to run in softirq context. If | 505 | * hrtimer callback, but from softirq context. |
506 | * it's called in softirq context anyway (i.e. high resolution timers | ||
507 | * disabled) then the hrtimer callback is called right away. | ||
508 | */ | 506 | */ |
509 | static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer) | 507 | static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer) |
510 | { | 508 | { |
511 | struct tasklet_hrtimer *ttimer = | 509 | struct tasklet_hrtimer *ttimer = |
512 | container_of(timer, struct tasklet_hrtimer, timer); | 510 | container_of(timer, struct tasklet_hrtimer, timer); |
513 | 511 | ||
514 | if (hrtimer_is_hres_active(timer)) { | 512 | tasklet_hi_schedule(&ttimer->tasklet); |
515 | tasklet_hi_schedule(&ttimer->tasklet); | 513 | return HRTIMER_NORESTART; |
516 | return HRTIMER_NORESTART; | ||
517 | } | ||
518 | return ttimer->function(timer); | ||
519 | } | 514 | } |
520 | 515 | ||
521 | /* | 516 | /* |
@@ -697,7 +692,7 @@ void __init softirq_init(void) | |||
697 | open_softirq(HI_SOFTIRQ, tasklet_hi_action); | 692 | open_softirq(HI_SOFTIRQ, tasklet_hi_action); |
698 | } | 693 | } |
699 | 694 | ||
700 | static int ksoftirqd(void * __bind_cpu) | 695 | static int run_ksoftirqd(void * __bind_cpu) |
701 | { | 696 | { |
702 | set_current_state(TASK_INTERRUPTIBLE); | 697 | set_current_state(TASK_INTERRUPTIBLE); |
703 | 698 | ||
@@ -810,7 +805,7 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, | |||
810 | switch (action) { | 805 | switch (action) { |
811 | case CPU_UP_PREPARE: | 806 | case CPU_UP_PREPARE: |
812 | case CPU_UP_PREPARE_FROZEN: | 807 | case CPU_UP_PREPARE_FROZEN: |
813 | p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu); | 808 | p = kthread_create(run_ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu); |
814 | if (IS_ERR(p)) { | 809 | if (IS_ERR(p)) { |
815 | printk("ksoftirqd for %i failed\n", hotcpu); | 810 | printk("ksoftirqd for %i failed\n", hotcpu); |
816 | return NOTIFY_BAD; | 811 | return NOTIFY_BAD; |