LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: Andrew Morton <akpm@osdl.org>, Greg KH <greg@kroah.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	linux-pci@atrey.karlin.mff.cuni.cz,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Subject: Re: [PATCH] Update Documentation/pci.txt v7
Date: Sun, 24 Dec 2006 11:16:22 -0800	[thread overview]
Message-ID: <20061224111622.e22bfd8a.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20061224060726.GC24131@colo.lackof.org>

On Sat, 23 Dec 2006 23:07:26 -0700 Grant Grundler wrote:

> +10. Legacy I/O port free driver
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That subject (and patches with similar subject) confuses me.
It's difficult to associate the adjectives correctly.
I suppose it just needs some hyphens/dashes, like:

10. Legacy-I/O-port-free driver

but that's ETOOMUCH.  Maybe ?

10.  Stop using legacy I/O space

> +Large servers may not be able to provide I/O port resources to all PCI
> +devices. I/O Port space is only 64KB on Intel Architecture[1] and is
> +likely also fragmented since the I/O base register of PCI-to-PCI
> +bridge will usually be aligned to a 4KB boundary[2]. On such systems,
> +pci_enable_device() and pci_request_region() will fail when
> +attempting to enable I/O Port regions that don't have I/O Port
> +resources assigned.

> +11. MMIO Space and "Write Posting"
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +Converting a driver from using I/O Port space to using MMIO space
> +often requires some additional changes. Specifically, "write posting"
> +needs to be handled. Many drivers (e.g. tg3, acenic, sym53c8xx_2)
> +already do this. I/O Port space guarantees write transactions reach the PCI
> +device before the CPU can continue. Writes to MMIO space allow the CPU
> +to continue before the transaction reaches the PCI device. HW weenies
> +call this "Write Posting" because the write completion is "posted" to
> +the CPU before the transaction has reached its destination.
> +
> +Thus, timing sensitive code should add readl() where the CPU is
> +expected to wait before doing other work.  The classic "bit banging"
> +sequence works fine for I/O Port space:
> +
> +       for (i=8; --i; val >>= 1) {

Please use:	i = 8;
to match CodingStyle.  (and below)

> +               outb(val & 1, ioport_reg);      /* write bit */
> +               udelay(10);
> +       }
> +
> +The same sequence for MMIO space should be:
> +
> +       for (i=8; --i; val >>= 1) {
> +               writeb(val & 1, mmio_reg);      /* write bit */
> +               readb(safe_mmio_reg);           /* flush posted write */
> +               udelay(10);
> +       }

Rest looks good to me.

---
~Randy

  reply	other threads:[~2006-12-24 19:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22  8:05 [PATCH 1/5] Update Documentation/pci.txt Hidetoshi Seto
2006-11-22  8:54 ` Arjan van de Ven
2006-11-22 18:28 ` Grant Grundler
2006-11-24  0:38   ` Hidetoshi Seto
2006-11-24  5:12     ` Grant Grundler
2006-11-24  6:05       ` Hidetoshi Seto
2006-12-06  7:26       ` Greg KH
2006-12-07  3:55         ` Grant Grundler
2006-12-10  7:25         ` Grant Grundler
2006-12-15 17:02           ` Greg KH
2006-12-18  7:11             ` Grant Grundler
2006-12-22 19:46               ` Randy Dunlap
2006-12-22 21:52                 ` Stefan Richter
2006-12-24  6:11                 ` Grant Grundler
2006-12-24  6:07               ` [PATCH] Update Documentation/pci.txt v7 Grant Grundler
2006-12-24 19:16                 ` Randy Dunlap [this message]
2006-12-25  7:59                   ` Grant Grundler
2006-12-25  8:06                 ` Grant Grundler
2006-12-25  8:08                   ` Grant Grundler
2007-01-02 21:45                     ` Greg KH
2007-01-03  7:15                       ` Grant Grundler
2006-12-25  9:04                   ` Kenji Kaneshige
2007-01-16 22:26                   ` patch pci-rework-documentation-pci.txt.patch added to gregkh-2.6 tree gregkh
2007-01-17  9:10                     ` Jiri Slaby
2007-01-17 19:21                       ` Greg KH

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=20061224111622.e22bfd8a.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=grundler@parisc-linux.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --subject='Re: [PATCH] Update Documentation/pci.txt v7' \
    /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).