summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/goya/goya.c
diff options
context:
space:
mode:
authorOhad Sharabi <osharabi@habana.ai>2022-04-11 09:31:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-22 21:01:21 +0200
commit9e495e24003eec491141c80a9bd8fb4ea5edc171 (patch)
treeea6d47ab88848beae274abd97204e6eab53215d1 /drivers/misc/habanalabs/goya/goya.c
parent83617f5a87f4ad8403bf1177708fedc98b0a1059 (diff)
downloadlinux-9e495e24003eec491141c80a9bd8fb4ea5edc171.tar.bz2
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>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goya.c')
-rw-r--r--drivers/misc/habanalabs/goya/goya.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index f2d4362f6a46..4cde505a7416 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -5428,12 +5428,6 @@ static int goya_get_monitor_dump(struct hl_device *hdev, void *data)
return -EOPNOTSUPP;
}
-static int goya_mmu_prefetch_cache_range(struct hl_device *hdev, u32 flags, u32 asid, u64 va,
- u64 size)
-{
- return 0;
-}
-
static int goya_scrub_device_dram(struct hl_device *hdev, u64 val)
{
return -EOPNOTSUPP;
@@ -5480,7 +5474,7 @@ static const struct hl_asic_funcs goya_funcs = {
.write_pte = goya_write_pte,
.mmu_invalidate_cache = goya_mmu_invalidate_cache,
.mmu_invalidate_cache_range = goya_mmu_invalidate_cache_range,
- .mmu_prefetch_cache_range = goya_mmu_prefetch_cache_range,
+ .mmu_prefetch_cache_range = NULL,
.send_heartbeat = goya_send_heartbeat,
.debug_coresight = goya_debug_coresight,
.is_device_idle = goya_is_device_idle,