aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJamie Iles <jamie.iles@picochip.com>2010-01-08 15:27:33 +0000
committerIngo Molnar <mingo@elte.hu>2010-01-13 10:43:08 +0100
commit8381f65d097dad90416808314737dd7d3ae38ea9 (patch)
tree7cd0db1b5b719a629962571fdc26fd69bdee573c /kernel
parentcf5531148ff34938840d6da775c0a4ace442d573 (diff)
downloadkernel_samsung_crespo-8381f65d097dad90416808314737dd7d3ae38ea9.zip
kernel_samsung_crespo-8381f65d097dad90416808314737dd7d3ae38ea9.tar.gz
kernel_samsung_crespo-8381f65d097dad90416808314737dd7d3ae38ea9.tar.bz2
sched/perf: Make sure irqs are disabled for perf_event_task_sched_in()
perf_event_task_sched_in() expects interrupts to be disabled, but on architectures with __ARCH_WANT_INTERRUPTS_ON_CTXSW defined, this isn't true. If this is defined, disable irqs around the call in finish_task_switch(). Signed-off-by: Jamie Iles <jamie.iles@picochip.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> LKML-Reference: <1262964453-27370-1-git-send-email-jamie.iles@picochip.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e507af0..c3ad342 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2783,7 +2783,13 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)
*/
prev_state = prev->state;
finish_arch_switch(prev);
+#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
+ local_irq_disable();
+#endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
perf_event_task_sched_in(current);
+#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
+ local_irq_enable();
+#endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
finish_lock_switch(rq, prev);
fire_sched_in_preempt_notifiers(current);