Skip to content

Commit 3824be1

Browse files
Tomer Tayarogabbay
authored andcommitted
accel/habanalabs: add debug prints to dump content of SG table for dma-buf
Add debug prints to dump the content of the SG table which is prepared when the dma-buf map op is called. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
1 parent d16945f commit 3824be1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/accel/habanalabs/common/memory.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,13 @@ static struct sg_table *alloc_sgt_from_device_pages(struct hl_device *hdev, u64
16791679
*/
16801680
sgt->orig_nents = 0;
16811681

1682+
dev_dbg(hdev->dev, "prepared SG table with %u entries for importer %s\n",
1683+
nents, dev_name(dev));
1684+
for_each_sgtable_dma_sg(sgt, sg, i)
1685+
dev_dbg(hdev->dev,
1686+
"SG entry %d: address %#llx, length %#x\n",
1687+
i, sg_dma_address(sg), sg_dma_len(sg));
1688+
16821689
return sgt;
16831690

16841691
err_unmap:

0 commit comments

Comments
 (0)