memremap: add a migrate_to_ram method to struct dev_pagemap_ops
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2019 12:27:11 +0000 (14:27 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 2 Jul 2019 17:32:44 +0000 (14:32 -0300)
commit897e6365cda6ba6356e83a3aaa68dec82ef4c548
tree91a2776f8a994aa78d9eb1f91fce9debc51b1727
parentf6a55e1a3fe6b3bb294a80a05437fcf86488d819
memremap: add a migrate_to_ram method to struct dev_pagemap_ops

This replaces the hacky ->fault callback, which is currently directly
called from common code through a hmm specific data structure as an
exercise in layering violations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/linux/hmm.h
include/linux/memremap.h
include/linux/swapops.h
kernel/memremap.c
mm/hmm.c
mm/memory.c