habanalabs: print more info when failing to pin user memory
authorTomer Tayar <ttayar@habana.ai>
Thu, 10 Jun 2021 17:48:39 +0000 (20:48 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:42 +0000 (15:23 +0300)
commitf5d6e39eb2a933a1734cd8a620c8bcd52c4a0947
tree8a37972b823281b83ac96f79835ea53d367c5a1b
parent3002f467a0b0a70aec01d9f446da4ac8c6fda10b
habanalabs: print more info when failing to pin user memory

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