]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0346-arm-lazy-preempt-correct-resched-condition.patch
WAR:media:i2c:ov5693: add flip and mirror setting
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0346-arm-lazy-preempt-correct-resched-condition.patch
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
5
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.
11
12 Cc: stable-rt@vger.kernel.org
13 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
14 ---
15  arch/arm/kernel/entry-armv.S | 6 +++++-
16  1 file changed, 5 insertions(+), 1 deletion(-)
17
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:
23         bne     1b
24         tst     r0, #_TIF_NEED_RESCHED_LAZY
25         reteq   r8                              @ go again
26 -       b       1b
27 +       ldr     r0, [tsk, #TI_PREEMPT_LAZY]     @ get preempt lazy count
28 +       teq     r0, #0                          @ if preempt lazy count != 0
29 +       beq     1b
30 +       ret     r8                              @ go again
31 +
32  #endif
33  
34  __und_fault:
35 -- 
36 2.7.4
37