All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] disk:efi: avoid unaligned access on efi partition
Date: Mon, 14 Oct 2013 16:22:34 +0200	[thread overview]
Message-ID: <20131014162234.46c0e5f2@lilith> (raw)
In-Reply-To: <000801cec8e4$3d768800$b8639800$%wilczek@samsung.com>

Hi Piotr,

On Mon, 14 Oct 2013 15:49:43 +0200, Piotr Wilczek
<p.wilczek@samsung.com> wrote:

> Dear Albert and M?ns,
> 
> > -----Original Message-----
> > From: M?ns Rullg?rd [mailto:mans at mansr.com]
> > Sent: Monday, October 14, 2013 3:05 PM
> > To: Albert ARIBAUD
> > Cc: Piotr Wilczek; 'Tom Rini'; u-boot at lists.denx.de; 'Kyungmin Park'
> > Subject: Re: [U-Boot] [PATCH] disk:efi: avoid unaligned access on efi
> > partition
> > 
> > Albert ARIBAUD <albert.u.boot@aribaud.net> writes:
> > 
> > >> > Please do not advise using native unaligned accesses on code that
> > >> > is not strictly used by ARMv6+ architectures: the present code,
> > for
> > >> > instance, might be run on pre-ARMv6 or non-ARM platforms, and
> > thus,
> > >> > should never assume ability to perform unaligned accesses
> > natively.
> > >>
> > >> I'm advising no such thing.  I said two things:
> > >>
> > >> 1.  Declaring a struct with the 'packed' attribute makes gcc
> > >>     automatically generate correct code for all targets.  _IF_ the
> > >>     selected target supports unaligned ldr/str, these might get
> > used.
> > >>
> > >> 2.  If your target is ARMv6 or later _AND_ you enable strict
> > alignment
> > >>     checking in the system control register, you _MUST_ build with
> > the
> > >>     -mno-unaligned-access flag.
> > >
> > > Then I apologize; I had read "Note that on ARMv6 and later ldr/str
> > > support unaligned addresses unless this is explicitly disabled in the
> > > system control register" as a suggestion to use that capability.
> > 
> > If building for ARMv6 or later, I do suggest allowing unaligned
> > accesses.  The moment you add -march=armv6 (or equivalent), you allow
> > for a number of things not supported by older versions, so why not
> > unaligned memory accesses?
> > 
> 
> Thank you for your comments, I will follow your advice.

I will NAK building part_efi.c with options to allow native unaligned
access.

I will, OTOH, be ok with explicit unaligned reads/writes.

> Best regards
> Piotr Wilczek

Amicalement,
-- 
Albert.

  reply	other threads:[~2013-10-14 14:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 13:31 [U-Boot] [PATCH] disk:efi: avoid unaligned access on efi partition Piotr Wilczek
2013-10-11 16:00 ` Albert ARIBAUD
2013-10-11 23:28 ` Måns Rullgård
2013-10-14  8:30   ` Piotr Wilczek
2013-10-14 10:50     ` Måns Rullgård
2013-10-14 11:46       ` Albert ARIBAUD
2013-10-14 12:19         ` Måns Rullgård
2013-10-14 13:00           ` Albert ARIBAUD
2013-10-14 13:05             ` Måns Rullgård
2013-10-14 13:48               ` Albert ARIBAUD
2013-10-14 14:09                 ` Måns Rullgård
2013-10-14 15:18                   ` Albert ARIBAUD
2013-10-14 15:59                     ` Måns Rullgård
2013-10-14 17:26                       ` Albert ARIBAUD
2013-10-15 15:23                         ` Måns Rullgård
2013-10-15 16:21                           ` Albert ARIBAUD
2013-10-15 16:29                             ` Måns Rullgård
2013-10-15 17:07                               ` Albert ARIBAUD
2013-10-14 13:49               ` Piotr Wilczek
2013-10-14 14:22                 ` Albert ARIBAUD [this message]
2014-01-28 12:46 ` [U-Boot] [PATCH V2] " Piotr Wilczek
2014-01-29 21:48   ` Tom Rini
2014-02-19 14:56   ` Hector Palacios
2014-02-19 15:03     ` Tom Rini
2014-02-19 15:23       ` Tom Rini
2014-02-24 15:56         ` Lukasz Majewski
2014-02-24 16:23           ` Tom Rini

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=20131014162234.46c0e5f2@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.