diff options
author | Priyanka Jain <Priyanka.Jain@freescale.com> | 2013-04-15 11:18:16 +0530 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-05-02 14:32:22 -0400 |
commit | f0fca720893ef22bde965423503e40c7635de9d0 (patch) | |
tree | 76e49de3da7175802c4b2257c2f7dc4b05217272 | |
parent | a344f0da194cc7a5fd7f4a94f3e72ad367f34e80 (diff) |
powerpc/64bit,PREEMPT_RT: Check preempt_count before preempting
In ret_from_except_lite() with CONFIG_PREEMPT enabled,
add the missing check to compare value of preempt_count
with zero before continuing with preemption process of
the current task.
If preempt_count is non-zero, restore reg and return,
else continue the preemption process.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index a9b98cc11dc8..7af1ea79c586 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -596,6 +596,8 @@ resume_kernel: #ifdef CONFIG_PREEMPT /* Check if we need to preempt */ lwz r8,TI_PREEMPT(r9) + cmpwi 0,r8,0 /* if non-zero, just restore regs and return */ + bne restore andi. r0,r4,_TIF_NEED_RESCHED bne+ 1f |