From patchwork Tue Jan 31 12:51:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Pallardy X-Patchwork-Id: 92976 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1910291qgi; Tue, 31 Jan 2017 04:57:21 -0800 (PST) X-Received: by 10.98.15.143 with SMTP id 15mr29484513pfp.100.1485867440990; Tue, 31 Jan 2017 04:57:20 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si15816876pfp.297.2017.01.31.04.57.20; Tue, 31 Jan 2017 04:57:20 -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 S1752141AbdAaM5O (ORCPT + 25 others); Tue, 31 Jan 2017 07:57:14 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:50831 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751821AbdAaM4f (ORCPT ); Tue, 31 Jan 2017 07:56:35 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id v0VCoG2D024060; Tue, 31 Jan 2017 13:55:47 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-.pphosted.com with ESMTP id 288k2hq0a6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 31 Jan 2017 13:55:47 +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 D755D31; Tue, 31 Jan 2017 12:55:46 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas4.st.com [10.75.90.69]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6FF252AFB; Tue, 31 Jan 2017 12:55:46 +0000 (GMT) Received: from localhost (10.201.23.23) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.444.0; Tue, 31 Jan 2017 13:55:45 +0100 From: Loic Pallardy To: , , CC: , , , , , , Subject: [PATCH v2 0/6] virtio_rpmsg: make rpmsg channel configurable Date: Tue, 31 Jan 2017 13:51:31 +0100 Message-ID: <1485867097-6960-1-git-send-email-loic.pallardy@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-31_05:, , 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 Loic Pallardy (6): 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: don't allocate buffer if provided by low level driver rpmsg: virtio_rpmsg: set buffer configuration to virtio drivers/rpmsg/virtio_rpmsg_bus.c | 176 +++++++++++++++++++++++++++++++------ include/linux/rpmsg/virtio_rpmsg.h | 32 +++++++ 2 files changed, 179 insertions(+), 29 deletions(-) create mode 100644 include/linux/rpmsg/virtio_rpmsg.h -- 1.9.1