linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] habanalabs: print more info when failing to pin user memory
@ 2021-06-14 12:50 Oded Gabbay
  2021-06-14 12:50 ` [PATCH 2/9] habanalabs: zero complex structures using memset Oded Gabbay
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Oded Gabbay @ 2021-06-14 12:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tomer Tayar

From: Tomer Tayar <ttayar@habana.ai>

pin_user_pages_fast() might fail and return a negative number, or pin
less pages than requested and return the number of the pages that were
pinned.
For the latter, it is informative to print also the memory size and the
number of requested pages.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/misc/habanalabs/common/memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c
index a7a8984e6af2..1cff1887e2e8 100644
--- a/drivers/misc/habanalabs/common/memory.c
+++ b/drivers/misc/habanalabs/common/memory.c
@@ -1612,8 +1612,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size,
 
 	if (rc != npages) {
 		dev_err(hdev->dev,
-			"Failed (%d) to pin host memory with user ptr 0x%llx\n",
-			rc, addr);
+			"Failed (%d) to pin host memory with user ptr 0x%llx, size 0x%llx, npages %d\n",
+			rc, addr, size, npages);
 		if (rc < 0)
 			goto destroy_pages;
 		npages = rc;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-06-15  8:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 12:50 [PATCH 1/9] habanalabs: print more info when failing to pin user memory Oded Gabbay
2021-06-14 12:50 ` [PATCH 2/9] habanalabs: zero complex structures using memset Oded Gabbay
2021-06-15  8:27   ` David Laight
2021-06-15  8:31     ` Oded Gabbay
2021-06-14 12:50 ` [PATCH 3/9] habanalabs: set rc as 'valid' in case of intentional func exit Oded Gabbay
2021-06-14 12:50 ` [PATCH 4/9] habanalabs: remove node from list before freeing the node Oded Gabbay
2021-06-14 12:50 ` [PATCH 5/9] habanalabs/gaudi: update coresight configuration Oded Gabbay
2021-06-14 12:50 ` [PATCH 6/9] habanalabs/gaudi: set the correct rc in case of err Oded Gabbay
2021-06-14 12:50 ` [PATCH 7/9] habanalabs: added open_stats info ioctl Oded Gabbay
2021-06-14 12:50 ` [PATCH 8/9] habanalabs/goya: add '__force' attribute to suppress false alarm Oded Gabbay
2021-06-14 12:51 ` [PATCH 9/9] habanalabs/gaudi: print last QM PQEs on error Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).