]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/misc/habanalabs/context.c
Merge tag 'usb-5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux.git] / drivers / misc / habanalabs / context.c
index 4804cdcf4c482767a294f734a7a702f7a1d52984..f4c92f110a721d045ecfdfa24bda5c0bc01ce8df 100644 (file)
@@ -26,6 +26,12 @@ static void hl_ctx_fini(struct hl_ctx *ctx)
                dma_fence_put(ctx->cs_pending[i]);
 
        if (ctx->asid != HL_KERNEL_ASID_ID) {
+               /*
+                * The engines are stopped as there is no executing CS, but the
+                * Coresight might be still working by accessing addresses
+                * related to the stopped engines. Hence stop it explicitly.
+                */
+               hdev->asic_funcs->halt_coresight(hdev);
                hl_vm_ctx_fini(ctx);
                hl_asid_free(hdev, ctx->asid);
        }