| .. | .. |
|---|
| 176 | 176 | * based on caller's run-mode / personality. |
|---|
| 177 | 177 | */ |
|---|
| 178 | 178 | ld r11,SYS_CALL_TABLE@toc(2) |
|---|
| 179 | | - andi. r10,r10,_TIF_32BIT |
|---|
| 179 | + andis. r10,r10,_TIF_32BIT@h |
|---|
| 180 | 180 | beq 15f |
|---|
| 181 | 181 | addi r11,r11,8 /* use 32-bit syscall entries */ |
|---|
| 182 | 182 | clrldi r3,r3,32 |
|---|
| .. | .. |
|---|
| 250 | 250 | |
|---|
| 251 | 251 | ld r9,TI_FLAGS(r12) |
|---|
| 252 | 252 | li r11,-MAX_ERRNO |
|---|
| 253 | | - andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) |
|---|
| 253 | + lis r0,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)@h |
|---|
| 254 | + ori r0,r0,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)@l |
|---|
| 255 | + and. r0,r9,r0 |
|---|
| 254 | 256 | bne- .Lsyscall_exit_work |
|---|
| 255 | 257 | |
|---|
| 256 | 258 | andi. r0,r8,MSR_FP |
|---|
| .. | .. |
|---|
| 363 | 365 | /* If TIF_RESTOREALL is set, don't scribble on either r3 or ccr. |
|---|
| 364 | 366 | If TIF_NOERROR is set, just save r3 as it is. */ |
|---|
| 365 | 367 | |
|---|
| 366 | | - andi. r0,r9,_TIF_RESTOREALL |
|---|
| 368 | + andis. r0,r9,_TIF_RESTOREALL@h |
|---|
| 367 | 369 | beq+ 0f |
|---|
| 368 | 370 | REST_NVGPRS(r1) |
|---|
| 369 | 371 | b 2f |
|---|
| 370 | 372 | 0: cmpld r3,r11 /* r11 is -MAX_ERRNO */ |
|---|
| 371 | 373 | blt+ 1f |
|---|
| 372 | | - andi. r0,r9,_TIF_NOERROR |
|---|
| 374 | + andis. r0,r9,_TIF_NOERROR@h |
|---|
| 373 | 375 | bne- 1f |
|---|
| 374 | 376 | ld r5,_CCR(r1) |
|---|
| 375 | 377 | neg r3,r3 |
|---|
| 376 | 378 | oris r5,r5,0x1000 /* Set SO bit in CR */ |
|---|
| 377 | 379 | std r5,_CCR(r1) |
|---|
| 378 | 380 | 1: std r3,GPR3(r1) |
|---|
| 379 | | -2: andi. r0,r9,(_TIF_PERSYSCALL_MASK) |
|---|
| 381 | +2: andis. r0,r9,(_TIF_PERSYSCALL_MASK)@h |
|---|
| 380 | 382 | beq 4f |
|---|
| 381 | 383 | |
|---|
| 382 | 384 | /* Clear per-syscall TIF flags if any are set. */ |
|---|
| 383 | 385 | |
|---|
| 384 | | - li r11,_TIF_PERSYSCALL_MASK |
|---|
| 386 | + lis r11,(_TIF_PERSYSCALL_MASK)@h |
|---|
| 385 | 387 | addi r12,r12,TI_FLAGS |
|---|
| 386 | 388 | 3: ldarx r10,0,r12 |
|---|
| 387 | 389 | andc r10,r10,r11 |
|---|
| .. | .. |
|---|
| 774 | 776 | bl restore_math |
|---|
| 775 | 777 | b restore |
|---|
| 776 | 778 | #endif |
|---|
| 777 | | -1: andi. r0,r4,_TIF_NEED_RESCHED |
|---|
| 779 | +1: andi. r0,r4,_TIF_NEED_RESCHED_MASK |
|---|
| 778 | 780 | beq 2f |
|---|
| 779 | 781 | bl restore_interrupts |
|---|
| 780 | 782 | SCHEDULE_USER |
|---|
| .. | .. |
|---|
| 836 | 838 | |
|---|
| 837 | 839 | #ifdef CONFIG_PREEMPT |
|---|
| 838 | 840 | /* Check if we need to preempt */ |
|---|
| 839 | | - andi. r0,r4,_TIF_NEED_RESCHED |
|---|
| 840 | | - beq+ restore |
|---|
| 841 | | - /* Check that preempt_count() == 0 and interrupts are enabled */ |
|---|
| 842 | 841 | lwz r8,TI_PREEMPT(r9) |
|---|
| 842 | + cmpwi 0,r8,0 /* if non-zero, just restore regs and return */ |
|---|
| 843 | + bne restore |
|---|
| 844 | + andi. r0,r4,_TIF_NEED_RESCHED |
|---|
| 845 | + bne+ check_count |
|---|
| 846 | + |
|---|
| 847 | + andi. r0,r4,_TIF_NEED_RESCHED_LAZY |
|---|
| 848 | + beq+ restore |
|---|
| 849 | + lwz r8,TI_PREEMPT_LAZY(r9) |
|---|
| 850 | + |
|---|
| 851 | + /* Check that preempt_count() == 0 and interrupts are enabled */ |
|---|
| 852 | +check_count: |
|---|
| 843 | 853 | cmpwi cr0,r8,0 |
|---|
| 844 | 854 | bne restore |
|---|
| 845 | 855 | ld r0,SOFTE(r1) |
|---|
| .. | .. |
|---|
| 856 | 866 | /* Re-test flags and eventually loop */ |
|---|
| 857 | 867 | CURRENT_THREAD_INFO(r9, r1) |
|---|
| 858 | 868 | ld r4,TI_FLAGS(r9) |
|---|
| 859 | | - andi. r0,r4,_TIF_NEED_RESCHED |
|---|
| 869 | + andi. r0,r4,_TIF_NEED_RESCHED_MASK |
|---|
| 860 | 870 | bne 1b |
|---|
| 861 | 871 | |
|---|
| 862 | 872 | /* |
|---|