From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] usb: gadget: Use unaligned access for wMaxPacketSize
Date: Mon, 13 May 2013 13:56:56 +0200 [thread overview]
Message-ID: <20130513135656.633e2490@lilith> (raw)
In-Reply-To: <CAH9JG2X0H2yPFQz4RBEwaJQUmkyZFashJY3tnhm4c_1F3bmJ+A@mail.gmail.com>
Hi Kyungmin,
On Mon, 13 May 2013 19:50:28 +0900, Kyungmin Park
<kmpark@infradead.org> wrote:
> On Mon, May 13, 2013 at 7:23 PM, Vivek Gautam <gautam.vivek@samsung.com>wrote:
>
> > Use get_unaligned() while fetching wMaxPacketSize to avoid
> > voilating any alignment rules.
> >
>
> It's another story, can we get performance gain with unaligned access
> feature? In case of kernel, we got some gains.
Please do not forget that U-Boot does not run on ARMv7+ only; it runs
on many ARM generations and on many non-ARM architectures too. Some of
these targets have a severe penalty on unaligned access; some cannot
even perform unaligned accesses.
File drivers/usb/gadget/f_mass_storage.c is generic and must build and
run for such targets too.
The best approach is to properly align fields wherever possible, and
when not possible, to use unaligned access macros (and if posisble
detect unaligned accesses at runtime).
Amicalement,
--
Albert.
next prev parent reply other threads:[~2013-05-13 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 10:23 [U-Boot] [PATCH 1/2] usb: Use get_unaligned() in usb_endpoint_maxp() for wMaxPacketSize Vivek Gautam
2013-05-13 10:23 ` [U-Boot] [PATCH 2/2] usb: gadget: Use unaligned access " Vivek Gautam
2013-05-13 10:50 ` Kyungmin Park
2013-05-13 11:46 ` Vivek Gautam
2013-05-13 11:56 ` Albert ARIBAUD [this message]
2013-05-13 12:03 ` Łukasz Dałek
2013-05-14 13:37 ` Piotr Wilczek
2013-05-14 13:49 ` Marek Vasut
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=20130513135656.633e2490@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