OSDN Git Service

habanalabs: de-couple MMU and VM module initialization
authorOded Gabbay <oded.gabbay@gmail.com>
Wed, 29 May 2019 11:43:04 +0000 (14:43 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 29 May 2019 11:43:04 +0000 (14:43 +0300)
commit37d68ce5274fac8bb0a225f9005492bc53bd2393
tree47c2943ca7a381125e455da65e9de89f3edcb156
parent0b28d26b9dfa1f4010a8d84c1cb727de41be60d6
habanalabs: de-couple MMU and VM module initialization

This patch initializes the MMU S/W structures before the VM S/W
structures, instead of doing that as part of the VM S/W initialization.

This is done because we need to configure some MMU mappings for the kernel
context, before the VM is initialized. The VM initialization can't be
moved earlier because it depends on the size of the DRAM, which is
retrieved from the device CPU. Communication with the device CPU will
require the MMU mappings to be configured and hence the de-coupling.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/memory.c
drivers/misc/habanalabs/mmu.c