diff options
author | Ofir Bitton <obitton@habana.ai> | 2021-11-09 14:12:38 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-12-26 09:59:06 +0300 |
commit | a1b838adb080ee4320f257a8280821e47bfb9a1f (patch) | |
tree | a51e49077994a2ea2e5cace80ce1483aa942d818 /drivers/misc/habanalabs/goya | |
parent | 6f61e47a68b403f8aa7956b4b6502511fcf19bb7 (diff) | |
download | linux-a1b838adb080ee4320f257a8280821e47bfb9a1f.tar.xz |
habanalabs: fix possible deadlock in cache invl failure
Currently there is a deadlock in driver in scenarios where MMU
cache invalidation fails. The issue is basically device reset
being performed without releasing the MMU mutex.
The solution is to skip device reset as it is not necessary.
In addition we introduce a slight code refactor that prints the
invalidation error from a single location.
Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/goya')
-rw-r--r-- | drivers/misc/habanalabs/goya/goya.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index 2347de2f426a..5e6998d21adb 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -5258,12 +5258,6 @@ static int goya_mmu_invalidate_cache(struct hl_device *hdev, bool is_hard, 1000, timeout_usec); - if (rc) { - dev_err_ratelimited(hdev->dev, - "MMU cache invalidation timeout\n"); - hl_device_reset(hdev, HL_DRV_RESET_HARD); - } - return rc; } |