summaryrefslogtreecommitdiff
path: root/arch/avr32/cpu/exception.c
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.devel@googlemail.com>2015-02-06 23:06:44 +0100
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-02-17 22:52:41 +0100
commit4db896236cdac37db17b215ba3ff2d2701bddb49 (patch)
tree8664c155c2c3921b1682a7aa55a5a78b280620b5 /arch/avr32/cpu/exception.c
parent186678600a3aa81f883e4bf4b94ca4d40081d93a (diff)
downloadu-boot-imx-4db896236cdac37db17b215ba3ff2d2701bddb49.zip
u-boot-imx-4db896236cdac37db17b215ba3ff2d2701bddb49.tar.gz
u-boot-imx-4db896236cdac37db17b215ba3ff2d2701bddb49.tar.bz2
avr32: use generic gd->start_addr_sp
Before avr32 had an extra storage for stack end to have a nice stack printout on exception. Remove this extra storage and use generic gd->start_addr_sp instead. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/avr32/cpu/exception.c')
-rw-r--r--arch/avr32/cpu/exception.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/avr32/cpu/exception.c b/arch/avr32/cpu/exception.c
index 5d1bc68..d6991f6 100644
--- a/arch/avr32/cpu/exception.c
+++ b/arch/avr32/cpu/exception.c
@@ -96,11 +96,11 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs)
printf("CPU Mode: %s\n", cpu_modes[mode]);
/* Avoid exception loops */
- if (regs->sp < (gd->arch.stack_end - CONFIG_STACKSIZE)
- || regs->sp >= gd->arch.stack_end)
+ if (regs->sp < (gd->start_addr_sp - CONFIG_STACKSIZE) ||
+ regs->sp >= gd->start_addr_sp)
printf("\nStack pointer seems bogus, won't do stack dump\n");
else
- dump_mem("\nStack: ", regs->sp, gd->arch.stack_end);
+ dump_mem("\nStack: ", regs->sp, gd->start_addr_sp);
panic("Unhandled exception\n");
}