habanalabs: Use simplified API for p2p dist calc
PATCH 1/1 habanalabs: Use simplified API for p2p dist calc
Use the simplified API that calculates distance between two devices.
Signed-off-by Bo Liu <[email protected]>
--- drivers/misc/habanalabs/common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/habanalabs/common/memory.c +1 -1
@@ -1689,7 +1689,7 @@ static int hl_dmabuf_attach(struct dma_buf *dmabuf, hl_dmabuf = dmabuf->priv; hdev = hl_dmabuf->ctx->hdev; - rc =pci_p2pdma_distance_many (hdev->pdev, &attachment->dev,1 , true); + rc =pci_p2pdma_distance (hdev->pdev, attachment->dev, true);if (rc <0 ) attachment->peer2peer = false;
Signature · 1 line
2.27.0
Quoted 22 lines · Bo Liu
Use the simplified API that calculates distance between two devices.
Signed-off-by Bo Liu <[email protected]>--- drivers/misc/habanalabs/common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/habanalabs/common/memory.c +1
-2@@ -1689,7 +1689,7 @@ static int hl_dmabuf_attach(struct dma_buf *dmabuf, hl_dmabuf = dmabuf->priv; hdev = hl_dmabuf->ctx->hdev; - rc =pci_p2pdma_distance_many (hdev->pdev, &attachment->dev,1 , true); + rc =pci_p2pdma_distance (hdev->pdev, attachment->dev, true);if (rc <0 ) attachment->peer2peer = false; --
Quoted 2 lines
2.27.0
Thanks, but this change is already queued for upstream in our internal tree. Oded