Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2967187pxv; Mon, 12 Jul 2021 06:21:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwem71oPuciY8fByQf1LUZqBgJ3D/4TFj1IBqTpvWI0UY2rOiQ5gZR9GgoHGtA0DCn0kGlb X-Received: by 2002:a17:906:f294:: with SMTP id gu20mr15061523ejb.292.1626096082405; Mon, 12 Jul 2021 06:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626096082; cv=none; d=google.com; s=arc-20160816; b=HSv5LhqGhy7wImFZaYO73TSbi5ZJmJIeJAqQHGpDGQy0dsjgfk2KRCs6OLN3a9xylh L0fqWjRZz5Z4GdhdohPZPyY4/Ur5loaXS9yNDBqRFuosFhGwarvB7ax9qnv+co07DhXm NgKIYmr/SPUEIsrGBc2DIMwuT++Jufah5JohU+TboM6P8M31zCtLDH0hyN+Xbi0Pw2va XyxYFYONfzt3r770rMt0jxcG1RzPbPde66XyPmLdvQV6cM/c4C1U03Wt5TVYQtUE1NDk twQxDyWUrVd5daAti+TARkyVkpG1bdIEdql6GXis5YRMGkQKgVfXRnbMzIxUWj/fc6bU R7TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=gwVx0e9bF4mpE4juE3HjRfUvca3Xplg3oe0uE8gGxtc=; b=BztYX3tM+nHN+KXYOhExPdMA/fNqhOlgB/7sITMfUPOpkT9/YjHq9TfjsqWEF7ronn hCBM1Uxx+UgPVRiIBhR18t1S7S+pjqH/QJ7jXPZX+zXf7IFrDJaZt9kDN0FUYWS9FckV EWs/Iup09TtE9p5DO3qx906ZORtWATYb9l+1NqTcyHw/nmr1/dlTmEx4kUzFfzSaAasY qi3Zh61AEHIpYA9B8vexWaC9x5n2JKPbuRyZUUQneycdd6e5ewyGB+OfRTFaDQKVC0J/ +BNvM8uBN/JJRwnC5+Sh9fhtP3GNCmrk9zZetVMr/iZK3AqnR96/KBgsVroWEZusIio3 H8PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=07OfkduQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si15564470ejs.611.2021.07.12.06.20.59; Mon, 12 Jul 2021 06:21:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=07OfkduQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232274AbhGLNW3 (ORCPT + 99 others); Mon, 12 Jul 2021 09:22:29 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:6504 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229479AbhGLNW2 (ORCPT ); Mon, 12 Jul 2021 09:22:28 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16CDHlpo024628; Mon, 12 Jul 2021 15:19:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=gwVx0e9bF4mpE4juE3HjRfUvca3Xplg3oe0uE8gGxtc=; b=07OfkduQFJJbkZbNR6cwf2IG87kXrsTtWIsy0K931IcZMQsHitivJXgI3EerFYgBP92N YAghubr0tl/LeMAgQX+r2pxIu0760TnTSdwP4VGnLh0kA4xgGzMvBsl7ptODZcUGi0EC BdcS+TjiYvEOkDPabeaXcRiDmdZy+SpQvkMcJIVgqcu6Das4eFL4yK20VmC3rqWkSLmd vR/WqrKqVvfKhYYK6FlxX2h7yAMVXymYRZn+dcz9VCRdy+ewdU6nvpT2pjguElRdYBA2 EpoRLQt6dxh944lygDxACKXNOFvf68V5QAPAP5RiZY35G5wqlvMTYE70XHoxJoJudzJe HA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 39rh6w9vn2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jul 2021 15:19:35 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D7E3310002A; Mon, 12 Jul 2021 15:19:33 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BB4812291D5; Mon, 12 Jul 2021 15:19:33 +0200 (CEST) Received: from localhost (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Jul 2021 15:19:33 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier CC: , , , , Subject: [PATCH v4 0/4] rpmsg: char: introduce the rpmsg-raw channel Date: Mon, 12 Jul 2021 15:18:56 +0200 Message-ID: <20210712131900.24752-1-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-12_08:2021-07-12,2021-07-12 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Purpose: Allow the remote processor to instantiate a /dev/rpmsgX interface relying on the NS announcement of the "rpmsg-raw" service. This patchet is extracted from the series [1] with rework to add rpmsg_create_default_ept helper. Aim: There is no generic sysfs interface based on RPMsg that allows a user application to communicate with a remote processor in a simple way. The rpmsg_char dev solves a part of this problem by allowing an endpoint to be created on the local side. But it does not take advantage of the NS announcement mechanism implemented for some backends such as the virtio backend. So it is not possible to probe it from a remote initiative. Extending the char rpmsg device to support NS announcement makes the rpmsg_char more generic. By announcing a "rpmg-raw" service, the firmware of a remote processor will be able to instantiate a /dev/rpmsgX interface providing to the user application a basic link to communicate with it without any knowledge of the rpmsg protocol. Implementation details: - Register a rpmsg driver for the rpmsg_char driver, associated to the "rpmsg-raw" channel service. - In case of rpmsg char device instantiated by the rpmsg bus (on NS announcement) manage the channel default endpoint to ensure a stable default endpoint address, for communication with the remote processor. delta vs V3: - add Tested-by: Julien Massot - rebased on kernel V.14-rc1 + patchset V5: Restructure the rpmsg char to decorrelate the control part [2] How to test it: - This series can be applied on e73f0f0ee754kernel V.14-rc1 (e73f0f0ee754) + the "Restructure the rpmsg char to decorrelate the control part" series[2] [1] https://patchwork.kernel.org/project/linux-remoteproc/list/?series=475217 [2] https://patchwork.kernel.org/project/linux-remoteproc/list/?series=514017 Arnaud Pouliquen (4): rpmsg: Introduce rpmsg_create_default_ept function rpmsg: char: Introduce __rpmsg_chrdev_create_eptdev function rpmsg: char: Add possibility to use default endpoint of the rpmsg device. rpmsg: char: Introduce the "rpmsg-raw" channel drivers/rpmsg/rpmsg_char.c | 120 ++++++++++++++++++++++++++++++++++--- drivers/rpmsg/rpmsg_core.c | 51 ++++++++++++++++ include/linux/rpmsg.h | 13 ++++ 3 files changed, 175 insertions(+), 9 deletions(-) -- 2.17.1