Device generic type case added for migrate_vma_pages and
migrate_vma_check_page helpers.
Both, generic and private device types have the same
conditions to decide to migrate pages from/to device
memory.

Signed-off-by: Alex Sierra <alex.sie...@amd.com>
---
 mm/migrate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 8c2430d3e77b..3b6aaba96fe6 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2602,7 +2602,7 @@ static bool migrate_vma_check_page(struct page *page)
                 * FIXME proper solution is to rework migration_entry_wait() so
                 * it does not need to take a reference on page.
                 */
-               return is_device_private_page(page);
+               return is_device_page(page);
        }
 
        /* For file back page */
@@ -3064,10 +3064,10 @@ void migrate_vma_pages(struct migrate_vma *migrate)
                mapping = page_mapping(page);
 
                if (is_zone_device_page(newpage)) {
-                       if (is_device_private_page(newpage)) {
+                       if (is_device_page(newpage)) {
                                /*
-                                * For now only support private anonymous when
-                                * migrating to un-addressable device memory.
+                                * For now only support private and generic
+                                * anonymous when migrating to device memory.
                                 */
                                if (mapping) {
                                        migrate->src[i] &= ~MIGRATE_PFN_MIGRATE;
-- 
2.17.1

Reply via email to