]> git.ipfire.org Git - thirdparty/kernel/linux.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)
commitd12a5e2458d49aad2b7d25766794eec95ae8f6f1
treee4875f149c268052985d72e5b4b8b175a46f6189
parentf650a95b71026f5940804f273f9c36b60634131f
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