Lines Matching refs:kernel_ctx
900 if ((hard_reset) && (hl_ctx_put(hdev->kernel_ctx) == 1)) in hl_device_reset()
901 hdev->kernel_ctx = NULL; in hl_device_reset()
941 if (hdev->kernel_ctx) { in hl_device_reset()
956 hdev->kernel_ctx = kzalloc(sizeof(*hdev->kernel_ctx), in hl_device_reset()
958 if (!hdev->kernel_ctx) { in hl_device_reset()
965 rc = hl_ctx_init(hdev, hdev->kernel_ctx, true); in hl_device_reset()
969 kfree(hdev->kernel_ctx); in hl_device_reset()
970 hdev->kernel_ctx = NULL; in hl_device_reset()
1162 hdev->kernel_ctx = kzalloc(sizeof(*hdev->kernel_ctx), GFP_KERNEL); in hl_device_init()
1163 if (!hdev->kernel_ctx) { in hl_device_init()
1170 rc = hl_ctx_init(hdev, hdev->kernel_ctx, true); in hl_device_init()
1173 kfree(hdev->kernel_ctx); in hl_device_init()
1267 if (hl_ctx_put(hdev->kernel_ctx) != 1) in hl_device_init()
1376 if ((hdev->kernel_ctx) && (hl_ctx_put(hdev->kernel_ctx) != 1)) in hl_device_fini()