[PATCH 1/6] accel/habanalabs: unmap mapped memory when TLB inv fails

Stanislaw Gruszka stanislaw.gruszka at linux.intel.com
Fri Mar 24 08:18:18 UTC 2023


On Thu, Mar 23, 2023 at 01:35:20PM +0200, Oded Gabbay wrote:
> From: Koby Elbaz <kelbaz at habana.ai>
> 
> Once a memory mapping is added to the page tables, it's followed by
> a TLB invalidation request which could potentially fail (HW failure).
> Removing the mapping is simply a part of this failure handling routine.
> TLB invalidation failure prints were updated to be more accurate.
> 
> Signed-off-by: Koby Elbaz <kelbaz at habana.ai>
> Reviewed-by: Oded Gabbay <ogabbay at kernel.org>
> Signed-off-by: Oded Gabbay <ogabbay at kernel.org>

Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka at linux.intel.com>

>  	rc = hl_mmu_invalidate_cache(hdev, false, MMU_OP_USERPTR | MMU_OP_SKIP_LOW_CACHE_INV);
> +	if (rc)
> +		goto err_mmu_unmap;

BTW: all other calls of that function ignore the error. Assume that is fine.

Regards
Stanislaw


More information about the dri-devel mailing list