From: Ralph Campbell <ralphc@pathscale.com>
To: David Miller <davem@davemloft.net>
Cc: muli@il.ibm.com, rdreier@cisco.com, linux-kernel@vger.kernel.org,
openib-general@openib.org
Subject: Re: [openib-general] Suggestions for how to remove bus_to_virt()
Date: Fri, 14 Jul 2006 16:45:19 -0700 [thread overview]
Message-ID: <1152920719.4572.398.camel@brick.pathscale.com> (raw)
In-Reply-To: <20060714.153503.123972494.davem@davemloft.net>
On Fri, 2006-07-14 at 15:35 -0700, David Miller wrote:
> From: Ralph Campbell <ralphc@pathscale.com>
> Date: Fri, 14 Jul 2006 15:27:07 -0700
>
> > Note that the current design only supports one IOMMU type in a system.
> > This could support multiple IOMMU types at the same time.
>
> This is not true, the framework allows multiply such types
> and in fact Sparc64 takes advantage of this. We have about
> 4 or 5 different PCI controllers, and the IOMMUs are slightly
> different in each.
I see. It looks like dma_map_single() is an inline call to
pci_map_single() which is a function call that can then
look at the device and tell what IOMMU function to call.
> Even with the standard PCI DMA mapping calls, we can gather the
> platform private information necessary to program the IOMMU
> appropriately for a given chipset.
>
> The dma_mapping_ops idea will never get accepted by folks like Linus,
> for reasons I've outlined in previous emails in this thread. So, it's
> best to look elsewhere for solutions to your problem, such as the
> ideas used by the USB and IEE1394 device layers.
The USB code won't work in my case because the USB system is
the one doing the memory allocation and IOMMU setup so it
can remember the kernel virtual address or physical pages used
to create the mapping.
In my case, the infiniband (SRP) code is doing the mapping and
only passing the dma_addr_t to the device driver at which point
I have no way to convert it back to a kernel virtual address.
I need to either change the IB device API to include mapping functions
or intercept the dma_* functions so I can save the inputs.
next prev parent reply other threads:[~2006-07-14 23:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 23:29 Suggestions for how to remove bus_to_virt() Ralph Campbell
2006-07-12 23:40 ` David Miller
2006-07-13 0:11 ` Roland Dreier
2006-07-13 0:40 ` David Miller
2006-07-13 5:46 ` [openib-general] " Muli Ben-Yehuda
2006-07-14 22:27 ` Ralph Campbell
2006-07-14 22:35 ` David Miller
2006-07-14 23:45 ` Ralph Campbell [this message]
2006-07-15 13:42 ` Stefan Richter
2006-07-13 7:45 ` Stefan Richter
2006-07-13 16:02 ` Roland Dreier
2006-07-13 16:37 ` Ralph Campbell
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=1152920719.4572.398.camel@brick.pathscale.com \
--to=ralphc@pathscale.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=openib-general@openib.org \
--cc=rdreier@cisco.com \
/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