aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2020-11-27 17:41:18 +0100
committerDaniel Vetter <[email protected]>2021-01-12 14:15:09 +0100
commitd88a0c169bd535182547c54933a38b2afd553f44 (patch)
tree1f5b6a6046c6b9481750c59d880b9ae94cb52baa
parentd4cb19250aae16ab3031b9e59458932e5afe8081 (diff)
misc/habana: Use FOLL_LONGTERM for userptr
These are persistent, not just for the duration of a dma operation. Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Andrew Morton <[email protected]> Cc: John Hubbard <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Jan Kara <[email protected]> Cc: Dan Williams <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Oded Gabbay <[email protected]> Cc: Omer Shpigelman <[email protected]> Cc: Ofir Bitton <[email protected]> Cc: Tomer Tayar <[email protected]> Cc: Moti Haimovski <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Pawel Piskorski <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/misc/habanalabs/common/memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c
index c4ddba7ef368..78595f3e2439 100644
--- a/drivers/misc/habanalabs/common/memory.c
+++ b/drivers/misc/habanalabs/common/memory.c
@@ -1435,7 +1435,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size,
if (!userptr->pages)
return -ENOMEM;
- rc = pin_user_pages_fast(start, npages, FOLL_FORCE | FOLL_WRITE,
+ rc = pin_user_pages_fast(start, npages,
+ FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM,
userptr->pages);
if (rc != npages) {