[PATCH v6 04/17] misc/habana: Use FOLL_LONGTERM for userptr
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Nov 19 14:41:33 UTC 2020
These are persistent, not just for the duration of a dma operation.
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Jason Gunthorpe <jgg at ziepe.ca>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: John Hubbard <jhubbard at nvidia.com>
Cc: Jérôme Glisse <jglisse at redhat.com>
Cc: Jan Kara <jack at suse.cz>
Cc: Dan Williams <dan.j.williams at intel.com>
Cc: linux-mm at kvack.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-samsung-soc at vger.kernel.org
Cc: linux-media at vger.kernel.org
Cc: Oded Gabbay <oded.gabbay at gmail.com>
Cc: Omer Shpigelman <oshpigelman at habana.ai>
Cc: Ofir Bitton <obitton at habana.ai>
Cc: Tomer Tayar <ttayar at habana.ai>
Cc: Moti Haimovski <mhaimovski at habana.ai>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: Pawel Piskorski <ppiskorski at habana.ai>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/misc/habanalabs/common/memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c
index 0b220221873d..d08c41b90fec 100644
--- a/drivers/misc/habanalabs/common/memory.c
+++ b/drivers/misc/habanalabs/common/memory.c
@@ -1298,7 +1298,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size,
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) {
--
2.29.2
More information about the dri-devel
mailing list