Patchwork [U-Boot] ARM: fix stack pointer adjustment in board_init_f()

login
register
mail settings
Submitter Eric Cooper
Date April 14, 2011, 10:32 p.m.
Message ID <1302820357-30318-1-git-send-email-ecc@cmu.edu>
Download mbox | patch
Permalink /patch/91310/
State Accepted
Commit 6445a3051efadcac1264998cb6387cd1aec2e935
Delegated to: Albert ARIBAUD
Headers show

Comments

Eric Cooper - April 14, 2011, 10:32 p.m.
Since addr_sp is a byte address, it should be adjusted by 12 here.

Signed-off-by: Eric Cooper <ecc@cmu.edu>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
 arch/arm/lib/board.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Wolfgang Denk - April 15, 2011, 8:42 a.m.
Dear Eric Cooper,

In message <1302820357-30318-1-git-send-email-ecc@cmu.edu> you wrote:
> Since addr_sp is a byte address, it should be adjusted by 12 here.
> 
> Signed-off-by: Eric Cooper <ecc@cmu.edu>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> ---
>  arch/arm/lib/board.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Wolfgang Denk <wd@denx.de>

Best regards,

Wolfgang Denk
Albert ARIBAUD - April 20, 2011, 5:50 a.m.
Hi Eric,

Le 15/04/2011 10:42, Wolfgang Denk a écrit :
> Dear Eric Cooper,
>
> In message<1302820357-30318-1-git-send-email-ecc@cmu.edu>  you wrote:
>> Since addr_sp is a byte address, it should be adjusted by 12 here.
>>
>> Signed-off-by: Eric Cooper<ecc@cmu.edu>
>> Cc: Albert ARIBAUD<albert.u.boot@aribaud.net>
>> ---
>>   arch/arm/lib/board.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> Acked-by: Wolfgang Denk<wd@denx.de>
>
> Best regards,
>
> Wolfgang Denk

Applied to u-boot-arm, thanks.

Amicalement,

Patch

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index dc46e21..d5b34ad 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -399,7 +399,7 @@  void board_init_f (ulong bootflag)
 		CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ, addr_sp);
 #endif
 	/* leave 3 words for abort-stack    */
-	addr_sp -= 3;
+	addr_sp -= 12;
 
 	/* 8-byte alignment for ABI compliance */
 	addr_sp &= ~0x07;