[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functi
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions |
Date: |
Thu, 21 Jun 2012 08:43:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120601 Thunderbird/10.0.5 |
Hi,
>>> Why leave pci accessors and not implement usb_memory_rw() wrappers?
>>
>> Well, "usb" is a bit too generic, ehci and ohci would each need to have
>> their own sets of wrappers. But yes, that's possible... is it really
>> worth it ? There's nothing fundamentally wrong with using the dma_*
>> accessors.
>
> So is using the pci accessors wrong?
>
> I'm not saying you should go and convert every caller of the pci_
> functions, I just want a clear policy on what interface devices should use.
usb device emulations should use usb_packet_copy()
usb host adapters emulations should use either usb_packet_map() +
usb_packet_unmap(), or use usb_packet_addbuf(), then copy from/to the
buffer using whatever is approximate. For pci host controller that is
pci_memory_rw(). For ohci which exists in both pci and non-pci variants
it looks reasonable to me to get a iommu handle in bus-specific code,
then use dma_memory_rw with that handle directly in the common code paths.
cheers,
Gerd
- [Qemu-devel] [PATCH 00/13] iommu series, Benjamin Herrenschmidt, 2012/06/19
- [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/06/19
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Anthony Liguori, 2012/06/20
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/06/20
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Anthony Liguori, 2012/06/20
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/06/20
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Michael S. Tsirkin, 2012/06/21
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Anthony Liguori, 2012/06/21
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Michael S. Tsirkin, 2012/06/21
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/06/21
- Re: [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions,
Gerd Hoffmann <=
[Qemu-devel] [PATCH 05/13] iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 06/13] ide/ahci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 03/13] iommu: Add universal DMA helper functions, Benjamin Herrenschmidt, 2012/06/19