diff options
Diffstat (limited to 'arch/powerpc/kernel/entry_32.S')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index fc9dded9ac04..37b4396ca978 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -199,10 +199,9 @@ _GLOBAL(DoSyscall) | |||
199 | #ifdef SHOW_SYSCALLS | 199 | #ifdef SHOW_SYSCALLS |
200 | bl do_show_syscall | 200 | bl do_show_syscall |
201 | #endif /* SHOW_SYSCALLS */ | 201 | #endif /* SHOW_SYSCALLS */ |
202 | rlwinm r10,r1,0,0,18 /* current_thread_info() */ | 202 | rlwinm r10,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ |
203 | lwz r11,TI_LOCAL_FLAGS(r10) | 203 | li r11,0 |
204 | rlwinm r11,r11,0,~_TIFL_FORCE_NOERROR | 204 | stb r11,TI_SC_NOERR(r10) |
205 | stw r11,TI_LOCAL_FLAGS(r10) | ||
206 | lwz r11,TI_FLAGS(r10) | 205 | lwz r11,TI_FLAGS(r10) |
207 | andi. r11,r11,_TIF_SYSCALL_T_OR_A | 206 | andi. r11,r11,_TIF_SYSCALL_T_OR_A |
208 | bne- syscall_dotrace | 207 | bne- syscall_dotrace |
@@ -225,10 +224,10 @@ ret_from_syscall: | |||
225 | mr r6,r3 | 224 | mr r6,r3 |
226 | li r11,-_LAST_ERRNO | 225 | li r11,-_LAST_ERRNO |
227 | cmplw 0,r3,r11 | 226 | cmplw 0,r3,r11 |
228 | rlwinm r12,r1,0,0,18 /* current_thread_info() */ | 227 | rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ |
229 | blt+ 30f | 228 | blt+ 30f |
230 | lwz r11,TI_LOCAL_FLAGS(r12) | 229 | lbz r11,TI_SC_NOERR(r12) |
231 | andi. r11,r11,_TIFL_FORCE_NOERROR | 230 | cmpwi r11,0 |
232 | bne 30f | 231 | bne 30f |
233 | neg r3,r3 | 232 | neg r3,r3 |
234 | lwz r10,_CCR(r1) /* Set SO bit in CR */ | 233 | lwz r10,_CCR(r1) /* Set SO bit in CR */ |
@@ -315,7 +314,7 @@ syscall_exit_work: | |||
315 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) /* doesn't include MSR_EE */ | 314 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) /* doesn't include MSR_EE */ |
316 | SYNC | 315 | SYNC |
317 | MTMSRD(r10) /* disable interrupts again */ | 316 | MTMSRD(r10) /* disable interrupts again */ |
318 | rlwinm r12,r1,0,0,18 /* current_thread_info() */ | 317 | rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ |
319 | lwz r9,TI_FLAGS(r12) | 318 | lwz r9,TI_FLAGS(r12) |
320 | 5: | 319 | 5: |
321 | andi. r0,r9,_TIF_NEED_RESCHED | 320 | andi. r0,r9,_TIF_NEED_RESCHED |
@@ -630,7 +629,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_601) | |||
630 | .globl sigreturn_exit | 629 | .globl sigreturn_exit |
631 | sigreturn_exit: | 630 | sigreturn_exit: |
632 | subi r1,r3,STACK_FRAME_OVERHEAD | 631 | subi r1,r3,STACK_FRAME_OVERHEAD |
633 | rlwinm r12,r1,0,0,18 /* current_thread_info() */ | 632 | rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ |
634 | lwz r9,TI_FLAGS(r12) | 633 | lwz r9,TI_FLAGS(r12) |
635 | andi. r0,r9,_TIF_SYSCALL_T_OR_A | 634 | andi. r0,r9,_TIF_SYSCALL_T_OR_A |
636 | beq+ ret_from_except_full | 635 | beq+ ret_from_except_full |
@@ -657,7 +656,7 @@ ret_from_except: | |||
657 | 656 | ||
658 | user_exc_return: /* r10 contains MSR_KERNEL here */ | 657 | user_exc_return: /* r10 contains MSR_KERNEL here */ |
659 | /* Check current_thread_info()->flags */ | 658 | /* Check current_thread_info()->flags */ |
660 | rlwinm r9,r1,0,0,18 | 659 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) |
661 | lwz r9,TI_FLAGS(r9) | 660 | lwz r9,TI_FLAGS(r9) |
662 | andi. r0,r9,(_TIF_SIGPENDING|_TIF_NEED_RESCHED) | 661 | andi. r0,r9,(_TIF_SIGPENDING|_TIF_NEED_RESCHED) |
663 | bne do_work | 662 | bne do_work |
@@ -677,7 +676,7 @@ restore_user: | |||
677 | /* N.B. the only way to get here is from the beq following ret_from_except. */ | 676 | /* N.B. the only way to get here is from the beq following ret_from_except. */ |
678 | resume_kernel: | 677 | resume_kernel: |
679 | /* check current_thread_info->preempt_count */ | 678 | /* check current_thread_info->preempt_count */ |
680 | rlwinm r9,r1,0,0,18 | 679 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) |
681 | lwz r0,TI_PREEMPT(r9) | 680 | lwz r0,TI_PREEMPT(r9) |
682 | cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ | 681 | cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ |
683 | bne restore | 682 | bne restore |
@@ -687,7 +686,7 @@ resume_kernel: | |||
687 | andi. r0,r3,MSR_EE /* interrupts off? */ | 686 | andi. r0,r3,MSR_EE /* interrupts off? */ |
688 | beq restore /* don't schedule if so */ | 687 | beq restore /* don't schedule if so */ |
689 | 1: bl preempt_schedule_irq | 688 | 1: bl preempt_schedule_irq |
690 | rlwinm r9,r1,0,0,18 | 689 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) |
691 | lwz r3,TI_FLAGS(r9) | 690 | lwz r3,TI_FLAGS(r9) |
692 | andi. r0,r3,_TIF_NEED_RESCHED | 691 | andi. r0,r3,_TIF_NEED_RESCHED |
693 | bne- 1b | 692 | bne- 1b |
@@ -889,7 +888,7 @@ recheck: | |||
889 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) | 888 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) |
890 | SYNC | 889 | SYNC |
891 | MTMSRD(r10) /* disable interrupts */ | 890 | MTMSRD(r10) /* disable interrupts */ |
892 | rlwinm r9,r1,0,0,18 | 891 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) |
893 | lwz r9,TI_FLAGS(r9) | 892 | lwz r9,TI_FLAGS(r9) |
894 | andi. r0,r9,_TIF_NEED_RESCHED | 893 | andi. r0,r9,_TIF_NEED_RESCHED |
895 | bne- do_resched | 894 | bne- do_resched |