1 From 6de82414e10f5a7045655094f38e99b6f9dee7d2 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Tue, 24 May 2016 12:56:38 +0200
4 Subject: [PATCH 346/365] arm: lazy preempt: correct resched condition
6 If we get out of preempt_schedule_irq() then we check for NEED_RESCHED
7 and call the former function again if set because the preemption counter
8 has be zero at this point.
9 However the counter for lazy-preempt might not be zero therefore we have
10 to check the counter before looking at the need_resched_lazy flag.
12 Cc: stable-rt@vger.kernel.org
13 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
15 arch/arm/kernel/entry-armv.S | 6 +++++-
16 1 file changed, 5 insertions(+), 1 deletion(-)
18 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
19 index d66b1ae..d044cea 100644
20 --- a/arch/arm/kernel/entry-armv.S
21 +++ b/arch/arm/kernel/entry-armv.S
22 @@ -244,7 +244,11 @@ svc_preempt:
24 tst r0, #_TIF_NEED_RESCHED_LAZY
27 + ldr r0, [tsk, #TI_PREEMPT_LAZY] @ get preempt lazy count
28 + teq r0, #0 @ if preempt lazy count != 0