From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: James Simmons <jsimmons@infradead.org>
Cc: Boris Bezlaj <boris@gajba.net>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH] imsttfb 2.5.x
Date: 15 Apr 2003 22:05:29 +0200 [thread overview]
Message-ID: <1050437129.2266.6.camel@zion.wanadoo.fr> (raw)
In-Reply-To: <Pine.LNX.4.44.0304152030500.8236-100000@phoenix.infradead.org>
> Does readl handle byte swapping on the PPC. The registers expect the data
> feed to them to be little endian. Actually this driver will only work on
> the PPC and ix86 platform. Other big endian platforms are out of luck.
Yes, readl/writel will do the right thing. Use of in_le32 here is
probably for pre-historical reasons ;)
All PCI capabale big endian platforms shall have proper byteswapping
readl/writel.
> P.S
> This whole issue really sucks. I really wish there was a clean standard
> api to this.
There is one, and it's readl/writel ;)
The only real problem is that currently, we lack equivalent of the "s"
versions of in/out macros for mmio. This is a bit annoying for the few
rare case where they would be useful as those shouldn't byteswap, but
re-implementing with __raw_read/writel (which doesn't byteswap neither)
is nasty because it exposes the barrier problem to the driver.
It would be convenient to define {read,write}s{b,w,l} so the IO
accessors and MMIO accessors apre perfectly symetric, but that's an
old debate...
Ben.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2003-04-15 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-12 11:19 [PATCH] imsttfb 2.5.x Boris Bezlaj
2003-04-15 7:05 ` Benjamin Herrenschmidt
2003-04-15 19:33 ` James Simmons
2003-04-15 20:05 ` Benjamin Herrenschmidt [this message]
2003-04-15 22:43 ` Boris Bezlaj
2003-04-16 8:26 ` Benjamin Herrenschmidt
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=1050437129.2266.6.camel@zion.wanadoo.fr \
--to=benh@kernel.crashing.org \
--cc=boris@gajba.net \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).