]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/pci-dma_64.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6] / arch / x86 / kernel / pci-dma_64.c
index 9576a2eb375ed81f5aee52e657676cd74dbad4f9..393e2725a6e31a386a9b28817317990ef5d79871 100644 (file)
@@ -7,11 +7,12 @@
 #include <linux/string.h>
 #include <linux/pci.h>
 #include <linux/module.h>
+#include <linux/dmar.h>
 #include <asm/io.h>
 #include <asm/iommu.h>
 #include <asm/calgary.h>
 
-int iommu_merge __read_mostly = 0;
+int iommu_merge __read_mostly = 1;
 EXPORT_SYMBOL(iommu_merge);
 
 dma_addr_t bad_dma_address __read_mostly;
@@ -51,11 +52,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
 {
        struct page *page;
        int node;
-#ifdef CONFIG_PCI
-       if (dev->bus == &pci_bus_type)
-               node = pcibus_to_node(to_pci_dev(dev)->bus);
-       else
-#endif
+
+       node = dev_to_node(dev);
+       if (node == -1)
                node = numa_node_id();
 
        if (node < first_node(node_online_map))
@@ -307,6 +306,8 @@ void __init pci_iommu_alloc(void)
        detect_calgary();
 #endif
 
+       detect_intel_iommu();
+
 #ifdef CONFIG_SWIOTLB
        pci_swiotlb_init();
 #endif
@@ -318,6 +319,8 @@ static int __init pci_iommu_init(void)
        calgary_iommu_init();
 #endif
 
+       intel_iommu_init();
+
 #ifdef CONFIG_IOMMU
        gart_iommu_init();
 #endif