aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ioport.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-26 14:27:06 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-07-02 14:32:44 -0300
commit0092908d16c604b8207c2141ec64b0fa4473bb03 (patch)
tree13b972659276b1deac4a9e93a7947432ba97a974 /include/linux/ioport.h
parentmm: export alloc_pages_vma (diff)
downloadlinux-dev-0092908d16c604b8207c2141ec64b0fa4473bb03.tar.xz
linux-dev-0092908d16c604b8207c2141ec64b0fa4473bb03.zip
mm: factor out a devm_request_free_mem_region helper
Keep the physical address allocation that hmm_add_device does with the rest of the resource code, and allow future reuse of it without the hmm wrapper. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r--include/linux/ioport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index dd961882bc74..a02b290ca08a 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -285,6 +285,8 @@ static inline bool resource_overlaps(struct resource *r1, struct resource *r2)
return (r1->start <= r2->end && r1->end >= r2->start);
}
+struct resource *devm_request_free_mem_region(struct device *dev,
+ struct resource *base, unsigned long size);
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_IOPORT_H */