diff options
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
| -rw-r--r-- | arch/arm/kernel/entry-common.S | 36 | 
1 files changed, 6 insertions, 30 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 54ee265dd81..4afed88d250 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -53,9 +53,13 @@ fast_work_pending:  work_pending:  	tst	r1, #_TIF_NEED_RESCHED  	bne	work_resched -	tst	r1, #_TIF_SIGPENDING|_TIF_NOTIFY_RESUME -	beq	no_work_pending +	/* +	 * TIF_SIGPENDING or TIF_NOTIFY_RESUME must've been set if we got here +	 */ +	ldr	r2, [sp, #S_PSR]  	mov	r0, sp				@ 'regs' +	tst	r2, #15				@ are we returning to user mode? +	bne	no_work_pending			@ no?  just leave, then...  	mov	r2, why				@ 'syscall'  	tst	r1, #_TIF_SIGPENDING		@ delivering a signal?  	movne	why, #0				@ prevent further restarts @@ -335,20 +339,6 @@ ENDPROC(ftrace_stub)   *-----------------------------------------------------------------------------   */ -	/* If we're optimising for StrongARM the resulting code won't  -	   run on an ARM7 and we can save a couple of instructions.   -								--pb */ -#ifdef CONFIG_CPU_ARM710 -#define A710(code...) code -.Larm710bug: -	ldmia	sp, {r0 - lr}^			@ Get calling r0 - lr -	mov	r0, r0 -	add	sp, sp, #S_FRAME_SIZE -	subs	pc, lr, #4 -#else -#define A710(code...) -#endif -  	.align	5  ENTRY(vector_swi)  	sub	sp, sp, #S_FRAME_SIZE @@ -379,9 +369,6 @@ ENTRY(vector_swi)  	ldreq	r10, [lr, #-4]			@ get SWI instruction  #else  	ldr	r10, [lr, #-4]			@ get SWI instruction -  A710(	and	ip, r10, #0x0f000000		@ check for SWI		) -  A710(	teq	ip, #0x0f000000						) -  A710(	bne	.Larm710bug						)  #endif  #ifdef CONFIG_CPU_ENDIAN_BE8  	rev	r10, r10			@ little endian instruction @@ -392,26 +379,15 @@ ENTRY(vector_swi)  	/*  	 * Pure EABI user space always put syscall number into scno (r7).  	 */ -  A710(	ldr	ip, [lr, #-4]			@ get SWI instruction	) -  A710(	and	ip, ip, #0x0f000000		@ check for SWI		) -  A710(	teq	ip, #0x0f000000						) -  A710(	bne	.Larm710bug						) -  #elif defined(CONFIG_ARM_THUMB) -  	/* Legacy ABI only, possibly thumb mode. */  	tst	r8, #PSR_T_BIT			@ this is SPSR from save_user_regs  	addne	scno, r7, #__NR_SYSCALL_BASE	@ put OS number in  	ldreq	scno, [lr, #-4]  #else -  	/* Legacy ABI only. */  	ldr	scno, [lr, #-4]			@ get SWI instruction -  A710(	and	ip, scno, #0x0f000000		@ check for SWI		) -  A710(	teq	ip, #0x0f000000						) -  A710(	bne	.Larm710bug						) -  #endif  #ifdef CONFIG_ALIGNMENT_TRAP  |