From patchwork Tue Mar 28 11:49:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Pallardy X-Patchwork-Id: 96145 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1671236qgd; Tue, 28 Mar 2017 04:52:49 -0700 (PDT) X-Received: by 10.98.210.133 with SMTP id c127mr30495732pfg.83.1490701968925; Tue, 28 Mar 2017 04:52:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si3987886pge.334.2017.03.28.04.52.48; Tue, 28 Mar 2017 04:52:48 -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; 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 S1751855AbdC1LwE (ORCPT + 18 others); Tue, 28 Mar 2017 07:52:04 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:18723 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbdC1LwB (ORCPT ); Tue, 28 Mar 2017 07:52:01 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by m0046037.ppops.net (8.16.0.11/8.16.0.11) with SMTP id v2SBnc74015453; Tue, 28 Mar 2017 13:49:58 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-.pphosted.com with ESMTP id 29dm9kg275-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Mar 2017 13:49:58 +0200 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 00CB934; Tue, 28 Mar 2017 11:49:56 +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 D8E252945; Tue, 28 Mar 2017 11:49:56 +0000 (GMT) Received: from localhost (10.75.127.48) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 28 Mar 2017 13:49:56 +0200 From: Loic Pallardy To: , , CC: , , , , , Subject: [PATCH v4 0/5] virtio_rpmsg: make rpmsg channel configurable Date: Tue, 28 Mar 2017 13:49:42 +0200 Message-ID: <1490701787-15205-1-git-send-email-loic.pallardy@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG3NODE2.st.com (10.75.127.8) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-28_10:, , signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This goal of this series is to offer more flexibility for virtio_rpmsg communication link configuration. It should be possible to tune rpmsg buffer size per Rpmsg link, to provide selected configuration to coprocessor, to take into account coprocessor specificities like memory region. This series introduces an optional virtio rpmsg configuration structure, which will be managed as an extension of struct fw_rsc_vdev present in coprocessor firmware resource table. Structure access is possible thanks to virtio get and set API. This structure contains the different information to tune the link between the host and the coprocessor. Patch "rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address" has the same goal as Wendy's RFC [1]. I don't have tested Wendy's series with level driver buffer allocation. Last patch "rpmsg: virtio_rpmsg: set buffer configuration to virtio" has a dependency with remoteproc subdevice boot sequence as coprocessor resource table must be updated before coprocessor start. See [2] [1] http://www.spinics.net/lists/linux-remoteproc/msg00852.html [2] http://www.spinics.net/lists/linux-remoteproc/msg00826.html --- Changes from v1: - No more dependency with [2]. Coprocessor firmware should wait for first kick indicating virtio rpmsg link ready before accessing resource table information. - Correct issues reported by Suman - Fix warnings found by checkpatch with --strict option Changes from v2: - Fix warnings reported by kbuild test robot Changes from v3: After discussions with Bjorn, virtual address sharing between low level driver and virtio_rpmsg could be replaced by associated a dedicated memory region to vdev and changing virtio_rpmsg allocation from dev->parent->parent to dev->parent, i.e. vdev and not rproc device. The advantage of the solution is that there will be only few changes in virtio_rpmsg layer and it will be common with virtio_console driver. These will be part of a dedicated patch series. So v4 drops previous patch 5 "rpmsg: virtio_rpmsg: don't allocate buffer if provided by low level driver" dealing with buffer previously allocated and va fields from struct virtio_rpmsg_cfg. In addition, patch series has been rebased on kernel 4.11-rc4. Loic Pallardy (5): rpmsg: virtio_rpmsg: set rpmsg_buf_size customizable rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address include: virtio_rpmsg: add virtio rpmsg configuration structure rpmsg: virtio_rpmsg: get buffer configuration from virtio rpmsg: virtio_rpmsg: set buffer configuration to virtio drivers/rpmsg/virtio_rpmsg_bus.c | 123 +++++++++++++++++++++++++++++++++---- include/linux/rpmsg/virtio_rpmsg.h | 30 +++++++++ 2 files changed, 141 insertions(+), 12 deletions(-) create mode 100644 include/linux/rpmsg/virtio_rpmsg.h -- 1.9.1