Re: [openib-general] Suggestions for how to remove bus_to_virt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-07-14 at 15:35 -0700, David Miller wrote:
> From: Ralph Campbell <[email protected]>
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux