diff options
| author | Paul Mackerras <paulus@samba.org> | 2005-01-12 17:01:10 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-12 17:01:10 -0800 |
| commit | f4d0d3c5ec5ee76947aa0057089ffab8f83005db (patch) | |
| tree | c6c13c10fc3cd159da39e04360768982b7e5acb6 | |
| parent | ec72859c7038f7d037509ee6ae851dbe80af2343 (diff) | |
[PATCH] PPC64 Call preempt_schedule on exception exit
This patch mirrors the recent changes on x86 to call preempt_schedule
rather than schedule in the exception exit path, in the case where the
preempt_count is zero and the TIF_NEED_RESCHED bit is set.
I'm a little concerned that this means that we have a window where
interrupts are enabled and we are on our way into preempt_schedule,
but preempt_count is still zero. Ingo's proposed preempt_schedule_irq
would fix this, and I think something like that should go in.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/ppc64/kernel/entry.S | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S index b3b7da3a4c92..5a879757da6f 100644 --- a/arch/ppc64/kernel/entry.S +++ b/arch/ppc64/kernel/entry.S @@ -574,25 +574,22 @@ do_work: crandc eq,cr1*4+eq,eq bne restore /* here we are preempting the current task */ -1: lis r0,PREEMPT_ACTIVE@h - stw r0,TI_PREEMPT(r9) +1: #ifdef CONFIG_PPC_ISERIES li r0,1 stb r0,PACAPROCENABLED(r13) #endif ori r10,r10,MSR_EE mtmsrd r10,1 /* reenable interrupts */ - bl .schedule + bl .preempt_schedule mfmsr r10 clrrdi r9,r1,THREAD_SHIFT rldicl r10,r10,48,1 /* disable interrupts again */ - li r0,0 rotldi r10,r10,16 mtmsrd r10,1 ld r4,TI_FLAGS(r9) andi. r0,r4,_TIF_NEED_RESCHED bne 1b - stw r0,TI_PREEMPT(r9) b restore user_work: |
