Re: [PATCH 04/12] accel/habanalabs/gaudi2: fix missing check of kernel ctx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/07/2023 14:12, Oded Gabbay wrote:
> If we are initializing the kernel context when we have a Gaudi2 device,
> we don't need to do any late initializing of that context with
> specific Gaudi2 code.
> 
> Signed-off-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
> ---
>   drivers/accel/habanalabs/gaudi2/gaudi2.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
> index 0f9e9522233f..70b8f744cd73 100644
> --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
> +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
> @@ -10650,6 +10650,9 @@ static int gaudi2_ctx_init(struct hl_ctx *ctx)
>   {
>   	int rc;
>   
> +	if (ctx->asid == HL_KERNEL_ASID_ID)
> +		return 0;
> +
>   	rc = gaudi2_mmu_prepare(ctx->hdev, ctx->asid);
>   	if (rc)
>   		return rc;

Reviewed-by: Ofir Bitton <obitton@xxxxxxxxx>




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux