mm/dev_pfn: exclude MEMORY_DEVICE_PRIVATE while computing virtual address
[sfrench/cifs-2.6.git] / include / linux / pfn_t.h
index 7bb77850c65acd365958a26a387f78bd203c3c57..3c202a11a79e1c9b861f4c2206660e9a5b477151 100644 (file)
@@ -68,7 +68,7 @@ static inline phys_addr_t pfn_t_to_phys(pfn_t pfn)
 
 static inline void *pfn_t_to_virt(pfn_t pfn)
 {
-       if (pfn_t_has_page(pfn))
+       if (pfn_t_has_page(pfn) && !is_device_private_page(pfn_t_to_page(pfn)))
                return __va(pfn_t_to_phys(pfn));
        return NULL;
 }