diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2021-05-02 12:28:48 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-06-18 15:23:39 +0300 |
commit | c07c54e9de32ea8e89e7c2a112c14f59602a402c (patch) | |
tree | 16dba8df30a10771f2abcfae8f7a6599a876f2f4 /drivers/misc/habanalabs | |
parent | 3f18b8421fcd1e9370c240245756f6179d6f357c (diff) |
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: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r-- | drivers/misc/habanalabs/common/memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index 43924e1c0315..a7a8984e6af2 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -1612,7 +1612,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size, if (rc != npages) { 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) goto destroy_pages; npages = rc; |