aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2005-06-29 10:34:39 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-06-29 10:34:39 -0400
commitaaaa3f9e51245be3215ff67bb3c7aaf5abb82f00 (patch)
tree3116e92b35d7424469d21f6758933352e9b84dfc /arch/arm/kernel
parent9ec3c75cdeb57fa3c12a813c63706ece7fb63648 (diff)
[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 <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 8cf733daa800..35b7273cfdb4 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -359,7 +359,8 @@ void cpu_init(void)
359 "I" (offsetof(struct stack, abt[0])), 359 "I" (offsetof(struct stack, abt[0])),
360 "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE), 360 "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE),
361 "I" (offsetof(struct stack, und[0])), 361 "I" (offsetof(struct stack, und[0])),
362 "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)); 362 "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
363 : "r14");
363} 364}
364 365
365static struct machine_desc * __init setup_machine(unsigned int nr) 366static struct machine_desc * __init setup_machine(unsigned int nr)