[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1152920719.4572.398.camel@brick.pathscale.com>
Date: Fri, 14 Jul 2006 16:45:19 -0700
From: Ralph Campbell <ralphc@...hscale.com>
To: David Miller <davem@...emloft.net>
Cc: muli@...ibm.com, rdreier@...co.com, linux-kernel@...r.kernel.org,
openib-general@...nib.org
Subject: Re: [openib-general] Suggestions for how to remove bus_to_virt()
On Fri, 2006-07-14 at 15:35 -0700, David Miller wrote:
> From: Ralph Campbell <ralphc@...hscale.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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists