]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/pci-dma.c
x86: make e820_end return max ram type only for 32 bit
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / pci-dma.c
index 3c43109ba054f7c2205114f9f256a2155f61dce1..8467ec2320f178584afb402cfb2b48859a3eb48e 100644 (file)
@@ -7,6 +7,7 @@
 #include <asm/dma.h>
 #include <asm/gart.h>
 #include <asm/calgary.h>
+#include <asm/amd_iommu.h>
 
 int forbid_dac __read_mostly;
 EXPORT_SYMBOL(forbid_dac);
@@ -74,7 +75,7 @@ early_param("dma32_size", parse_dma32_size_opt);
 void __init dma32_reserve_bootmem(void)
 {
        unsigned long size, align;
-       if (end_pfn <= MAX_DMA32_PFN)
+       if (max_pfn <= MAX_DMA32_PFN)
                return;
 
        /*
@@ -93,7 +94,7 @@ void __init dma32_reserve_bootmem(void)
 static void __init dma32_free_bootmem(void)
 {
 
-       if (end_pfn <= MAX_DMA32_PFN)
+       if (max_pfn <= MAX_DMA32_PFN)
                return;
 
        if (!dma32_bootmem_ptr)
@@ -123,6 +124,8 @@ void __init pci_iommu_alloc(void)
 
        detect_intel_iommu();
 
+       amd_iommu_detect();
+
 #ifdef CONFIG_SWIOTLB
        pci_swiotlb_init();
 #endif
@@ -503,6 +506,8 @@ static int __init pci_iommu_init(void)
 
        intel_iommu_init();
 
+       amd_iommu_init();
+
 #ifdef CONFIG_GART_IOMMU
        gart_iommu_init();
 #endif