blob: b803024d269e7ee2810456eaf02cf40094777def [file] [log] [blame]
From a021e8e0bd15d516605c6293b6d038c5f718526b 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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/x86/kernel/entry_32.S | 13 +++++--------
arch/x86/kernel/process_32.c | 4 +++-
2 files changed, 8 insertions(+), 9 deletions(-)
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 52f61f4..4cc4757 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.0.4