]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/vfio/vfio_iommu_spapr_tce.c
Merge tag 'for-5.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
[linux.git] / drivers / vfio / vfio_iommu_spapr_tce.c
index 3b18fa4d090a301e051f6057a31794a621f01585..26cef65b41e7a167cbc500d672e093e851c59504 100644 (file)
@@ -176,13 +176,13 @@ static long tce_iommu_register_pages(struct tce_container *container,
 }
 
 static bool tce_page_is_contained(struct mm_struct *mm, unsigned long hpa,
-               unsigned int page_shift)
+               unsigned int it_page_shift)
 {
        struct page *page;
        unsigned long size = 0;
 
-       if (mm_iommu_is_devmem(mm, hpa, page_shift, &size))
-               return size == (1UL << page_shift);
+       if (mm_iommu_is_devmem(mm, hpa, it_page_shift, &size))
+               return size == (1UL << it_page_shift);
 
        page = pfn_to_page(hpa >> PAGE_SHIFT);
        /*
@@ -190,7 +190,7 @@ static bool tce_page_is_contained(struct mm_struct *mm, unsigned long hpa,
         * a page we just found. Otherwise the hardware can get access to
         * a bigger memory chunk that it should.
         */
-       return (PAGE_SHIFT + compound_order(compound_head(page))) >= page_shift;
+       return page_shift(compound_head(page)) >= it_page_shift;
 }
 
 static inline bool tce_groups_attached(struct tce_container *container)