]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/amd_iommu.c
Merge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / amd_iommu.c
index 34e4d112b1ef1bf54720a17f71756f8dd1394dfa..a8fd9ebdc8e25232e66b4d28a10edc0a70b8b151 100644 (file)
@@ -295,7 +295,7 @@ static int iommu_flush_pages(struct amd_iommu *iommu, u16 domid,
                u64 address, size_t size)
 {
        int s = 0;
-       unsigned pages = iommu_num_pages(address, size);
+       unsigned pages = iommu_num_pages(address, size, PAGE_SIZE);
 
        address &= PAGE_MASK;
 
@@ -680,7 +680,8 @@ static struct dma_ops_domain *dma_ops_domain_alloc(struct amd_iommu *iommu,
            iommu->exclusion_start < dma_dom->aperture_size) {
                unsigned long startpage = iommu->exclusion_start >> PAGE_SHIFT;
                int pages = iommu_num_pages(iommu->exclusion_start,
-                                           iommu->exclusion_length);
+                                           iommu->exclusion_length,
+                                           PAGE_SIZE);
                dma_ops_reserve_addresses(dma_dom, startpage, pages);
        }
 
@@ -935,7 +936,7 @@ static dma_addr_t __map_single(struct device *dev,
        unsigned long align_mask = 0;
        int i;
 
-       pages = iommu_num_pages(paddr, size);
+       pages = iommu_num_pages(paddr, size, PAGE_SIZE);
        paddr &= PAGE_MASK;
 
        if (align)
@@ -980,7 +981,7 @@ static void __unmap_single(struct amd_iommu *iommu,
        if ((dma_addr == 0) || (dma_addr + size > dma_dom->aperture_size))
                return;
 
-       pages = iommu_num_pages(dma_addr, size);
+       pages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
        dma_addr &= PAGE_MASK;
        start = dma_addr;