blob: deb29cfd62dc476f951c21d35ece3abdbe100309 [file] [log] [blame]
From f3700d14f0c52a68373695301cb5fd89252749b2 Mon Sep 17 00:00:00 2001
From: Priyanka Jain <Priyanka.Jain@freescale.com>
Date: Mon, 15 Apr 2013 11:18:16 +0530
Subject: [PATCH 5/5] 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.
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/powerpc/kernel/entry_64.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -643,6 +643,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+ check_count