diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-11-06 10:50:37 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-11-06 10:50:37 +0400 |
commit | c90423d1de12fbeaf0c898e1db0e962de347302b (patch) | |
tree | 8c7a32b37e74155324ae2b556fcc42718ccf29a3 /arch/x86/kernel/process_64.c | |
parent | ecf1f014325ba60f4df35edae1a357c67c5d4eb1 (diff) | |
parent | b8a216269ec0ce2e961d32e6d640d7010b8a818e (diff) | |
download | linux-c90423d1de12fbeaf0c898e1db0e962de347302b.tar.xz |
Merge branch 'sched/core' into core/locking, to prepare the kernel/locking/ file move
Conflicts:
kernel/Makefile
There are conflicts in kernel/Makefile due to file moving in the
scheduler tree - resolve them.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r-- | arch/x86/kernel/process_64.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index bb1dc51bab05..45ab4d6fc8a7 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -363,6 +363,14 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) this_cpu_write(old_rsp, next->usersp); this_cpu_write(current_task, next_p); + /* + * If it were not for PREEMPT_ACTIVE we could guarantee that the + * preempt_count of all tasks was equal here and this would not be + * needed. + */ + task_thread_info(prev_p)->saved_preempt_count = this_cpu_read(__preempt_count); + this_cpu_write(__preempt_count, task_thread_info(next_p)->saved_preempt_count); + this_cpu_write(kernel_stack, (unsigned long)task_stack_page(next_p) + THREAD_SIZE - KERNEL_STACK_OFFSET); |