.. | .. |
---|
750 | 750 | ENTRY(resume_kernel) |
---|
751 | 751 | DISABLE_INTERRUPTS(CLBR_ANY) |
---|
752 | 752 | .Lneed_resched: |
---|
| 753 | + # preempt count == 0 + NEED_RS set? |
---|
753 | 754 | cmpl $0, PER_CPU_VAR(__preempt_count) |
---|
| 755 | +#ifndef CONFIG_PREEMPT_LAZY |
---|
754 | 756 | jnz restore_all_kernel |
---|
| 757 | +#else |
---|
| 758 | + jz test_int_off |
---|
| 759 | + |
---|
| 760 | + # atleast preempt count == 0 ? |
---|
| 761 | + cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count) |
---|
| 762 | + jne restore_all_kernel |
---|
| 763 | + |
---|
| 764 | + movl PER_CPU_VAR(current_task), %ebp |
---|
| 765 | + cmpl $0,TASK_TI_preempt_lazy_count(%ebp) # non-zero preempt_lazy_count ? |
---|
| 766 | + jnz restore_all_kernel |
---|
| 767 | + |
---|
| 768 | + testl $_TIF_NEED_RESCHED_LAZY, TASK_TI_flags(%ebp) |
---|
| 769 | + jz restore_all_kernel |
---|
| 770 | +test_int_off: |
---|
| 771 | +#endif |
---|
755 | 772 | testl $X86_EFLAGS_IF, PT_EFLAGS(%esp) # interrupts off (exception path) ? |
---|
756 | 773 | jz restore_all_kernel |
---|
757 | 774 | call preempt_schedule_irq |
---|