From: "J.E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
To: Bjorn Helgaas <bjorn_helgaas@hp.com>
Cc: Greg KH <greg@kroah.com>, Miles Bader <miles@gnu.org>,
"J.E.J. Bottomley" <James.Bottomley@steeleye.com>,
Matthew Wilcox <willy@debian.org>,
"Adam J. Richter" <adam@yggdrasil.com>,
andmike@us.ibm.com, hch@lst.de, linux-kernel@vger.kernel.org,
mochel@osdl.org, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Untested port of parisc_device to generic device interface
Date: Wed, 13 Nov 2002 12:23:48 -0500 [thread overview]
Message-ID: <200211131723.gADHNmp02426@localhost.localdomain> (raw)
In-Reply-To: Message from Bjorn Helgaas <bjorn_helgaas@hp.com> of "Wed, 13 Nov 2002 09:32:00 MST." <200211130932.00864.bjorn_helgaas@hp.com>
> Absolutely. Boxes with multiple IOMMUs (at least ia64, sparc64,
> parisc) need to look up the correct IOMMU with which to map the
> allocated buffer. Typically this is in the pci_dev sysdata.
Actually, I think all of the DMA mapping api needs to become bus independent
and take a struct device * instead of a pci_dev. How this lookup/mapping is
done could be abstracted per architecture inside the DMA api internals.
We should also allow devices to do all the setup through bus generic
functions, but leave open the possibility that the driver may (once it knows
the bus type) obtain the pci_dev (or whatever) from the struct device if it
really, really has to muck with bus specific registers.
As far as the SCSI mid layer goes, all we really need from struct device is
the dma_mask for setting up the I/O bounce buffers.
The simplest way to do all of this is probably to add a pointer to the
dma_mask in struct device and make it point to the same thing in pci_dev. If
we find we need more than this per device, it could become a pointer to a
generic dma information structure later on.
Drivers need to advertise DMA conformance (at the moment, requires consistent
allocation, or fully writeback/invalidate compliant)
We should also adopt Adam's pointer approach to the sync/invalidate points so
we can treat a dma_alloc_consistent failure as a real failure and not clutter
the code with writeback/invalidate fallbacks.
The above changes would allow me to yank all of the pci_dev specific code out
of the scsi mid layer, and also introduce a mca_dev type, convert the 53c700
driver to using the generic dma API and *finally* get us to the point where I
don't have to use bounce buffers for highmem access on the MCA bus.
Since the 53c700 is also used by parisc (including some machines with
IOMMUs---which, unfortunately, I don't have access to), it probably makes an
ideal conversion test case.
This can probably all be wrappered so the current SCSI pci drivers don't
notice anything wrong.
James
next prev parent reply other threads:[~2002-11-13 17:24 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-09 4:51 [parisc-linux] Untested port of parisc_device to generic device interface Adam J. Richter
2002-11-09 5:21 ` Matthew Wilcox
2002-11-09 5:21 ` Matthew Wilcox
2002-11-09 6:03 ` Greg KH
2002-11-09 6:03 ` Greg KH
2002-11-09 15:33 ` J.E.J. Bottomley
2002-11-13 6:13 ` Greg KH
2002-11-13 7:46 ` Miles Bader
2002-11-13 7:52 ` Greg KH
2002-11-13 8:02 ` Miles Bader
2002-11-13 8:02 ` Miles Bader
2002-11-13 8:10 ` Greg KH
2002-11-13 8:10 ` Greg KH
2002-11-13 8:26 ` Miles Bader
2002-11-13 8:25 ` Greg KH
2002-11-13 8:25 ` Greg KH
2002-11-13 9:05 ` Miles Bader
2002-11-13 9:05 ` Miles Bader
2002-11-13 8:26 ` Miles Bader
2002-11-13 20:13 ` Grant Grundler
2002-11-13 20:21 ` J.E.J. Bottomley
2002-11-13 20:37 ` Grant Grundler
2002-11-13 20:37 ` Grant Grundler
2002-11-13 20:21 ` J.E.J. Bottomley
2002-11-13 20:13 ` Grant Grundler
2002-11-13 11:59 ` Ivan Kokshaysky
2002-11-13 12:36 ` Marc Zyngier
2002-11-13 12:36 ` Marc Zyngier
2002-11-13 11:59 ` Ivan Kokshaysky
2002-11-13 16:32 ` Bjorn Helgaas
2002-11-13 17:23 ` J.E.J. Bottomley [this message]
2002-11-13 20:33 ` Grant Grundler
2002-11-13 20:33 ` Grant Grundler
2002-11-13 20:44 ` J.E.J. Bottomley
2002-11-13 21:42 ` Grant Grundler
2002-11-13 21:42 ` Grant Grundler
2002-11-13 20:44 ` J.E.J. Bottomley
2002-11-13 17:23 ` J.E.J. Bottomley
2002-11-13 16:32 ` Bjorn Helgaas
2002-11-13 20:12 ` Grant Grundler
2002-11-13 20:12 ` Grant Grundler
2002-11-13 7:52 ` Greg KH
2002-11-13 7:46 ` Miles Bader
2002-11-13 6:13 ` Greg KH
2002-11-09 15:33 ` J.E.J. Bottomley
2002-11-09 7:58 ` Marc Zyngier
2002-11-09 7:58 ` Marc Zyngier
2002-11-09 18:04 ` Grant Grundler
2002-11-09 18:04 ` Grant Grundler
-- strict thread matches above, loose matches on Subject: below --
2002-11-10 5:20 Adam J. Richter
2002-11-10 5:20 Adam J. Richter
2002-11-10 1:50 Adam J. Richter
2002-11-10 1:50 Adam J. Richter
2002-11-10 0:23 Adam J. Richter
2002-11-10 2:01 ` J.E.J. Bottomley
2002-11-10 2:01 ` J.E.J. Bottomley
2002-11-10 2:15 ` Matthew Wilcox
2002-11-10 2:15 ` Matthew Wilcox
2002-11-10 0:23 Adam J. Richter
2002-11-09 12:22 Adam J. Richter
2002-11-09 12:22 Adam J. Richter
2002-11-09 4:51 Adam J. Richter
2002-11-09 1:28 Adam J. Richter
2002-11-09 1:28 Adam J. Richter
2002-11-09 1:56 ` Grant Grundler
2002-11-09 3:46 ` Matthew Wilcox
2002-11-09 17:02 ` Grant Grundler
2002-11-09 17:50 ` Matthew Wilcox
2002-11-09 19:03 ` Grant Grundler
2002-11-09 3:37 ` Matthew Wilcox
2002-11-09 3:37 ` Matthew Wilcox
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=200211131723.gADHNmp02426@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=James.Bottomley@steeleye.com \
--cc=adam@yggdrasil.com \
--cc=andmike@us.ibm.com \
--cc=bjorn_helgaas@hp.com \
--cc=greg@kroah.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=miles@gnu.org \
--cc=mochel@osdl.org \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=willy@debian.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