From f4d0d3c5ec5ee76947aa0057089ffab8f83005db Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 12 Jan 2005 17:01:10 -0800 Subject: [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 Signed-off-by: Linus Torvalds --- arch/ppc64/kernel/entry.S | 7 ++----- 1 file 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: -- cgit v1.2.3