Received: by 10.223.185.116 with SMTP id b49csp7627890wrg; Thu, 1 Mar 2018 08:27:01 -0800 (PST) X-Google-Smtp-Source: AG47ELvrIUSUeOCxE5/EzrAukm9pYgpxi6Le6BNqDazzdvn2dmAXQPrAvOyQYjKYCKff5O/ThTDr X-Received: by 2002:a17:902:d204:: with SMTP id t4-v6mr2454853ply.377.1519921620904; Thu, 01 Mar 2018 08:27:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519921620; cv=none; d=google.com; s=arc-20160816; b=GnHCQzOSbHflcyN6yGzSo5lg04Kb7ib7U2hqA7pPRuaqXBdkCYqAuvXvdDBk/37RSL +8wJyusEQwlQnvoJM7LP3a0c6ZgXVOsJmj4iEOI4pmcJskq2Q7ex5G/rlLbMyVKwrw4h K+TyAS06Ukz5ZaArgcG7w2Czngrhc9msn/duIUpymZJjmWD/LlJCn7PV33BNXOXmYbl0 WF9wJwdFpxkePDICk4ZcRX08pkO+WYF50+o2XX+hycyyIB7fQR96LBhjHrOzeGLriYFM 1JyNtzOpVBzZlm8Fpa/Vswos+xPg92mhRn8ZBVqJVISGvtiX3m6TlkZjsRcJm5Qu2IK/ F1+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=sqnuwsqWwmdvrfACd7LE39ynzZ0aitsI0IuRp5+UIxQ=; b=XBGRBBGo3LwpWpaoABDvvTZBj0l+PFeHxrQugkVxweJ5GsLccYKLH4TMpd2DLJein7 j0vdJTayA96UZpPwW9m/+pFfpAqWceCZcqUVguJF73YpONbvV+74XG7MZJiymuQpy5dC vzwVnt95R3o5sBLCb60plXDPoAhWMxwi08GRvxhoNmo3qNWdJDg1tRSo1gumrIlqzFYX uTGdCUgCKXjxpoZCssnYxA0sec7jeuMzh0beawTMFvnaML9H6MtUZmPXfA4/u0+OcdXT DckbFupc/sqsK+xWG1rwILgEE3/zrJ1JA4GhH7A5pZuIf2mSgS8CfqvJSIuVC0pivkYn 6ovA== ARC-Authentication-Results: i=1; mx.google.com; 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 w10-v6si421355plq.458.2018.03.01.08.26.46; Thu, 01 Mar 2018 08:27:00 -0800 (PST) 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; 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 S1033048AbeCAQYt (ORCPT + 99 others); Thu, 1 Mar 2018 11:24:49 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:40168 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032974AbeCAQYW (ORCPT ); Thu, 1 Mar 2018 11:24:22 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w21GIhrg028304; Thu, 1 Mar 2018 17:24:20 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2gbwb1dpk3-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 01 Mar 2018 17:24:20 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 48B6E3A; Thu, 1 Mar 2018 16:24:19 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag7node2.st.com [10.75.127.20]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 32D2151FF; Thu, 1 Mar 2018 16:24:19 +0000 (GMT) Received: from localhost (10.75.127.44) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 1 Mar 2018 17:24:18 +0100 From: Loic Pallardy To: , CC: , , , , Loic Pallardy Subject: [PATCH v3 12/13] rpmsg: virtio: allocate buffer from parent Date: Thu, 1 Mar 2018 17:23:59 +0100 Message-ID: <1519921440-21356-13-git-send-email-loic.pallardy@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519921440-21356-1-git-send-email-loic.pallardy@st.com> References: <1519921440-21356-1-git-send-email-loic.pallardy@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-01_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 82b8300..6dd25c6 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -920,7 +920,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) { -- 1.9.1