diff options
author | Jérôme Glisse <jglisse@redhat.com> | 2016-08-19 20:27:50 -0400 |
---|---|---|
committer | Jérôme Glisse <jglisse@redhat.com> | 2016-11-14 16:31:59 -0500 |
commit | 3361755d81cee00c1e7070b3a0e7901e4d1a60c0 (patch) | |
tree | 16e436288c2e906bca383a7cced053c253beed00 /include | |
parent | bbd9f38259f86cd05bc7b15c0614ec8a1984a3f8 (diff) |
mm/ZONE_DEVICE/devmem_pages_remove: allow early removal of device memory
HMM wants to remove device memory early before device tear down so add an
helper to do that.
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memremap.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/memremap.h b/include/linux/memremap.h index 469c88d4c0ee..b6f03e989f92 100644 --- a/include/linux/memremap.h +++ b/include/linux/memremap.h @@ -60,6 +60,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res, struct percpu_ref *ref, struct vmem_altmap *altmap, struct dev_pagemap **ppgmap, int flags); struct dev_pagemap *find_dev_pagemap(resource_size_t phys); +int devm_memremap_pages_remove(struct device *dev, struct dev_pagemap *pgmap); static inline bool is_addressable_page(const struct page *page) { @@ -88,6 +89,12 @@ static inline struct dev_pagemap *find_dev_pagemap(resource_size_t phys) return NULL; } +static inline int devm_memremap_pages_remove(struct device *dev, + struct dev_pagemap *pgmap) +{ + return -EINVAL; +} + static inline bool is_addressable_page(const struct page *page) { return true; |