]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/commitdiff
Remove references to the old Xen-SWIOTLB code.
authorKonrad Rzeszutek Wilk <kliw@darnok.org>
Mon, 31 Aug 2009 19:32:08 +0000 (15:32 -0400)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 2 Sep 2009 18:22:53 +0000 (11:22 -0700)
All references to the old pass-through SWIOTLB DMA ops for
Dom0 are removed.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/kernel/pci-swiotlb.c
arch/x86/xen/Makefile
drivers/pci/xen-iommu.c

index 726737600ca23fcee3bdbfb45f549db084a2f998..9640e17c69c41270194f70ce61a92b615231ac9c 100644 (file)
@@ -11,8 +11,6 @@
 #include <asm/swiotlb.h>
 #include <asm/dma.h>
 
-#include <xen/swiotlb.h>
-
 int swiotlb __read_mostly;
 
 static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
@@ -51,9 +49,6 @@ void __init pci_swiotlb_init(void)
        if (!iommu_detected && !no_iommu && max_pfn > MAX_DMA32_PFN)
               swiotlb = 1;
 #endif
-       if (xen_wants_swiotlb())
-               swiotlb = 1;
-
        if (swiotlb_force)
                swiotlb = 1;
        if (swiotlb) {
index 8d7ed6b4948c1d26bd3d1896b0e2cc3316049d51..172438f86a02aaf01b3855e36318cf0bb8aaeba1 100644 (file)
@@ -12,4 +12,3 @@ obj-y         := enlighten.o setup.o multicalls.o mmu.o irq.o \
 obj-$(CONFIG_SMP)              += smp.o
 obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
 obj-$(CONFIG_XEN_DEBUG_FS)     += debugfs.o
-obj-$(CONFIG_PCI_XEN)          += pci-swiotlb.o
\ No newline at end of file
index b1a7d93d88c1239612eea05e8fe75dff4f1a8b23..5b7ef535588b10efe58923f89ae2361645aca29a 100644 (file)
@@ -13,7 +13,6 @@
 #include <xen/grant_table.h>
 #include <xen/page.h>
 #include <xen/xen-ops.h>
-#include <xen/swiotlb.h>
 
 #include <asm/iommu.h>
 #include <asm/swiotlb.h>
@@ -37,40 +36,6 @@ do {                                                 \
 } while (0)
 
 
-static int max_dma_bits = 32;
-
-void xen_swiotlb_fixup(void *buf, size_t size, unsigned long nslabs)
-{
-       int i, rc;
-       int dma_bits;
-
-       printk(KERN_DEBUG "xen_swiotlb_fixup: buf=%p size=%zu\n",
-               buf, size);
-
-       dma_bits = get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT) + PAGE_SHIFT;
-
-       i = 0;
-       do {
-               int slabs = min(nslabs - i, (unsigned long)IO_TLB_SEGSIZE);
-
-               do {
-                       rc = xen_create_contiguous_region(
-                               (unsigned long)buf + (i << IO_TLB_SHIFT),
-                               get_order(slabs << IO_TLB_SHIFT),
-                               dma_bits);
-               } while (rc && dma_bits++ < max_dma_bits);
-               if (rc)
-                       panic(KERN_ERR "xen_create_contiguous_region failed\n");
-
-               i += slabs;
-       } while(i < nslabs);
-}
-
-int xen_wants_swiotlb(void)
-{
-       return xen_initial_domain();
-}
-
 dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
 {
        return phys_to_machine(XPADDR(paddr)).maddr;
@@ -290,30 +255,6 @@ static struct dma_map_ops xen_dma_ops = {
        .is_phys = 0,
 };
 
-static struct dma_map_ops xen_swiotlb_dma_ops = {
-       .dma_supported = swiotlb_dma_supported,
-
-       .alloc_coherent = xen_alloc_coherent,
-       .free_coherent = xen_free_coherent,
-
-       .map_page = swiotlb_map_page,
-       .unmap_page = swiotlb_unmap_page,
-
-       .map_sg = swiotlb_map_sg_attrs,
-       .unmap_sg = swiotlb_unmap_sg_attrs,
-
-       .mapping_error = swiotlb_dma_mapping_error,
-
-       .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
-       .sync_single_for_device = swiotlb_sync_single_for_device,
-       .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
-       .sync_single_range_for_device = swiotlb_sync_single_range_for_device,
-       .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
-       .sync_sg_for_device = swiotlb_sync_sg_for_device,
-
-       .is_phys = 0,
-};
-
 void __init xen_iommu_init(void)
 {
        if (!xen_pv_domain())
@@ -323,10 +264,5 @@ void __init xen_iommu_init(void)
 
        force_iommu = 0;
        dma_ops = &xen_dma_ops;
-
-       if (swiotlb) {
-               printk(KERN_INFO "Xen: Enabling DMA fallback to swiotlb\n");
-               dma_ops = &xen_swiotlb_dma_ops;
-       }
 }