habanalabs: restructure hl_mmap
authorOded Gabbay <oded.gabbay@gmail.com>
Sat, 29 Aug 2020 08:51:39 +0000 (11:51 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 22 Sep 2020 15:49:51 +0000 (18:49 +0300)
commit3174ac9bb1045946ff563aa01d679809e87fb2db
tree19b93d14a98445319a8c790c4a6b12b9a21ef52d
parentf763946aefe67b3ea58696b75a930ba1ed886a83
habanalabs: restructure hl_mmap

Arrange the hl_mmap code to be more structured and expandable for the
future. Add better defines that describe our usage of the vm_pgoff.

Note that I shamelessly took the code and defines from the amdkfd driver
(my previous driver).

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/command_buffer.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h