diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-03-08 16:41:22 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-03-08 16:41:22 +0100 |
commit | 4e3da46797f8e4d8217d2e3d6857444391b306da (patch) | |
tree | 4532f3bec8e45fbc69cc8389c4c7316d3eba7ae4 /kernel/sched/core.c | |
parent | 27b4b9319a3c2e8654d45df99ce584c7c2cfe100 (diff) | |
parent | 8b43876643a737bb74a0e1e557f634eb2453948b (diff) | |
download | linux-4e3da46797f8e4d8217d2e3d6857444391b306da.tar.bz2 |
Merge branch 'sched/cputime' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into sched/core
Pull cputime changes from Frederic Weisbecker:
* Generalize exception handling
* Fix race in context tracking state restore on return from exception
and irq exit kernel preemption
* Fix cputime scaling in full dynticks accounting dynamic off-case
* Fix default Kconfig value
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 42ecbcb73516..b36635e7404e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3082,11 +3082,13 @@ EXPORT_SYMBOL(preempt_schedule); asmlinkage void __sched preempt_schedule_irq(void) { struct thread_info *ti = current_thread_info(); + enum ctx_state prev_state; /* Catch callers which need to be fixed */ BUG_ON(ti->preempt_count || !irqs_disabled()); - user_exit(); + prev_state = exception_enter(); + do { add_preempt_count(PREEMPT_ACTIVE); local_irq_enable(); @@ -3100,6 +3102,8 @@ asmlinkage void __sched preempt_schedule_irq(void) */ barrier(); } while (need_resched()); + + exception_exit(prev_state); } #endif /* CONFIG_PREEMPT */ |