Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
[firefly-linux-kernel-4.4.55.git] / drivers / pci / intel-iommu.c
index fb3a3f3fca7a4835aab7fef7bb45edd84a2df182..001b328adf804e1e75d9c561df9e704b424b5468 100644 (file)
@@ -733,8 +733,8 @@ static void dma_pte_clear_range(struct dmar_domain *domain, u64 start, u64 end)
        start &= (((u64)1) << addr_width) - 1;
        end &= (((u64)1) << addr_width) - 1;
        /* in case it's partial page */
-       start = PAGE_ALIGN(start);
-       end &= PAGE_MASK;
+       start &= PAGE_MASK;
+       end = PAGE_ALIGN(end);
        npages = (end - start) / VTD_PAGE_SIZE;
 
        /* we don't need lock here, nobody else touches the iova range */