Thread (39 messages) 39 messages, 7 authors, 2020-11-27

Re: [PATCH v6 04/17] misc/habana: Use FOLL_LONGTERM for userptr

From: Oded Gabbay <hidden>
Date: 2020-11-21 10:16:28
Also in: dri-devel, kvm, linux-media, linux-mm, linux-samsung-soc, lkml

On Thu, Nov 19, 2020 at 4:41 PM Daniel Vetter [off-list ref] wrote:
quoted hunk ↗ jump to hunk
These are persistent, not just for the duration of a dma operation.

Signed-off-by: Daniel Vetter <redacted>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Jérôme Glisse <redacted>
Cc: Jan Kara <jack@suse.cz>
Cc: Dan Williams <redacted>
Cc: linux-mm@kvack.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: Oded Gabbay <redacted>
Cc: Omer Shpigelman <redacted>
Cc: Ofir Bitton <redacted>
Cc: Tomer Tayar <redacted>
Cc: Moti Haimovski <redacted>
Cc: Daniel Vetter <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Pawel Piskorski <redacted>
Signed-off-by: Daniel Vetter <redacted>
---
 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
This patch and the previous one (03/17 misc/habana: Stop using
frame_vector helpers) are both:
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>

Thanks,
Oded

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help