Merge tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi
[linux-2.6-microblaze.git] / include / linux / migrate.h
index 3e546cb..540998d 100644 (file)
@@ -180,6 +180,11 @@ static inline unsigned long migrate_pfn(unsigned long pfn)
        return (pfn << MIGRATE_PFN_SHIFT) | MIGRATE_PFN_VALID;
 }
 
+enum migrate_vma_direction {
+       MIGRATE_VMA_SELECT_SYSTEM = 1 << 0,
+       MIGRATE_VMA_SELECT_DEVICE_PRIVATE = 1 << 1,
+};
+
 struct migrate_vma {
        struct vm_area_struct   *vma;
        /*
@@ -199,11 +204,14 @@ struct migrate_vma {
 
        /*
         * Set to the owner value also stored in page->pgmap->owner for
-        * migrating out of device private memory.  If set only device
-        * private pages with this owner are migrated.  If not set
-        * device private pages are not migrated at all.
+        * migrating out of device private memory. The flags also need to
+        * be set to MIGRATE_VMA_SELECT_DEVICE_PRIVATE.
+        * The caller should always set this field when using mmu notifier
+        * callbacks to avoid device MMU invalidations for device private
+        * pages that are not being migrated.
         */
-       void                    *src_owner;
+       void                    *pgmap_owner;
+       unsigned long           flags;
 };
 
 int migrate_vma_setup(struct migrate_vma *args);