patch-2.1.96 linux/include/asm-arm/proc-armv/processor.h

Next file: linux/include/asm-arm/proc-armv/system.h
Previous file: linux/include/asm-arm/proc-armv/pgtable.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.95/linux/include/asm-arm/proc-armv/processor.h linux/include/asm-arm/proc-armv/processor.h
@@ -82,7 +82,10 @@
 	unsigned long *stack = (unsigned long *)sp;			\
 	set_fs(USER_DS);						\
 	memzero(regs->uregs, sizeof(regs->uregs));			\
-	regs->ARM_cpsr = sp <= 0x04000000 ? USR26_MODE : USR_MODE;	\
+	if (current->personality == PER_LINUX_32BIT)			\
+		regs->ARM_cpsr = USR_MODE;				\
+	else								\
+		regs->ARM_cpsr = USR26_MODE;				\
 	regs->ARM_pc = pc;		/* pc */			\
 	regs->ARM_sp = sp;		/* sp */			\
 	regs->ARM_r2 = stack[2];	/* r2 (envp) */			\

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov