Commit e0ad6bad authored by Moti Haimovski's avatar Moti Haimovski Committed by Oded Gabbay

accel/habanalabs: minimize error prints when mem map fails

This commit minimizes the "chain of errors" displayed when memory
mapping fails.
Signed-off-by: default avatarMoti Haimovski <mhaimovski@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
Reviewed-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
parent e38f88e4
...@@ -235,10 +235,8 @@ static int dma_map_host_va(struct hl_device *hdev, u64 addr, u64 size, ...@@ -235,10 +235,8 @@ static int dma_map_host_va(struct hl_device *hdev, u64 addr, u64 size,
} }
rc = hl_pin_host_memory(hdev, addr, size, userptr); rc = hl_pin_host_memory(hdev, addr, size, userptr);
if (rc) { if (rc)
dev_err(hdev->dev, "Failed to pin host memory\n");
goto pin_err; goto pin_err;
}
userptr->dma_mapped = true; userptr->dma_mapped = true;
userptr->dir = DMA_BIDIRECTIONAL; userptr->dir = DMA_BIDIRECTIONAL;
...@@ -1097,10 +1095,8 @@ static int map_device_va(struct hl_ctx *ctx, struct hl_mem_in *args, u64 *device ...@@ -1097,10 +1095,8 @@ static int map_device_va(struct hl_ctx *ctx, struct hl_mem_in *args, u64 *device
huge_page_size = hdev->asic_prop.pmmu_huge.page_size; huge_page_size = hdev->asic_prop.pmmu_huge.page_size;
rc = dma_map_host_va(hdev, addr, size, &userptr); rc = dma_map_host_va(hdev, addr, size, &userptr);
if (rc) { if (rc)
dev_err(hdev->dev, "failed to get userptr from va\n");
return rc; return rc;
}
rc = init_phys_pg_pack_from_userptr(ctx, userptr, rc = init_phys_pg_pack_from_userptr(ctx, userptr,
&phys_pg_pack, false); &phys_pg_pack, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment