public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] improve printf behavior on arm/pxa after enabling 64bit support in printf by default.
Date: Thu, 15 Apr 2010 09:44:15 +0200	[thread overview]
Message-ID: <201004150944.15545.marek.vasut@gmail.com> (raw)
In-Reply-To: <j2kb70f2f961004141612te0cff7b5h8c38e9255937f1dc@mail.gmail.com>

Dne ?t 15. dubna 2010 01:12:30 Mikhail Kshevetskiy napsal(a):
> Yes, you was right. This is definitely an alignment issue.
> Here is a patch to fix this issue.

Thanks, actually, I pushed a different patch that fixed the stack alignment 
issue, but forgot to reserve the space for abort stack in my patch. Therefore I 
pushed a patch on top of mine based on your patch. The patch is attached below.

Ah also please, keep track of the u-boot-pxa.git repo, that should contain most 
recent fixes for xscale. http://git.denx.de/?p=u-boot/u-boot-pxa.git;a=summary
> 
> Sorry for attaching file. I am in a trip and use web browser for sending
> mail

Fine by me.

But please, stop top posting (post below the mail or into the body). It's some 
rule that improves readability. Thanks!
> 
> 2010/4/10 Wolfgang Denk <wd@denx.de>:
> > Dear Mikhail Kshevetskiy,
> > 
> > In message <20100329162346.017a43dc@laska.campus-ws.pu.ru> you wrote:
> >> commit 4b142febff71eabdb7ddbb125c7b583b24ddc434 (common: delete
> >> CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL) breaks printf on
> >> my arm/pxa270 board. For example, the code
> >> 
> >>       int a = 128;
> >>       printf("a= %d\n", a);
> >> 
> >> will print zero on the console. The problem reproduced on gcc 4.1.1,
> >> 4.3.3, 4.4.1 and 4.4.2.
> >> 
> >> This patch fix printf unless you'll need printing 64-bit values.
> > 
> > I doubt that your patch addresses the real cause of the problem.
> > Did you check if the stack alignment problem discussed here earlier
> > has been fixed for your architecture?
> > From: Marek Vasut <marek.vasut@gmail.com>

Date: Thu, 15 Apr 2010 09:35:04 +0200
Subject: [PATCH] PXA: Fix abort stack

The stack alignment patch didn't reserve space for abort stack anymore. This
patch fixes the problem.

Original patch that pointed this issue out was by Mikhail Kshevetskiy.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/cpu/pxa/start.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index f7236bf..3989fa6 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -140,8 +140,8 @@ stack_setup:
 #ifdef CONFIG_USE_IRQ
        sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
 #endif /* CONFIG_USE_IRQ */
-       bic     sp, r0, #7              /* leave 4 words for abort-stack    */
-                                       /* NOTE: stack MUST be aligned to   */
+       sub     r0, r0, #12             /* leave 3 words for abort-stack    */
+       bic     sp, r0, #7              /* NOTE: stack MUST be aligned to   */
                                        /* 8 bytes in case we want to use   */
                                        /* 64bit datatypes (eg. VSPRINTF64) */
 
-- 
1.7.0
> > Best regards,
> > 
> > Wolfgang Denk
> > 
> > --
> > DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> > Die Scheu vor Verantwortung ist die Krankheit unserer Zeit.
> >                                                 -- Otto von Bismarck

      parent reply	other threads:[~2010-04-15  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 12:23 [U-Boot] [PATCH 1/2] improve printf behavior on arm/pxa after enabling 64bit support in printf by default Mikhail Kshevetskiy
2010-04-09 21:40 ` Wolfgang Denk
2010-04-14 17:38   ` Marek Vasut
     [not found]   ` <j2kb70f2f961004141612te0cff7b5h8c38e9255937f1dc@mail.gmail.com>
2010-04-15  7:44     ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004150944.15545.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox