diff options
| author | Paul Mackerras <paulus@samba.org> | 2003-05-27 16:49:43 +1000 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2003-05-27 16:49:43 +1000 |
| commit | 5acf5ff0e28ffbf702b2ae1284803b509bf4f776 (patch) | |
| tree | 4dd907a18f47d92b5f999e8bfab1f60a776cda49 /arch/ppc/kernel/entry.S | |
| parent | 8a865f4a97f4eecdba606a444601148668210ef1 (diff) | |
PPC32: Fix preempt bugs identified by Milton Miller.
Diffstat (limited to 'arch/ppc/kernel/entry.S')
| -rw-r--r-- | arch/ppc/kernel/entry.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index 463ed868c626..73d19a019061 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S @@ -507,7 +507,7 @@ ret_from_except: MTMSRD(r10) /* disable interrupts */ lwz r3,_MSR(r1) /* Returning to user mode? */ - andi. r3,r3,MSR_PR + andi. r0,r3,MSR_PR beq resume_kernel user_exc_return: /* r10 contains MSR_KERNEL here */ @@ -528,6 +528,7 @@ restore_user: #ifdef CONFIG_PREEMPT b restore +/* N.B. the only way to get here is from the beq following ret_from_except. */ resume_kernel: /* check current_thread_info->preempt_count */ rlwinm r9,r1,0,0,18 @@ -549,8 +550,10 @@ resume_kernel: SYNC MTMSRD(r10) /* disable interrupts */ rlwinm r9,r1,0,0,18 - lwz r0,TI_FLAGS(r9) - andi. r0,r0,_TIF_NEED_RESCHED + li r0,0 + stw r0,TI_PREEMPT(r9) + lwz r3,TI_FLAGS(r9) + andi. r0,r3,_TIF_NEED_RESCHED bne- 1b #else resume_kernel: |
