blob: 4d8ae3aabd9be669c21875e3003457d666496771 [file] [log] [blame]
From f885634adab8347527f902b8b54abc17cb9991d7 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:30:06 -0500
Subject: [PATCH] x86: preempt-rt scheduling support (32bit)
commit 94b3cbf2548a023b4187e252043eac367f84740c in tip.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 44a8e0d..57d3849 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -375,13 +375,13 @@ END(ret_from_exception)
ENTRY(resume_kernel)
DISABLE_INTERRUPTS(CLBR_ANY)
cmpl $0,TI_preempt_count(%ebp) # non-zero preempt_count ?
- jnz restore_all
+ jnz restore_nocheck
need_resched:
movl TI_flags(%ebp), %ecx # need_resched set ?
testb $_TIF_NEED_RESCHED, %cl
- jz restore_all
+ jz restore_nocheck
testl $X86_EFLAGS_IF,PT_EFLAGS(%esp) # interrupts off (exception path) ?
- jz restore_all
+ jz restore_nocheck
call preempt_schedule_irq
jmp need_resched
END(resume_kernel)
@@ -639,12 +639,9 @@ work_pending:
testb $_TIF_NEED_RESCHED, %cl
jz work_notifysig
work_resched:
- call schedule
+ call __schedule
LOCKDEP_SYS_EXIT
- DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt
- # setting need_resched or sigpending
- # between sampling and the iret
- TRACE_IRQS_OFF
+
movl TI_flags(%ebp), %ecx
andl $_TIF_WORK_MASK, %ecx # is there any work to be done other
# than syscall tracing?
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 489cb0e..46f5881 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -112,10 +112,12 @@ void cpu_idle(void)
pm_idle();
start_critical_timings();
}
+ local_irq_disable();
tick_nohz_restart_sched_tick();
__preempt_enable_no_resched();
- schedule();
+ __schedule();
preempt_disable();
+ local_irq_enable();
}
}
--
1.7.1.1