public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Matthew Wilcox <matthew@wil.cx>
Cc: James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: iomapping a big endian area
Date: Sat, 2 Apr 2005 18:38:05 -0800	[thread overview]
Message-ID: <20050402183805.20a0cf49.davem@davemloft.net> (raw)
In-Reply-To: <20050403013757.GB24234@parcelfarce.linux.theplanet.co.uk>

On Sun, 3 Apr 2005 02:37:57 +0100
Matthew Wilcox <matthew@wil.cx> wrote:

> My thought on this is that we should encode the endianness of the
> registers in the ioremap cookie.  Some architectures (sparc, I think?) can
> do this in their PTEs.  The rest of us can do it in our ioread/writeN
> methods.  I've planned for this in the parisc iomap implementation but
> not actually implemented it.

SPARC64 can do it in the PTEs, but we just use raw physical
addresses in our I/O accessors, and in those load/store instructions
we can specify the endianness.

Be careful though.  Endianness can be dealt with on a hardware
level.  Consider a byte access to a 32-bit word sized config space
datum, the PCI controller on a big-endian system will likely byte-twist
the data lanes in order for this to work properly.

It's a subtle issue, and it's explained pretty well in some of the
UltraSPARC PCI controller docs at:

	http://www.sun.com/processors/documentation.html

In particular, "U2P UPA to PCI User's Manual", chapter 10
"Little-Endian Support", has some informative diagrams.


  reply	other threads:[~2005-04-03  2:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-02 20:52 [PATCH] finally fix 53c700 to use the generic iomem infrastructure James Bottomley
2005-04-03  1:37 ` iomapping a big endian area Matthew Wilcox
2005-04-03  2:38   ` David S. Miller [this message]
2005-04-03  3:10     ` Matthew Wilcox
2005-04-03  3:40       ` James Bottomley
2005-04-03  4:08         ` David S. Miller
2005-04-03  4:27           ` James Bottomley
2005-04-04  7:50             ` Benjamin Herrenschmidt
2005-04-04 13:59               ` James Bottomley
2005-04-04 14:16                 ` Christoph Hellwig
2005-04-04 14:25                   ` James Bottomley
2005-04-07 23:57                     ` Jesse Barnes
2005-04-04 14:22                 ` Randy.Dunlap
2005-04-04 23:41                   ` Benjamin Herrenschmidt
2005-04-04 23:43                 ` Benjamin Herrenschmidt
2005-04-04  7:49         ` Benjamin Herrenschmidt
2005-04-05  7:42         ` Russell King
2005-04-05 14:05           ` James Bottomley
2005-04-05 18:55             ` Russell King
2005-04-05 20:02               ` Maciej W. Rozycki
2005-04-04 21:17   ` James Bottomley
2005-04-05  7:21     ` Christoph Hellwig
2005-04-05 14:05       ` James Bottomley

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=20050402183805.20a0cf49.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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