LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <greg@kroah.com>,
	Al Viro <viro@ftp.linux.org.uk>,
	jgarzik@pobox.com, David Miller <davem@davemloft.net>,
	David Howells <dhowells@redhat.com>,
	miles@gnu.org
Subject: Re: [RFC/PATCH] iomap: Add specific address space __iomap for iomap pointers
Date: Mon, 18 Feb 2008 15:28:24 +1100	[thread overview]
Message-ID: <1203308904.6740.19.camel@pasglop> (raw)
In-Reply-To: <20080218033600.A9761DDE35@ozlabs.org>


On Mon, 2008-02-18 at 14:35 +1100, Benjamin Herrenschmidt wrote:
> The current iomap stuff (pci_iomap, ioport_map, pcim_iomap, ...) is
> confusing as it returns pointers in the _miomem address space.
> 
> However, even if that would work on some architectures, the result
> of those functions is -not- to be used as an __iomem, with accessors
> such as readl/writel, but only with the new brand of specific accessors
> (ioread32/iowrite32/...).

Willy and Al raised a good point off-list, is that in all effective
implementations of this, the MMIO case -does- use compatible virtual
addresses with ioremap, in fact even powerpc does.

Thus if we consider iomap as a kind of superset of the ioremap space
with a "hole" in it for PIO, it's fine to use the same address space
marker and it's fine to interchange the accessors when one -knows-
for sure it's dealing with memory and not IO.

Thus drop my patch,

Ben.



      reply	other threads:[~2008-02-18  4:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18  3:35 Benjamin Herrenschmidt
2008-02-18  4:28 ` Benjamin Herrenschmidt [this message]

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=1203308904.6740.19.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=greg@kroah.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles@gnu.org \
    --cc=viro@ftp.linux.org.uk \
    --subject='Re: [RFC/PATCH] iomap: Add specific address space __iomap for iomap pointers' \
    /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

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).