From: Daniel Mack <daniel@caiaq.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] ARM: add unaligned macros
Date: Thu, 4 Jun 2009 21:23:31 +0200 [thread overview]
Message-ID: <20090604192331.GO26688@buzzloop.caiaq.de> (raw)
In-Reply-To: <20090604190347.5F003832E416@gemini.denx.de>
On Thu, Jun 04, 2009 at 09:03:47PM +0200, Wolfgang Denk wrote:
> > +static inline u16 get_unaligned_le16(const void *p)
> > +{
> > + return __get_unaligned_cpu16((const u8 *)p);
> > +}
> > +
> > +static inline u32 get_unaligned_le32(const void *p)
> > +{
> > + return __get_unaligned_cpu32((const u8 *)p);
> > +}
> > +
> > +static inline u64 get_unaligned_le64(const void *p)
> > +{
> > + return __get_unaligned_cpu64((const u8 *)p);
> > +}
>
> Are these 3 really all "u8" pointers, or is this a copy & paste error?
Yes, this is how it came from the Linux kernel and my tests show that
these access methods work well.
> Is there any guarantee that such macros are never used on device
> registers and the like?
Well - how can I guarantee that? Anyway - the functions can be enhanced
later to make them work with different types of memories. For now, they
implement a working set of functions to allow ubifs (and probably other
code as well) to be compiled and ran on ARMs.
Daniel
next prev parent reply other threads:[~2009-06-04 19:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 10:27 [U-Boot] (no subject) Daniel Mack
2009-06-04 10:27 ` [U-Boot] [PATCH 1/3] ARM: remove unused bit operations Daniel Mack
2009-06-04 10:27 ` [U-Boot] [PATCH 2/3] Add generic " Daniel Mack
2009-06-04 10:27 ` [U-Boot] [PATCH 3/3] ARM: add unaligned macros Daniel Mack
2009-06-04 17:42 ` Daniel Mack
2009-06-04 19:03 ` Wolfgang Denk
2009-06-04 19:23 ` Daniel Mack [this message]
2009-06-05 3:21 ` Stefan Roese
2009-06-04 11:45 ` [U-Boot] [PATCH 2/3] Add generic bit operations Wolfgang Denk
2009-06-04 11:48 ` Daniel Mack
2009-06-04 11:58 ` Wolfgang Denk
2009-06-04 11:47 ` Wolfgang Denk
2009-06-04 11:54 ` Daniel Mack
[not found] ` <20090604115922.E6893832E416@gemini.denx.de>
2009-06-04 18:00 ` Daniel Mack
2009-06-04 18:18 ` Stefan Roese
2009-06-04 19:06 ` Wolfgang Denk
2009-06-05 20:44 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-07 22:41 ` Daniel Mack
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=20090604192331.GO26688@buzzloop.caiaq.de \
--to=daniel@caiaq.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