]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - arch/x86/entry/entry_64.S
Apply preempt_rt patch-4.9-rt1.patch.xz
[zynq/linux.git] / arch / x86 / entry / entry_64.S
index ef766a358b37dd355e8d5d75c10a61d47a83e04f..28401f826ab12302c832dbe613af64e1e61f164d 100644 (file)
@@ -546,7 +546,23 @@ retint_kernel:
        bt      $9, EFLAGS(%rsp)                /* were interrupts off? */
        jnc     1f
 0:     cmpl    $0, PER_CPU_VAR(__preempt_count)
+#ifndef CONFIG_PREEMPT_LAZY
        jnz     1f
+#else
+       jz      do_preempt_schedule_irq
+
+       # atleast preempt count == 0 ?
+       cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count)
+       jnz     1f
+
+       movq    PER_CPU_VAR(current_task), %rcx
+       cmpl    $0, TASK_TI_preempt_lazy_count(%rcx)
+       jnz     1f
+
+       bt      $TIF_NEED_RESCHED_LAZY,TASK_TI_flags(%rcx)
+       jnc     1f
+do_preempt_schedule_irq:
+#endif
        call    preempt_schedule_irq
        jmp     0b
 1:
@@ -894,6 +910,7 @@ bad_gs:
        jmp     2b
        .previous
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 /* Call softirq on interrupt stack. Interrupts are off. */
 ENTRY(do_softirq_own_stack)
        pushq   %rbp
@@ -906,6 +923,7 @@ ENTRY(do_softirq_own_stack)
        decl    PER_CPU_VAR(irq_count)
        ret
 END(do_softirq_own_stack)
+#endif
 
 #ifdef CONFIG_XEN
 idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0