Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3886592pxj; Tue, 15 Jun 2021 10:42:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaINjZdZpXg6CLLQkM8YZn50v1MIcqFg2jlRsFlhU/5G0jjwGmvYq232pslUlYcveFah5w X-Received: by 2002:a17:906:430f:: with SMTP id j15mr731896ejm.445.1623778929553; Tue, 15 Jun 2021 10:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623778929; cv=none; d=google.com; s=arc-20160816; b=z/Uo70W7G2QO/wyEM7O6Ah0G7Lx3kvPsBdsHs63Cg1hZfuqZZizzLQ8uwi4Cuz9dVY cWIXEesVUXmATCX4VRi7sYgTUl1RnyY/uQSmoDLsa6K3rnQVLZEZmBZHVRmUGZxtQ2pr kdPwiC5nOv+8mA5HmFFsrfpY4l6IqPLRDO3mQ0BTk9c0irhRj0It7XAvA0eTAPiOq2oG SHQWqgGnMNi0SvgXfEsCvIQU/lFFa/oUC51ygIsqo2gmkvVFO7tenLwUcEbCQ+a9Wt4c UzBRE6fMDl45aU3ZKRB+Ao+jrQEYNAghIIPq731GfR1XvvHVX+qpDh3Eu/fsBtaI27KW ZW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gJUa+0hx0rbXUFX7mmxsZwfywyMDtRYFDwhkW7Df8yU=; b=ea7crA1UHtXj7je4Krua7Nb789uNkHjXs+Xsi0EZzh70e28J8aYV3EcUkjZGBNX0Qd dV6owlyeSyEfc2CgHeufs0bqoKuG0tvhDPMWsyphTBu+++JLCjhopqsSz/6jI8JWmpOd maWoVgzG3mUGdRzzqXJ09c08bGwDbGcqnf0xiEwuKQI7CTUfmmC5MsU5978C/4WZZukn +JG0LjyZXW5G9TmTfpZSBCjtSzPCSqtTRLm1U8d4HtNvmOXFyBU06pmH0zBbi7hwLU2k eS4avKVkbJyrxF3E4q44dIxQoX3DFmDrMW4ZwFgiCiZAkZ2AyuTEjQXDzEhlficl729p I3pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="av/65a3p"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh4si17663476ejb.358.2021.06.15.10.41.45; Tue, 15 Jun 2021 10:42:09 -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=@linaro.org header.s=google header.b="av/65a3p"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbhFORkw (ORCPT + 99 others); Tue, 15 Jun 2021 13:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230259AbhFORkw (ORCPT ); Tue, 15 Jun 2021 13:40:52 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E3AEC06175F for ; Tue, 15 Jun 2021 10:38:47 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id e22so12049961pgv.10 for ; Tue, 15 Jun 2021 10:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gJUa+0hx0rbXUFX7mmxsZwfywyMDtRYFDwhkW7Df8yU=; b=av/65a3p3BRVNG9XKFdJYeO2wWiTcfNj42ljpHRPMF3DlyK+jxaAhqBukh2qrhdn6m QGmP698y/f4Yl//cY6O8iLmNL6VkQqw+FVzzydBgFDdlhSNQ9EpiFSj7/HLh4mE+9CaI TMk6M8DwJAwcme41wPmz/dkbmT7KMgPCbPOjc1tzRm8cdq+oaChK/q7UeiUgQJWsVPJ1 JrzAgmitVjWOHYJoovf6Tdukxo0H3KvRKw1hKZM55d3ZiMr/axZW3yeAds7xR0gJLLIZ TzDdxoxwDJgp0axoJLndMMeeFEIgKtNorS7NLMYx2Lnxccy9Qqw1FUU/MvnoiiZGXyMN aoSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gJUa+0hx0rbXUFX7mmxsZwfywyMDtRYFDwhkW7Df8yU=; b=cFqCCQEV8kvB/QNmHiJTKwGAs13J+VRqycjaBQLVvQcmrGO8Gq8X8PjjoCuQkVg/pv 2VjBPz0OarnO4Hqnomj5cpyPtPh6r1CClQjF0TfjHjnsKN18qavWKJajNnPEb1ING11n glW9aLI3oOjrxAKRzjBEFK54OcwgJArEYwoqTPHKYix/C4SipbATtG04ZMsfb2Uhv8fD pTU5kuQbCzgku/0wITgaG0ck1Cv9WLsHhpSDx+x+3GNioKeFDFS+6QE9mqZoo9DftXKf A6+0z3WX4VYmJrsiI9KUe3BoEno599cSeauxCeLIg3y4CZDO7KBLdcCH/zRrXTBbxd+Z 0YwQ== X-Gm-Message-State: AOAM531DUBp18L2tErjW+5l0LalKKDSa5BCnHKj+yJIc3OP3w9Qc8zOw F5DuSWcIjytUA6HmWr3PVYT9KQ== X-Received: by 2002:a65:6884:: with SMTP id e4mr630624pgt.71.1623778726964; Tue, 15 Jun 2021 10:38:46 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id mr23sm16168435pjb.12.2021.06.15.10.38.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 10:38:45 -0700 (PDT) Date: Tue, 15 Jun 2021 11:38:44 -0600 From: Mathieu Poirier To: Arnaud Pouliquen Cc: Bjorn Andersson , Ohad Ben-Cohen , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 2/4] rpmsg: ctrl: Introduce RPMSG_RELEASE_DEV_IOCTL Message-ID: <20210615173844.GA604521@p14s> References: <20210604091406.15901-1-arnaud.pouliquen@foss.st.com> <20210604091406.15901-3-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210604091406.15901-3-arnaud.pouliquen@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Good day, On Fri, Jun 04, 2021 at 11:14:04AM +0200, Arnaud Pouliquen wrote: > Implement the RPMSG_RELEASE_DEV_IOCTL to allow the user application to > release a rpmsg device created either by the remote processor or with > the RPMSG_CREATE_DEV_IOCTL call. > Depending on the back-end implementation, the associated rpmsg driver is > removed and a NS destroy rpmsg can be sent to the remote processor. > > Signed-off-by: Arnaud Pouliquen > --- > drivers/rpmsg/rpmsg_ctrl.c | 7 +++++++ > include/uapi/linux/rpmsg.h | 5 +++++ > 2 files changed, 12 insertions(+) > > diff --git a/drivers/rpmsg/rpmsg_ctrl.c b/drivers/rpmsg/rpmsg_ctrl.c > index 4aa962df3661..cb19e32d05e1 100644 > --- a/drivers/rpmsg/rpmsg_ctrl.c > +++ b/drivers/rpmsg/rpmsg_ctrl.c > @@ -98,6 +98,13 @@ static long rpmsg_ctrldev_ioctl(struct file *fp, unsigned int cmd, > } > break; > > + case RPMSG_RELEASE_DEV_IOCTL: > + ret = rpmsg_release_channel(ctrldev->rpdev, &chinfo); > + if (ret) > + dev_err(&ctrldev->dev, "failed to release %s channel (%d)\n", > + chinfo.name, ret); > + break; > + Please move the content of this patch in 1/4. > default: > ret = -EINVAL; > } > diff --git a/include/uapi/linux/rpmsg.h b/include/uapi/linux/rpmsg.h > index f9d5a74e7801..38639ba37438 100644 > --- a/include/uapi/linux/rpmsg.h > +++ b/include/uapi/linux/rpmsg.h > @@ -38,4 +38,9 @@ struct rpmsg_endpoint_info { > */ > #define RPMSG_CREATE_DEV_IOCTL _IOW(0xb5, 0x3, struct rpmsg_endpoint_info) > > +/** > + * Release a local rpmsg device. > + */ > +#define RPMSG_RELEASE_DEV_IOCTL _IOW(0xb5, 0x4, struct rpmsg_endpoint_info) > + > #endif > -- > 2.17.1 >