habanalabs: use smallest possible alignment for virtual addresses
authorOmer Shpigelman <oshpigelman@habana.ai>
Sun, 28 Jun 2020 18:15:53 +0000 (21:15 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 22 Sep 2020 15:49:53 +0000 (18:49 +0300)
commit7c52fb0a096aecd6b7ef474e9037db2194570162
treec58cdd48542db0cb423363b24a4d5a0c10b94a26
parent1fb2f3743754994fec412f63a12cbc4d72f49e38
habanalabs: use smallest possible alignment for virtual addresses

Change the acquiring of a device virtual address for mapping by using the
smallest possible alignment, rather than the biggest, depending on the
page size used by the user for allocating the memory. This will lower the
virtual space memory consumption.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/memory.c