Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer, softirq: Fix hrtimer->softirq trampoline
This commit is contained in:
Linus Torvalds 2010-02-15 19:52:12 -08:00
commit 7d0bab9dfe
1 changed files with 5 additions and 10 deletions

View File

@ -500,22 +500,17 @@ EXPORT_SYMBOL(tasklet_kill);
*/ */
/* /*
* The trampoline is called when the hrtimer expires. If this is * The trampoline is called when the hrtimer expires. It schedules a tasklet
* called from the hrtimer interrupt then we schedule the tasklet as * to run __tasklet_hrtimer_trampoline() which in turn will call the intended
* the timer callback function expects to run in softirq context. If * hrtimer callback, but from softirq context.
* it's called in softirq context anyway (i.e. high resolution timers
* disabled) then the hrtimer callback is called right away.
*/ */
static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer) static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer)
{ {
struct tasklet_hrtimer *ttimer = struct tasklet_hrtimer *ttimer =
container_of(timer, struct tasklet_hrtimer, timer); container_of(timer, struct tasklet_hrtimer, timer);
if (hrtimer_is_hres_active(timer)) { tasklet_hi_schedule(&ttimer->tasklet);
tasklet_hi_schedule(&ttimer->tasklet); return HRTIMER_NORESTART;
return HRTIMER_NORESTART;
}
return ttimer->function(timer);
} }
/* /*