x86, xen-swiotlb: Make Xen-SWIOTLB use IOMMU_INIT_* macros.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 26 Aug 2010 17:58:01 +0000 (13:58 -0400)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 26 Aug 2010 22:14:06 +0000 (15:14 -0700)
We utilize the IOMMU_INIT macros to create this dependency:

               [null]
                 |
       [pci_xen_swiotlb_detect]
                 |
       [pci_swiotlb_detect_override]
                 |
       [pci_swiotlb_detect_4gb]

In other words, we set 'pci_xen_swiotlb_detect' to be
the first detection to be run during start.

CC: Fujita Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
LKML-Reference: <1282845485-8991-7-git-send-email-konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/xen/pci-swiotlb-xen.c

index a013ec9d0c5410ebd8d1dbdaeec76fb182722d86..22471001b74c48dc26e499a549d4eb8549ed48e3 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <asm/xen/hypervisor.h>
 #include <xen/xen.h>
+#include <asm/iommu_table.h>
 
 int xen_swiotlb __read_mostly;
 
@@ -56,3 +57,7 @@ void __init pci_xen_swiotlb_init(void)
                dma_ops = &xen_swiotlb_dma_ops;
        }
 }
+IOMMU_INIT_FINISH(pci_xen_swiotlb_detect,
+                 0,
+                 pci_xen_swiotlb_init,
+                 0);