Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@gmail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Jeff Garzik" <jeff@garzik.org>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices
Date: Tue, 18 Sep 2007 14:46:40 -0400	[thread overview]
Message-ID: <43e72e890709181146s604e0f9fl8b0c16627469c77f@mail.gmail.com> (raw)
In-Reply-To: <20070918113401.6a8a737f@the-village.bc.nu>

On 9/18/07, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Mon, 17 Sep 2007 16:22:07 -0400
> "Luis R. Rodriguez" <mcgrof@gmail.com> wrote:
>
> > This patch updates the pci_iomap() kernel-doc to make it clarify the
> > case when read*()/write*() can be called over ioread*/iowrite*(). When
> > driver writers read this documenation sometimes it is assumed you just
> > *need* to use ioread*()/iorwrite*(). We have an exception so lets just
> > clarify this is not true for the exception.
> >
> >  lib/iomap.c |   11 ++++++++---
> >  1 files changed, 8 insertions(+), 3 deletions(-)
> >
> > Signed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>
>
> Reviewed-by: Alan Cox <alan@redhat.com>
>
> Although I would say s/recommended/required/

Alright, here is the same patch inline with s/recommended/required/ language:

Signed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>

  Luis

---
 lib/iomap.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/iomap.c b/lib/iomap.c
index 864f2ec..33651f8 100644
--- a/lib/iomap.c
+++ b/lib/iomap.c
@@ -247,9 +247,14 @@ EXPORT_SYMBOL(ioport_unmap);
  * @maxlen: length of the memory to map
  *
  * Using this function you will get a __iomem address to your device BAR.
- * You can access it using ioread*() and iowrite*(). These functions hide
- * the details if this is a MMIO or PIO address space and will just do what
- * you expect from them in the correct way.
+ * If you use pci_iomap() it is recommended you use ioread*() and
iowrite*(). If
+ * your device is MMIO-only and as long as future architectures don't break the
+ * assumption that pcio_iomap()-returned cookie can be used by read*()/write*()
+ * then you can use read*()/write*() instead. The ioread*() and iowrite*()
+ * functions hide the details if this is a MMIO or PIO address space and will
+ * just do what you expect from them in the correct way. Drivers for MMIO-only
+ * devices would use this only to save themselves from having to call
+ * &pci_resource_start().
  *
  * @maxlen specifies the maximum length to map. If you want to get access to
  * the complete BAR without checking for its length first, pass %0 here.

  reply	other threads:[~2007-09-18 18:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 20:22 [PATCH] Clarify pci_iomap() usage for MMIO-only devices Luis R. Rodriguez
2007-09-18 10:34 ` Alan Cox
2007-09-18 18:46   ` Luis R. Rodriguez [this message]
2007-09-18 19:03     ` Linus Torvalds
2007-09-18 19:07       ` Luis R. Rodriguez
2007-09-18 19:22         ` Linus Torvalds
2007-09-18 20:12           ` Luis R. Rodriguez
2007-09-18 20:30             ` Linus Torvalds
2007-09-18 21:02               ` Luis R. Rodriguez
2007-09-18 21:14                 ` Linus Torvalds
2007-09-18 21:30                   ` Jeff Garzik
2007-09-18 21:42                     ` Linus Torvalds
2007-09-18 22:25                       ` Linus Torvalds
2007-09-18 22:21               ` Benjamin Herrenschmidt
2007-09-18 22:36                 ` Linus Torvalds
2007-09-18 20:21           ` Jeff Garzik
2007-09-18 22:20             ` Benjamin Herrenschmidt
2007-09-18 23:08               ` Jeff Garzik
2007-09-18 23:27                 ` Linus Torvalds
2007-09-18 22:16       ` Benjamin Herrenschmidt
2007-09-18 22:25       ` Alan Cox
2007-09-19 15:07         ` Nick Kossifidis

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=43e72e890709181146s604e0f9fl8b0c16627469c77f@mail.gmail.com \
    --to=mcgrof@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=torvalds@linux-foundation.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