]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: fix mapping with page size bigger than 4KB
authorOmer Shpigelman <oshpigelman@habana.ai>
Thu, 14 Mar 2019 14:54:45 +0000 (16:54 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 14 Mar 2019 14:54:45 +0000 (16:54 +0200)
commitb9739c2d1fd7a31771485490d8f9e24eff11edc7
treee4875f149c268052985d72e5b4b8b175a46f6189
parent01f8343071ab47ca086475396bde0de51547afd7
habanalabs: fix mapping with page size bigger than 4KB

This patch fixes the mapping of virtual address to physical addresses on
architectures where PAGE_SIZE is bigger than 4KB.
The break down to the device page size was done only for the virtual
address while it should have been done for the physical address as well.
As a result virtual addresses were mapped to wrong physical address.
The fix is to apply the break down for the physical addresses as well in
order to get correct mappings.

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