From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: add 8-byte alignment for ABI compliance before board_init_f
Date: Fri, 12 Nov 2010 09:05:28 +0100 [thread overview]
Message-ID: <4CDCF548.2090405@denx.de> (raw)
In-Reply-To: <4CDCF287.8010805@free.fr>
Hello Albert,
Albert ARIBAUD wrote:
> Le 12/11/2010 07:53, Heiko Schocher a ?crit :
>> suggested from Daniel Hobi<daniel.hobi@schmid-telecom.ch>
>>
>> Tested on following boards:
>> arm1136: qong
>> armv7: omap3_beagle
>> arm926ejs: magnesium, tx25
>>
>> Signed-off-by: Heiko Schocher<hs@denx.de>
>> cc: Daniel Hobi<daniel.hobi@schmid-telecom.ch>
>> cc: Albert ARIBAUD<albert.aribaud@free.fr>
>
> I'm a bit uneasy about having the symbol unaligned and the aligning done
> by the code (and in different places):
ok.
>> ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
>> + bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
>
>> - gd = (gd_t *) (CONFIG_SYS_INIT_SP_ADDR);
>> + gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR)& ~0x07);
>>
>
> There is always a risk that overhauls of the code, or new uses elsewhere
> in the code, forget about the alignment constraint and use the symbol
> straight away, which could cause all sorts of hard to debug issues.
Ok.
> Could we not align the symbol value itself so that the code simply uses
> the symbol?
Hmm.. but users can forgot to align the symbol ... and I think, code
should not change that often in this place ...
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2010-11-12 8:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 6:53 [U-Boot] [PATCH] arm: add 8-byte alignment for ABI compliance before board_init_f Heiko Schocher
2010-11-12 7:06 ` Reinhard Meyer
2010-11-12 7:19 ` Heiko Schocher
2010-11-12 8:04 ` Albert ARIBAUD
2010-11-12 8:50 ` Graeme Russ
2010-11-12 8:50 ` Wolfgang Denk
2010-11-12 9:47 ` Graeme Russ
2010-11-12 9:56 ` Wolfgang Denk
2010-11-12 7:53 ` Albert ARIBAUD
2010-11-12 8:05 ` Heiko Schocher [this message]
2010-12-08 22:50 ` Wolfgang Denk
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=4CDCF548.2090405@denx.de \
--to=hs@denx.de \
--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