lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] habanalabs: Use simplified API for p2p dist calc
On Mon, Sep 26, 2022 at 4:52 AM Bo Liu <liubo03@inspur.com> wrote:
>
> Use the simplified API that calculates distance between two devices.
>
> Signed-off-by: Bo Liu <liubo03@inspur.com>
> ---
> drivers/misc/habanalabs/common/memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c
> index ef28f3b37b93..99b1d6ce26ae 100644
> --- a/drivers/misc/habanalabs/common/memory.c
> +++ b/drivers/misc/habanalabs/common/memory.c
> @@ -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;
> --
> 2.27.0
>

Thanks, but this change is already queued for upstream in our internal tree.
Oded

\
 
 \ /
  Last update: 2022-09-26 13:02    [W:0.029 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site