Subject: [PATCH 1/1] ARCH PowerPC: Consider new flags in assembler instructions Additional flags in bit 16 and 17 require changes in the assembler code to handle these new flags. The old instructions only can handle 16 bits. Now there are 18. Note: I'm not an expert in PowerPC assembler, so there might be better solutions to handle more than 16 bits in this environment. Signed-off-by: Juergen Beisert <j.beisert@xxxxxxxxxxxxxx> --- Index: arch/powerpc/kernel/entry_32.S =================================================================== --- arch/powerpc/kernel/entry_32.S.orig +++ arch/powerpc/kernel/entry_32.S @@ -228,7 +228,9 @@ ret_from_syscall: MTMSRD(r10) lwz r9,TI_FLAGS(r12) li r8,-_LAST_ERRNO - andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) + lis r0,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)@h + ori r0,r0,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)@l + and. r0,r0,r9 bne- syscall_exit_work cmplw 0,r3,r8 blt+ syscall_exit_cont @@ -641,7 +643,9 @@ user_exc_return: /* r10 contains MSR_KE /* Check current_thread_info()->flags */ rlwinm r9,r1,0,0,(31-THREAD_SHIFT) lwz r9,TI_FLAGS(r9) - andi. r0,r9,(_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED) + lis r0,(_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED)@h + ori r0,r0,(_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED)@l + and. r0,r9,r0 bne do_work restore_user: @@ -863,7 +867,9 @@ global_dbcr0: #endif /* !(CONFIG_4xx || CONFIG_BOOKE) */ do_work: /* r10 contains MSR_KERNEL here */ - andi. r0,r9,(_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED) + lis r0,(_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED)@h + ori r0,r0,(_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED)@l + and. r0,r9,r0 beq do_user_signal do_resched: /* r10 contains MSR_KERNEL here */ @@ -877,7 +883,9 @@ recheck: MTMSRD(r10) /* disable interrupts */ rlwinm r9,r1,0,0,(31-THREAD_SHIFT) lwz r9,TI_FLAGS(r9) - andi. r0,r9,(_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED) + lis r0,(_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED)@h + ori r0,r0,(_TIF_NEED_RESCHED|_TIF_NEED_RESCHED_DELAYED)@l + and. r0,r9,r0 bne- do_resched andi. r0,r9,_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK beq restore_user -- Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Vertretung Sued/Muenchen, Germany Phone: +49-8766-939 228 | Fax: +49-5121-206917-9 - To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html