aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriyanka Jain <Priyanka.Jain@freescale.com>2013-04-15 11:18:16 +0530
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-07-09 22:15:02 -0400
commitabf3e65454bb65874ada701dc80c62e2ce6a1d29 (patch)
treed0f7bf3b16a34dead37b9e2c99435dde1f4bacb8
parent6532380bfb8f9f5b54daeea726cc6f2a448c94df (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.S2
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