diff mbox series

[v3,04/11] accel/ivpu: Add information about context on failure

Message ID 20230901094957.168898-5-stanislaw.gruszka@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series accel/ivpu: Update for -next 2023.08.25 | expand

Commit Message

Stanislaw Gruszka Sept. 1, 2023, 9:49 a.m. UTC
Add additional ctx number to error messages on mmu context
initialization failures.

Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
---
 drivers/accel/ivpu/ivpu_mmu_context.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jeffrey Hugo Sept. 1, 2023, 2:54 p.m. UTC | #1
On 9/1/2023 3:49 AM, Stanislaw Gruszka wrote:
> Add additional ctx number to error messages on mmu context
> initialization failures.

Looking at this for the first time, the "why" doesn't seem obvious. 
Based on my understanding, I suggest -

"Identify the mmu context that failed to initialize in the error 
messages. This allows the error to be correlated with a specific user 
during debug."

If you have a different idea for the wording, go for it.

I think I can safely assume this will be resolved.
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>

> 
> Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> ---
>   drivers/accel/ivpu/ivpu_mmu_context.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/accel/ivpu/ivpu_mmu_context.c b/drivers/accel/ivpu/ivpu_mmu_context.c
> index 8914e34fb54f..5b48983c7cf8 100644
> --- a/drivers/accel/ivpu/ivpu_mmu_context.c
> +++ b/drivers/accel/ivpu/ivpu_mmu_context.c
> @@ -490,13 +490,13 @@ int ivpu_mmu_user_context_init(struct ivpu_device *vdev, struct ivpu_mmu_context
>   
>   	ret = ivpu_mmu_context_init(vdev, ctx, ctx_id);
>   	if (ret) {
> -		ivpu_err(vdev, "Failed to initialize context: %d\n", ret);
> +		ivpu_err(vdev, "Failed to initialize context %u: %d\n", ctx_id, ret);
>   		return ret;
>   	}
>   
>   	ret = ivpu_mmu_set_pgtable(vdev, ctx_id, &ctx->pgtable);
>   	if (ret) {
> -		ivpu_err(vdev, "Failed to set page table: %d\n", ret);
> +		ivpu_err(vdev, "Failed to set page table for context %u: %d\n", ctx_id, ret);
>   		goto err_context_fini;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/accel/ivpu/ivpu_mmu_context.c b/drivers/accel/ivpu/ivpu_mmu_context.c
index 8914e34fb54f..5b48983c7cf8 100644
--- a/drivers/accel/ivpu/ivpu_mmu_context.c
+++ b/drivers/accel/ivpu/ivpu_mmu_context.c
@@ -490,13 +490,13 @@  int ivpu_mmu_user_context_init(struct ivpu_device *vdev, struct ivpu_mmu_context
 
 	ret = ivpu_mmu_context_init(vdev, ctx, ctx_id);
 	if (ret) {
-		ivpu_err(vdev, "Failed to initialize context: %d\n", ret);
+		ivpu_err(vdev, "Failed to initialize context %u: %d\n", ctx_id, ret);
 		return ret;
 	}
 
 	ret = ivpu_mmu_set_pgtable(vdev, ctx_id, &ctx->pgtable);
 	if (ret) {
-		ivpu_err(vdev, "Failed to set page table: %d\n", ret);
+		ivpu_err(vdev, "Failed to set page table for context %u: %d\n", ctx_id, ret);
 		goto err_context_fini;
 	}