Commit c07c54e9 authored by Oded Gabbay's avatar Oded Gabbay

habanalabs: better error print for pin failure

Print the user given pointer and error code on failure to get user
pages for easier debugging.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 3f18b842
...@@ -1612,7 +1612,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size, ...@@ -1612,7 +1612,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size,
if (rc != npages) { if (rc != npages) {
dev_err(hdev->dev, dev_err(hdev->dev,
"Failed to map host memory, user ptr probably wrong\n"); "Failed (%d) to pin host memory with user ptr 0x%llx\n",
rc, addr);
if (rc < 0) if (rc < 0)
goto destroy_pages; goto destroy_pages;
npages = rc; npages = rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment