habanalabs: fix resetting the DRAM BAR
authorOhad Sharabi <osharabi@habana.ai>
Thu, 1 Sep 2022 13:37:08 +0000 (16:37 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 19 Sep 2022 12:08:38 +0000 (15:08 +0300)
commit76925f55c9ba46faaf4054a8192dc5814bc2e0ab
tree1cf3de0ac976a4c82475acffbf798123688aab6b
parent0626fa1a4d311b55b5f20a90380915f1bc135607
habanalabs: fix resetting the DRAM BAR

Current code does not takes into account the new DRAM region base
and so calculated address is wrong and can lead to crush.

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/device.c