From patchwork Thu Mar 1 16:23:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Pallardy X-Patchwork-Id: 130326 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3005301edc; Thu, 1 Mar 2018 08:25:21 -0800 (PST) X-Google-Smtp-Source: AG47ELsIKLfwBVBxWl8s/hTmBExdiKW+MfnXx/oEZO0/xCCNGYpGgdTy/aMeVgEk9ngEz4RRhCnH X-Received: by 2002:a17:902:8d93:: with SMTP id v19-v6mr2398134plo.371.1519921521696; Thu, 01 Mar 2018 08:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519921521; cv=none; d=google.com; s=arc-20160816; b=k9FXDj5D+0o2hY2Iv8jN5Eb2p3GM2A2uuFt7/bOgXGJF7hLRTRLgaq7NhZQYDYIT7S ZhzhiN7PL54lYnOE9/Ok9VxGQVvaEwsFJVcsEKUtaIRCT7Xhcm5dJSAexhYDSA/zfy7w JYgl5Kajq+eYZ42Pf6NOlsZ/xpSbW9b0BC7na7oDaz5TxB/YtLQq91iEm4QpGbdoRyJj ZAqYUqqVxPcC2maPbukE1YxKsW769+oF1Q33Jd1tyd48rsatV3ZAATjNZO5//TxVengY mrvTMbp+YRa2wJeSNtWYgcR3m1tGb2WFvUnzkV5CcoYgNpczrVkJFwvdPSbg272wRu+y ftKw== 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 f18-v6si310931plr.726.2018.03.01.08.25.21; Thu, 01 Mar 2018 08:25:21 -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 S1033053AbeCAQYu (ORCPT + 28 others); Thu, 1 Mar 2018 11:24:50 -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 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(-) -- 1.9.1 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) {