From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fdt: remove unaligned access in fdt_fixup_ethernet()
Date: Mon, 27 May 2013 22:16:29 -0600 [thread overview]
Message-ID: <51A42F9D.2050309@wwwdotorg.org> (raw)
In-Reply-To: <CAOf5uwmj0CoOddXuwQncctCNaNg++MdyXmjijP6q6-ncLtk9xQ@mail.gmail.com>
On 05/27/2013 10:05 PM, Michael Trimarchi wrote:
> Hi
>
> On May 28, 2013 6:02 AM, "Stephen Warren" <swarren@wwwdotorg.org
> <mailto:swarren@wwwdotorg.org>> wrote:
>>
>> Some ARM compilers may emit code that makes unaligned accesses when
>> faced with constructs such as:
>>
>> char mac[16] = "ethaddr";
>>
>
> Recently I have seen some of this emails. I understand the problem but
> is it a compiler problem? Is it reported somewhere?
The situation is explained in doc/README.arm-unaligned-accesses.
IIUC, the basic synopsis is that before ARMv7, the HW could not perform
unaligned accesses, whereas ARMv7 and later can (with an enable bit in
HW). Newer gcc takes advantage of this fact when it knows it's compiling
for ARMv7 or later. However, in order to support pre-ARMv7, U-Boot has
disabled this feature even on ARMv7 HW at runtime, so it's obvious where
the code is making unaligned accesses, so U-Boot still works on
pre-ARMv7. However, where gcc "implicitly" emits unaligned accesses, we
have to fix them up, as in this patch.
next prev parent reply other threads:[~2013-05-28 4:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 4:01 [U-Boot] [PATCH] fdt: remove unaligned access in fdt_fixup_ethernet() Stephen Warren
2013-05-28 4:05 ` Michael Trimarchi
2013-05-28 4:16 ` Stephen Warren [this message]
2013-06-05 3:41 ` Stephen Warren
2013-06-07 18:19 ` [U-Boot] " Tom Rini
2013-06-12 1:55 ` Jerry Van Baren
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=51A42F9D.2050309@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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