habanalabs: do MMU prefetch as deferred work
authorOhad Sharabi <osharabi@habana.ai>
Mon, 11 Apr 2022 06:31:32 +0000 (09:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 19:01:21 +0000 (21:01 +0200)
commit9e495e24003eec491141c80a9bd8fb4ea5edc171
treeea6d47ab88848beae274abd97204e6eab53215d1
parent83617f5a87f4ad8403bf1177708fedc98b0a1059
habanalabs: do MMU prefetch as deferred work

When user requests to prefetch the MMU translations, the driver will
not block the user until prefetch is done.
Instead, the prefetch work will be delegated to a WQ which will do it
in the background.
This way, the prefetch may progress without blocking the user at all.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/memory.c
drivers/misc/habanalabs/common/mmu/mmu.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c