Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3437030pxj; Mon, 7 Jun 2021 10:32:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfLoCeEr+AoFkDEKE7eGLf9RXc3HzxrZncZfBJYnRFB0gRN6rUFBz8YqVCqK1gOEt8eXus X-Received: by 2002:a17:907:2057:: with SMTP id pg23mr18659349ejb.113.1623087134042; Mon, 07 Jun 2021 10:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623087134; cv=none; d=google.com; s=arc-20160816; b=F6+ql/wvOGbzqAF3jHWUTW5A82tsAKqSYjD3x17Hh4nLVWCLgMHBDqvp08mpV8bUlx muizYYg8jmCawU99OiEAJ6TUiccgljvwU6Gc7dvrsdgLCv9sqbpfnLef0BygGa1ZZwP7 qof+06bVXXc+HqTiNEzXhhJfhXp+PLeQOMntUZHhBo95iGxygkgV3fIzmvUQxjUVA2N6 p0PpzlACP1qLAzRIkZJlv7pfY1s5dUXMnx1aLNp3nqbqEkL1nxkxTa8wzCE2KjzuySRw t6pXOFDrXaSe+aHPnKZ0wEeoVlS14+TsrfIF357yp36IFwKoI9EQan5iJQn7Rxl/vMl5 voww== 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=4K7B8Tgo+sUqb2EMy3lz5Ixcq5OEwNr88+4MnIdV1OM=; b=rJEfeSmLaMpU1xPa3PPcSqAhAPnCr7LHDGoKCBa5Lf9FoqMDzGAinH/8Ldp7YsHlos b2Ad0OYjFifzM89KbKVkDM8RvhocmobOquTC3k6BBH7L+nkLmp5w8fNbRdK+w+c5byTH rHx9syUlYP0gsbB/0a3u6zHvlf9i2/DS4lp7GMQPT+7MMsjxkiBrPWoLQ/jMiRYNdzi4 dB8bmH26ywbzVpBusBAa1nXtjuBX6rJxsEH6AotJQZqn5Xitj1PQKNtCyx/SIt4i/PJF cOu5n7fxYCm1O64w6mUiJO2jWxVo7rBLKRoTSOReft253ZsZhMz/9r6VYRw4WXVN9miI tL7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Co4w9wRz; 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 z3si12777037ejr.183.2021.06.07.10.31.51; Mon, 07 Jun 2021 10:32:14 -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=Co4w9wRz; 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 S231478AbhFGRco (ORCPT + 99 others); Mon, 7 Jun 2021 13:32:44 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:51841 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230409AbhFGRcn (ORCPT ); Mon, 7 Jun 2021 13:32:43 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 157HLnSP016433; Mon, 7 Jun 2021 19:30:40 +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=4K7B8Tgo+sUqb2EMy3lz5Ixcq5OEwNr88+4MnIdV1OM=; b=Co4w9wRz4lQ8dPql6Jf/sS3j5kNCWIHCMTGf6vFHRemZ9SsofaOXUS8S2QJ/2EuYtB+X vu6PKuSRNDhST08xVh9nH6Gconbt2JYyW64zsYP49lTXwwIcfVa5mO2ogJ/bNzE6w/jM Vtg6hhlhDNu0rGo/WQjkyapyvQhGOs8G2vqNkOhtGbp241qH34hudnm/cP6BIZaoFWER 9mL/Wm39IKu/xQ1inAoj2UPDivmZGK5ccg0qbR9ML3ibzDw0u3Hdnn2NO26ZQItXMZpt CuAdrJPKrlp6Qbeluu+A8vf9fvSm7aQfiXHCcpzz9jQhAKA8zJgRkyyrDnrwbfYEQWpC Hw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 391evfbb29-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Jun 2021 19:30:40 +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 4D49E10002A; Mon, 7 Jun 2021 19:30:37 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 120102142B6; Mon, 7 Jun 2021 19:30:37 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 7 Jun 2021 19:30:36 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier CC: , , , , Subject: [PATCH 0/4] rpmsg: char: introduce the rpmsg-raw channel Date: Mon, 7 Jun 2021 19:30:28 +0200 Message-ID: <20210607173032.30133-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.51] 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.761 definitions=2021-06-07_14:2021-06-04,2021-06-07 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. How to test it: - This series can be applied on git/andersson/remoteproc.git for-next branch (dc0e14fa833b) + 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=483793 Arnaud Pouliquen (4): rpmsg: Introduce rpmsg_create_default_ept function rpmsg: char: Add possibility to create and reuse default endpoint rpmsg: char: Introduce the "rpmsg-raw" channel rpmsg: char: Return error if user tries to destroy a default endpoint. drivers/rpmsg/rpmsg_char.c | 92 +++++++++++++++++++++++++++++++++++--- drivers/rpmsg/rpmsg_core.c | 51 +++++++++++++++++++++ include/linux/rpmsg.h | 14 ++++++ 3 files changed, 151 insertions(+), 6 deletions(-) -- 2.17.1