From: Paul E. McKenney Date: Fri, 11 Nov 2011 00:02:52 +0000 (-0800) Subject: events: Make events use the new is_idle_task() API X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=77aeeebd7b5483582d0eb6e3fd2894771d1fd8e5;p=openwrt%2Fstaging%2Fblogic.git events: Make events use the new is_idle_task() API Change from direct comparison of ->pid with zero to is_idle_task(). Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Reviewed-by: Josh Triplett --- diff --git a/kernel/events/core.c b/kernel/events/core.c index d3b9df5962c2..923c6b5667db 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5362,7 +5362,7 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer) regs = get_irq_regs(); if (regs && !perf_exclude_event(event, regs)) { - if (!(event->attr.exclude_idle && current->pid == 0)) + if (!(event->attr.exclude_idle && is_idle_task(current))) if (perf_event_overflow(event, &data, regs)) ret = HRTIMER_NORESTART; }