Lines Matching refs:kernel_ctx
977 if (hl_ctx_put(hdev->kernel_ctx) == 1) in hl_device_reset()
978 hdev->kernel_ctx = NULL; in hl_device_reset()
1013 if (hdev->kernel_ctx) { in hl_device_reset()
1028 hdev->kernel_ctx = kzalloc(sizeof(*hdev->kernel_ctx), in hl_device_reset()
1030 if (!hdev->kernel_ctx) { in hl_device_reset()
1038 rc = hl_ctx_init(hdev, hdev->kernel_ctx, true); in hl_device_reset()
1042 kfree(hdev->kernel_ctx); in hl_device_reset()
1043 hdev->kernel_ctx = NULL; in hl_device_reset()
1245 hdev->kernel_ctx = kzalloc(sizeof(*hdev->kernel_ctx), GFP_KERNEL); in hl_device_init()
1246 if (!hdev->kernel_ctx) { in hl_device_init()
1253 rc = hl_ctx_init(hdev, hdev->kernel_ctx, true); in hl_device_init()
1256 kfree(hdev->kernel_ctx); in hl_device_init()
1360 if (hl_ctx_put(hdev->kernel_ctx) != 1) in hl_device_init()
1484 if ((hdev->kernel_ctx) && (hl_ctx_put(hdev->kernel_ctx) != 1)) in hl_device_fini()