David Gibson e2f89926f1 usb: Convert usb_packet_{map, unmap} to universal DMA helpers
The USB UHCI and EHCI drivers were converted some time ago to use the
pci_dma_*() helper functions.  However, this conversion was not complete
because in some places both these drivers do DMA via the usb_packet_map()
function in usb-libhw.c.  That function directly used
cpu_physical_memory_map().

Now that the sglist code uses DMA wrappers properly, we can convert the
functions in usb-libhw.c, thus conpleting the conversion of UHCI and EHCI
to use the DMA wrappers.

Note that usb_packet_map() invokes dma_memory_map() with a NULL invalidate
callback function.  When IOMMU support is added, this will mean that
usb_packet_map() and the corresponding usb_packet_unmap() must be called in
close proximity without dropping the qemu device lock - otherwise the guest
might invalidate IOMMU mappings while they are still in use by the device
code.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-27 16:33:25 -05:00
..
2012-06-21 16:06:11 +00:00
2012-06-24 01:04:47 +02:00
2012-02-07 22:11:04 +04:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-01-22 07:27:06 +00:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-03-17 16:30:06 +00:00
2012-06-21 16:06:11 +00:00
2012-06-21 16:06:11 +00:00
2012-03-14 22:20:26 +01:00
2012-01-13 10:55:56 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-19 13:24:44 +00:00
2012-02-15 09:39:21 -06:00
2012-03-24 13:06:41 +00:00
2012-02-15 09:39:21 -06:00
2011-12-06 09:56:41 +00:00
2012-06-22 10:46:12 +02:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-01-04 02:48:14 +01:00
2011-10-17 15:59:18 +02:00
2012-02-15 09:39:21 -06:00
2012-03-19 10:52:52 +00:00
2012-03-14 22:20:26 +01:00
2012-01-13 10:55:56 -06:00
2012-02-15 09:39:21 -06:00
2012-04-25 10:53:47 +03:00
2012-02-15 09:39:21 -06:00
2012-05-24 02:03:30 +04:00
2012-02-15 09:39:21 -06:00
2011-08-08 10:22:29 -05:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-02-17 11:13:05 +00:00
2012-06-21 18:45:24 +00:00
2012-06-15 14:03:42 +02:00
2012-02-10 10:44:52 +00:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2011-12-06 09:56:41 +00:00
2011-12-14 11:09:12 +00:00
2012-04-26 12:54:17 +04:00
2011-09-10 14:49:51 +00:00
2012-06-18 15:14:38 +02:00
2012-03-07 12:27:41 +02:00
2012-03-07 12:27:41 +02:00
2012-02-15 09:39:21 -06:00
2012-03-19 11:30:56 +00:00
2011-10-16 11:10:48 +00:00
2012-03-30 08:14:11 -05:00
2012-03-30 08:14:11 -05:00
2012-02-24 13:36:04 -06:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-06-04 23:00:45 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2011-12-14 11:08:23 +00:00
2011-12-14 11:08:23 +00:00
2012-06-24 01:04:51 +02:00
2012-06-18 15:14:38 +02:00
2011-10-21 18:14:29 +02:00
2011-10-21 18:14:29 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2011-11-28 15:38:42 +02:00
2012-03-14 22:20:26 +01:00
2011-11-28 15:38:42 +02:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-04 23:00:41 +02:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-02-22 09:02:19 -06:00
2012-03-14 22:20:26 +01:00
2012-05-16 18:04:44 -03:00
2012-05-21 19:22:50 +03:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2011-08-08 10:22:29 -05:00
2011-11-28 15:38:41 +02:00
2012-02-15 09:39:21 -06:00
2012-03-15 16:54:21 +00:00
2012-02-15 09:39:21 -06:00
2012-03-24 13:06:41 +00:00
2011-11-28 15:38:41 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-22 10:49:55 +02:00
2012-06-15 14:03:42 +02:00
2011-11-24 18:32:03 +02:00
2012-06-21 16:06:10 +00:00
2011-08-22 10:22:03 -05:00
2011-08-22 10:22:03 -05:00
2012-01-27 10:50:50 -06:00
2012-02-15 09:39:21 -06:00
2012-02-17 09:58:22 -06:00
2012-02-17 09:58:22 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-03-30 10:31:23 +00:00
2012-02-15 09:39:21 -06:00
2011-12-14 11:08:23 +00:00
2011-12-14 11:08:23 +00:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-04-07 14:00:45 +00:00
2012-04-12 11:14:29 +01:00
2012-02-15 09:39:21 -06:00
2012-06-11 00:23:04 +02:00
2012-06-22 10:49:55 +02:00
2012-06-22 10:49:45 +02:00
2012-06-04 23:00:43 +02:00
2011-11-24 18:31:59 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-05-07 08:44:21 +02:00
2012-02-15 09:39:21 -06:00
2011-12-06 09:56:41 +00:00
2012-02-15 09:39:21 -06:00
2011-11-24 18:32:03 +02:00
2012-03-14 22:20:26 +01:00
2012-03-14 22:20:26 +01:00
2012-06-07 17:18:58 +03:00
2012-03-16 00:41:15 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-03-16 00:41:28 +02:00
2012-03-16 00:41:28 +02:00
2012-01-13 10:55:56 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-24 01:04:45 +02:00
2012-06-18 15:14:38 +02:00
2012-06-18 15:14:38 +02:00
2012-06-18 15:14:38 +02:00
2012-06-24 01:04:45 +02:00
2012-06-24 01:04:45 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-18 15:14:38 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-04 23:00:45 +02:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-22 10:46:12 +02:00
2012-02-04 12:45:10 +00:00
2012-06-22 10:46:12 +02:00
2012-06-22 10:46:12 +02:00
2012-06-22 10:49:55 +02:00
2012-06-22 10:46:12 +02:00
2012-02-04 12:45:10 +00:00
2012-04-11 13:19:32 +03:00
2012-02-15 09:39:21 -06:00
2012-03-16 00:45:23 +02:00
2012-06-18 15:14:38 +02:00
2012-04-25 10:53:47 +03:00
2012-05-21 15:40:50 -05:00
2012-02-15 09:39:21 -06:00
2012-03-14 22:20:26 +01:00
2012-06-22 10:49:55 +02:00
2012-01-22 07:27:06 +00:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-06-21 16:06:11 +00:00
2012-06-21 16:06:11 +00:00
2012-05-16 18:04:44 -03:00
2012-02-15 09:39:21 -06:00
2012-06-15 13:08:13 +02:00
2012-06-15 13:08:13 +02:00
2012-03-14 22:20:26 +01:00
2012-02-15 09:39:21 -06:00
2012-03-09 07:02:50 -06:00