Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp449303imm; Fri, 28 Sep 2018 00:57:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV61y5zuvJpzg/A7JROGOrQcVQlqVTxmvNt2c0qBEyEraXAtgsWL7hR8yC+IYfl35CyF5U42l X-Received: by 2002:a63:4c16:: with SMTP id z22-v6mr14266262pga.312.1538121452763; Fri, 28 Sep 2018 00:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538121452; cv=none; d=google.com; s=arc-20160816; b=VeoPnynYLw3kMzkYpm93ZFJ4wlKQBkirCxUrhHcao9mG9bcgVUnJKyla89Vnk1kUIB JFpR5VtfrCW77uK7c5R+svVEpELq8WqJ0nRvmi4KttnRpAOXHvXi1i3+Z4dvml8NRfKZ t4HGy2jA7gEFlV+KXsSv/qbFfDvAxbubnn+rV/eGPMoE71ox2sr2r2SX3nIagfLVGLJR gG7CkB6BLqxYAmADqa4ul1+TCiAlQ6TMIaUTYRn25qyauSUI8lp7LEbFOJWv+tf+MuqT Os+Zco6N6AYrtE470nL0371uZ9vzPHTjKGYtaGIsTXA1L2Q4KuNLLD2Bs9R3+IffWQrE HKPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WiagCQSalZ+pBspGCNboM4PLT8lf8Whrt7wUFmS3Mjs=; b=f67Lw4pZBoNuDQ2QNc6tRqSN0KWJ4e4q5GtRiY+IL+wqqTpUhxFDrjD1Z0Nu4FMekP 4/aZOp732bAdb1Wo8OaVJFJW1zR4KLdfNH4kfSVEM+E2KJXSz18HGyUB4fwX/sfLuxL2 E40UKw01B6NSYvIPMOj83tSHSD8K6TTj+uGTfbs8bZSBZjVUy+cOc7AeonmiTQFQrrNC pE/6boap1zQe+8fGCkI9cCBRHdzzevm7mcVi5OO/sWQ3Bzms6BDHHQcpu377qAaN5wlo s8ItPx09fyJ+mheBYIOBK7sWEK5LZ60owyIzhHUg3u84tKmOA4TSBZOrf7AlRv7L7G1s 6YkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=kH81cvsZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8-v6si3918190pgj.584.2018.09.28.00.57.16; Fri, 28 Sep 2018 00:57:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=kH81cvsZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729093AbeI1OTc (ORCPT + 99 others); Fri, 28 Sep 2018 10:19:32 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43259 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728804AbeI1OTc (ORCPT ); Fri, 28 Sep 2018 10:19:32 -0400 Received: by mail-wr1-f65.google.com with SMTP id z14-v6so5276714wrs.10 for ; Fri, 28 Sep 2018 00:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WiagCQSalZ+pBspGCNboM4PLT8lf8Whrt7wUFmS3Mjs=; b=kH81cvsZ3tofrCBNDv3Hu7a/nNxzyrljL8PuTadVBY6Fj+JRucF3+iUukmhbXQUS9M fiPgkSvJU/e5eJgSpnbKoDO3EOErK7526CaBlbVCndJCHtlF2vBLWBO/ZB4M9evgzBaa YUdchdapvxhRV0jXDg3YOmgtf7O89sJ9jOtTEpX/YjBO0W9YvDx2I9UNu7SmACjuEPiQ P0JbGXozfQ0mtlaNOyMquKEbOt/gYnJUh/4VALTki757qaJADG44OsXIMkyVjdKfBG1R HGQq3BysIjOLb32sqMuJGZqXRDJLknl7wGda8elhhfKTjoSx1IFj0orAdyHJDBaXx0gz JEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WiagCQSalZ+pBspGCNboM4PLT8lf8Whrt7wUFmS3Mjs=; b=QWVLfQv68bdgx4YqVH4HPoT5WqtkvX+zJ2iftjObg7AstjpW+PyADFfK3S8CdRR726 Bd3F2t4haRLIddMUuDZrND0RpLCeyhNGIEIMd3/IcIgCfm4swLINb4v5usu/idcB/+Y+ FXDhB6jpiGrQqj3tYfEykXv+nsqdnF+nqoWdvviuiDgwz2/IWnoQ16m+Ppe1qzjIwZz1 1kMKmVjVZzw/hyrb7boDlwpZNg051GyDyVlTh7CGXO1SUZC7Wk+dNsWCD7Pi5TvsHG2M 7WNEyKqM+rs9NtIYUPkfTMRTIapaPajW8oqER72P8tiZ4QDViEd0AWmo73mwzN6LwfPZ zqxQ== X-Gm-Message-State: ABuFfohIpHTDv41lVfa5yLr2Z2YFUzq//yKBZYNi5reL8Z0AF6ce66xD ATzZOv5OjBgQgSvydzTU1JsrkcSRhpt91hMgyxi1wA== X-Received: by 2002:adf:a969:: with SMTP id u96-v6mr11267291wrc.222.1538121421569; Fri, 28 Sep 2018 00:57:01 -0700 (PDT) MIME-Version: 1.0 References: <1532697292-14272-1-git-send-email-loic.pallardy@st.com> <1532697292-14272-18-git-send-email-loic.pallardy@st.com> In-Reply-To: <1532697292-14272-18-git-send-email-loic.pallardy@st.com> From: Anup Patel Date: Fri, 28 Sep 2018 13:26:50 +0530 Message-ID: Subject: Re: [PATCH v4 17/17] rpmsg: virtio: allocate buffer from parent To: Loic Pallardy Cc: Bjorn Andersson , Ohad Ben-Cohen , linux-remoteproc@vger.kernel.org, "linux-kernel@vger.kernel.org List" , arnaud pouliquen , Benjamin Gaignard , s-anna@ti.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 27, 2018 at 6:45 PM Loic Pallardy wrote: > > Remoteproc is now capable to create one specific sub-device per > virtio link to associate a dedicated memory pool. > This implies to change device used by virtio_rpmsg for > buffer allocation from grand-parent to parent. > > Signed-off-by: Loic Pallardy > --- > drivers/rpmsg/virtio_rpmsg_bus.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c > index 664f957..5c89201 100644 > --- a/drivers/rpmsg/virtio_rpmsg_bus.c > +++ b/drivers/rpmsg/virtio_rpmsg_bus.c > @@ -912,7 +912,7 @@ static int rpmsg_probe(struct virtio_device *vdev) > total_buf_space = vrp->num_bufs * vrp->buf_size; > > /* allocate coherent memory for the buffers */ > - bufs_va = dma_alloc_coherent(vdev->dev.parent->parent, > + bufs_va = dma_alloc_coherent(vdev->dev.parent, > total_buf_space, &vrp->bufs_dma, > GFP_KERNEL); > if (!bufs_va) { > @@ -980,7 +980,7 @@ static int rpmsg_probe(struct virtio_device *vdev) > return 0; > > free_coherent: > - dma_free_coherent(vdev->dev.parent->parent, total_buf_space, > + dma_free_coherent(vdev->dev.parent, total_buf_space, > bufs_va, vrp->bufs_dma); > vqs_del: > vdev->config->del_vqs(vrp->vdev); > @@ -1015,7 +1015,7 @@ static void rpmsg_remove(struct virtio_device *vdev) > > vdev->config->del_vqs(vrp->vdev); > > - dma_free_coherent(vdev->dev.parent->parent, total_buf_space, > + dma_free_coherent(vdev->dev.parent, total_buf_space, > vrp->rbufs, vrp->bufs_dma); > > kfree(vrp); > -- > 1.9.1 > Reviewed-by: Anup Patel Also, tried this patch on Linux running inside Guest/VM on Xvisor ARM/ARM64. Tested-by: Anup Patel Regards, Anup