aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hmm.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-07-25 17:56:46 -0700
committerJason Gunthorpe <jgg@mellanox.com>2019-07-26 11:10:53 -0300
commit9a4903e49e495bfd2650862dfae4178bebe4db9c (patch)
tree1e51233f6535642e0aa1dbfea20f4a3eba02a9f5 /include/linux/hmm.h
parentmm/hmm: a few more C style and comment clean ups (diff)
downloadlinux-dev-9a4903e49e495bfd2650862dfae4178bebe4db9c.tar.xz
linux-dev-9a4903e49e495bfd2650862dfae4178bebe4db9c.zip
mm/hmm: replace the block argument to hmm_range_fault with a flags value
This allows easier expansion to other flags, and also makes the callers a little easier to read. Link: https://lore.kernel.org/r/20190726005650.2566-4-rcampbell@nvidia.com Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ralph Campbell <rcampbell@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/linux/hmm.h')
-rw-r--r--include/linux/hmm.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/hmm.h b/include/linux/hmm.h
index 4f870f7017cb..89a141060e5b 100644
--- a/include/linux/hmm.h
+++ b/include/linux/hmm.h
@@ -407,12 +407,19 @@ int hmm_range_register(struct hmm_range *range,
unsigned long end,
unsigned page_shift);
void hmm_range_unregister(struct hmm_range *range);
+
+/*
+ * Retry fault if non-blocking, drop mmap_sem and return -EAGAIN in that case.
+ */
+#define HMM_FAULT_ALLOW_RETRY (1 << 0)
+
long hmm_range_snapshot(struct hmm_range *range);
-long hmm_range_fault(struct hmm_range *range, bool block);
+long hmm_range_fault(struct hmm_range *range, unsigned int flags);
+
long hmm_range_dma_map(struct hmm_range *range,
struct device *device,
dma_addr_t *daddrs,
- bool block);
+ unsigned int flags);
long hmm_range_dma_unmap(struct hmm_range *range,
struct vm_area_struct *vma,
struct device *device,