From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: armv7: add compile option -mno-unaligned-access if available
Date: Thu, 19 Jul 2012 08:28:05 +0200 [thread overview]
Message-ID: <20120719082805.6376ab39@lilith> (raw)
In-Reply-To: <201207190029.25734.vapier@gentoo.org>
Hi Mike,
On Thu, 19 Jul 2012 00:29:23 -0400, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday 02 July 2012 12:14:40 M?ns Rullg?rd wrote:
> > It's slightly more complicated than that. Data can be misaligned for a
> > variety of reasons:
> >
> > 1. Errors in software.
> > 2. Specified by a file format or communication protocol.
> > 3. Deliberately misaligned by the compiler.
> >
> > Misaligned data of type 1 should of course be fixed properly, not worked
> > around in any way.
>
> it's also a reliability aspect. people don't write bug free software, not bug
> free protocols, nor bug free compilers. when misalignment does happen in the
> field, it's a hell of a lot better if the software continued to execute
> correctly rather than randomly triggered an exception.
> -mike
Nitpick: this is robustness, not reliability.
That being said, yes, this robustness is desirable when you do not control all
of the SW running on the product; Linux, for instance, will have to execute
processes which were built with any old (or new) compiler settings, thus the
Linux folks have to make sure the kernel won't fail running those.
But the only uncontrolled SW U-Boot runs is its payload -- typically the
kernel image -- which are usually very cautious in what they assume they can
do, thus are unlikely to perform unaligned accesses.
(pasting your other comment)
> simply search the kernel for get_unaligned then. there are plenty of examples
> in there. granted, many apply to stacks that don't show up in u-boot (yet?)
> such as bluetooth, wireless, and irda, but i'm pretty sure TCP/IPv4 has a few
> edge cases too.
I'll have a look, if only to lament that protocol are not what they used to be
in the old days. :)
Anyway: as I said: performing *controlled* unaligned accesses for external reasons
other than bugs is fine with me. Having our own get_unaligned() in such places
would be fine with me.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2012-07-19 6:28 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 17:47 [U-Boot] [PATCH] arm: enable unaligned access on ARMv7 Lucas Stach
2012-06-05 18:42 ` Stephen Warren
2012-06-05 19:06 ` Lucas Stach
2012-06-22 9:15 ` Albert ARIBAUD
2012-06-22 9:36 ` Lucas Stach
2012-06-22 11:16 ` Albert ARIBAUD
2012-06-22 11:47 ` Lucas Stach
2012-06-22 22:11 ` Aneesh V
2012-06-22 22:13 ` Aneesh V
2012-06-23 9:01 ` Albert ARIBAUD
2012-06-23 17:43 ` V, Aneesh
2012-06-25 20:34 ` Albert ARIBAUD
2012-06-25 21:49 ` Aneesh V
2012-06-25 22:02 ` Wolfgang Denk
2012-06-23 19:50 ` Måns Rullgård
2012-06-24 6:30 ` Lucas Stach
[not found] ` <20120625221741.3a32790e@lilith>
2012-06-25 21:34 ` Lucas Stach
2012-06-26 20:56 ` Rob Herring
2012-06-27 10:14 ` Tetsuyuki Kobayashi
2012-07-02 9:42 ` [U-Boot] [PATCH] arm: armv7: add compile option -mno-unaligned-access if available Tetsuyuki Kobayashi
2012-07-02 9:53 ` Måns Rullgård
2012-07-02 15:16 ` Lucas Stach
2012-07-02 16:14 ` Måns Rullgård
2012-07-03 7:10 ` Tetsuyuki Kobayashi
2012-07-05 7:57 ` Albert ARIBAUD
2012-07-18 21:37 ` Albert ARIBAUD
2012-07-19 4:31 ` Mike Frysinger
2012-07-19 4:29 ` Mike Frysinger
2012-07-19 6:28 ` Albert ARIBAUD [this message]
2012-07-19 14:27 ` Mike Frysinger
2012-07-20 7:12 ` Albert ARIBAUD
2012-07-12 15:12 ` Gary Thomas
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=20120719082805.6376ab39@lilith \
--to=albert.u.boot@aribaud.net \
--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