]> 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)
commit16da4bb5907bb61926f0e0f75d2cd58afa870edf
treee4875f149c268052985d72e5b4b8b175a46f6189
parent2747d5aa67902f290da6cc2c7bd55019bf508c37
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