OSDN Git Service

habanalabs: Avoid using a non-initialized MMU cache mutex
authorTomer Tayar <ttayar@habana.ai>
Mon, 13 May 2019 09:13:39 +0000 (12:13 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Fri, 24 May 2019 19:46:15 +0000 (22:46 +0300)
commit8d45f1de3994c566cb5ce9b3cb07ff1518e68ddb
tree8ef3ac8eb6677351981105bfd23ccea9a7c928fc
parent8438846cce61e284a22316c13aa4b63772963070
habanalabs: Avoid using a non-initialized MMU cache mutex

The MMU cache mutex is used in the ASIC hw_init() functions, but it is
initialized only later in hl_mmu_init().
This patch prevents it by moving the initialization to the
device_early_init() function.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/mmu.c