linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Scott Wood <scottwood@freescale.com>,
	Jon Loeliger <jdl@freescale.com>,
	linuxppc-dev@ozlabs.org, Benno Rice <benno@jeamland.net>
Subject: Re: dtc: Address an assortment of portability problems
Date: Fri, 27 Jun 2008 09:53:03 -0500	[thread overview]
Message-ID: <4864FECF.3010304@freescale.com> (raw)
In-Reply-To: <20080626234743.GA16169@yookeroo.seuss>

David Gibson wrote:
> On Thu, Jun 26, 2008 at 10:25:28AM -0500, Scott Wood wrote:
>> On Thu, Jun 26, 2008 at 11:03:49AM +1000, David Gibson wrote:
>>> 	- the endian handling functions in libfdt_env.h, based on
>>> endian.h and byteswap.h are replaced with some portable open-coded
>>> versions.  Unfortunately, these result in fairly crappy code when
>>> compiled, but as far as I can determine there doesn't seem to be any
>>> POSIX, SUS or de facto standard way of determining endianness at
>>> compile time, nor standard names for byteswapping functions.
>> Since device-tree and network byte order happen to be the same, we could use
>> ntohl/htonl.
> 
> Not for the 64-bit version.

Why?  They operate on uint32_t despite the "l" in the name, and there 
are no 64-bit fields in the device tree...

-Scott

  reply	other threads:[~2008-06-27 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26  1:03 dtc: Address an assortment of portability problems David Gibson
2008-06-26 15:25 ` Scott Wood
2008-06-26 23:47   ` David Gibson
2008-06-27 14:53     ` Scott Wood [this message]
2008-06-28  0:15       ` David Gibson
2008-07-14 18:54 ` Jon Loeliger
2008-07-15  0:44   ` David Gibson

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=4864FECF.3010304@freescale.com \
    --to=scottwood@freescale.com \
    --cc=benno@jeamland.net \
    --cc=jdl@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).