habanalabs: make sure device mem alloc is page aligned
authorOhad Sharabi <osharabi@habana.ai>
Sun, 6 Feb 2022 06:50:43 +0000 (08:50 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:05 +0000 (14:22 +0200)
commite8458e20e0a3c426ed5ed3ce590c05718c8b8e8e
tree13574aa6245742d0408309ff8cccb7026b18b50b
parent100fcf1e111de3e8433777f305b042267c5ad79f
habanalabs: make sure device mem alloc is page aligned

Working with MMU that supports multiple page sizes requires that mapping
of a page of a certain size will be aligned to the same size (e.g. the
physical address of 32MB page shall be aligned to 32MB).

To achieve this the gen_poll allocation is now using the "align" variant
to comply with the alignment requirements.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/memory.c