From: Catalin Marinas Date: Wed, 29 Jun 2005 14:34:39 +0000 (+0100) Subject: [PATCH] ARM: 2769/1: cpu_init() stack setup fix X-Git-Tag: v2.6.13-rc2~63^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaaa3f9e51245be3215ff67bb3c7aaf5abb82f00;p=linux-2.6 [PATCH] ARM: 2769/1: cpu_init() stack setup fix Patch from Catalin Marinas The compiler allocates r14 for the stk variable in the __asm__ directive. This is a shadowed register and gets changed when the mode is changed, causing random values in the SP register. The patch adds a clobber for the r14 register. Signed-off-by: Catalin Marinas Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 8cf733daa8..35b7273cfd 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -359,7 +359,8 @@ void cpu_init(void) "I" (offsetof(struct stack, abt[0])), "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE), "I" (offsetof(struct stack, und[0])), - "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)); + "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE) + : "r14"); } static struct machine_desc * __init setup_machine(unsigned int nr)