Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1072977pxu; Wed, 2 Dec 2020 10:18:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmAP5pttHjcy/WLsRBwYfaYzF9+e6H7FTXm86AK1r0ypTYtvZP20+mVWofDjMcPqO3pG3p X-Received: by 2002:a17:906:16da:: with SMTP id t26mr1003455ejd.478.1606933094783; Wed, 02 Dec 2020 10:18:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606933094; cv=none; d=google.com; s=arc-20160816; b=o/WNJnsWiP87o6dTAg53gk2EIUpsPh71ED+6wzMEmUizgF+VEdkeUzadZ9QBwwM5az X7clBCgG1XT/o/p8YmARl/rxeNmccS6fp4TrVGzyPTeHQzke3wuSFKvF/3DdYlu4JZWB 5w/B9O3VUfpSB9yoINq0jmr9Mn31Z4VKwKVnSj+Ti387ULOZIuXNYqlNpBxKpqKftbRb pCQIiOxpbPx+v2bxOcB6RYrtr6n7MlmnsLgKq5aR0g9UrEDKbk90y1xUKdSu9o39RNJ4 7J3V8PYXFvwNw38JeIqk+oQIEZ47Vnm8z+5TNfuQMzGnN9rX+cj5KwmBZmBD2vEYga9s 6Z4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=A5jf0Pxg1tcGN9l5WHbXjJkLKz897+02QJ8mF0l9cbA=; b=uj1v47k+SvPi9FKXqEPDe3Onoeb5QUBpJ5OOSobi49tCxz5W3Zj1Ifh1HaXJjFsyMC 8HPlJyS0DR0GD42IDYCjJzyAzFMZUZuXyORg+HKc5PFzdrF1wftQNFkCQix9xsejYJ0c H/JPSTHs943d3kTHyZ+iddxRAjc6XIjJleJmbZ98VJrSQelH0l1WNkw/P7yAjp0ofxT1 pNyHqvUoQtxXNHM9dfgWjOyCnfHFsEx3h+CYo8B1BcoOAyLhuNGsVBRSOU8nQqoo9XGH i/mYX1eP1zBeMO9U3jdSd74aVV+/BOXzppDdxztiWbuPh/TvTKVovzbtFNU+B8qZj64G TKWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b="WsT0M/fK"; 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=REJECT sp=REJECT dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b41si470012edf.342.2020.12.02.10.17.50; Wed, 02 Dec 2020 10:18:14 -0800 (PST) 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=@st.com header.s=STMicroelectronics header.b="WsT0M/fK"; 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=REJECT sp=REJECT dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389324AbgLBSOU (ORCPT + 99 others); Wed, 2 Dec 2020 13:14:20 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:6922 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389271AbgLBSOT (ORCPT ); Wed, 2 Dec 2020 13:14:19 -0500 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 0B2I6tYO028933; Wed, 2 Dec 2020 19:13:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=A5jf0Pxg1tcGN9l5WHbXjJkLKz897+02QJ8mF0l9cbA=; b=WsT0M/fKzgDqZfNjQD2S22KAjBjdmpc9YcX63kacaaHMn2RAXPamVBWZmQUQCh+F+0/5 sYUATa7WG5L6vOwd2tLkCzKLtBAAd5Sp6/zurKsUlvA6MYFK+wCrlpAOWn/BqdEz1vTC 6vwQNWcBuGvL4s2bgT+Qyy6nPb/oT8TDl2A5LdBodBWbeVALONZWhqSCuoLT7H5pOdPU WLVpcgD08UU3RzNzac2WntGaLnzltN/vATls8VCfx9O48dE905600dp7YJPEckVBwKe+ kJk9H7jeDN86bpLOSEngbEc1dQYnTIQ3ckp7oxS2J7xnI/yPfyllO9GU/SVXogbL86Pv ig== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 355w3cd33f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 19:13:33 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DBAC810002A; Wed, 2 Dec 2020 19:13:32 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BD4A023FCD5; Wed, 2 Dec 2020 19:13:32 +0100 (CET) Received: from lmecxl0889.lme.st.com (10.75.127.49) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 2 Dec 2020 19:13:32 +0100 Subject: Re: [PATCH v3 07/15] remoteproc: Add new detach() remoteproc operation To: Mathieu Poirier , "ohad@wizery.com" , "bjorn.andersson@linaro.org" , "robh+dt@kernel.org" CC: "linux-remoteproc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20201126210642.897302-1-mathieu.poirier@linaro.org> <20201126210642.897302-8-mathieu.poirier@linaro.org> From: Arnaud POULIQUEN Message-ID: Date: Wed, 2 Dec 2020 19:13:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201126210642.897302-8-mathieu.poirier@linaro.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG3NODE2.st.com (10.75.127.8) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-02_10:2020-11-30,2020-12-02 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu On 11/26/20 10:06 PM, Mathieu Poirier wrote: > Add an new detach() operation in order to support scenarios where > the remoteproc core is going away but the remote processor is > kept operating. This could be the case when the system is > rebooted or when the platform driver is removed. > > Signed-off-by: Mathieu Poirier > Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Thanks, Arnaud > --- > include/linux/remoteproc.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 9be112b5c09d..da15b77583d3 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -361,6 +361,7 @@ enum rsc_handling_status { > * @start: power on the device and boot it > * @stop: power off the device > * @attach: attach to a device that his already powered up > + * @detach: detach from a device, leaving it powered up > * @kick: kick a virtqueue (virtqueue id given as a parameter) > * @da_to_va: optional platform hook to perform address translations > * @parse_fw: parse firmware to extract information (e.g. resource table) > @@ -382,6 +383,7 @@ struct rproc_ops { > int (*start)(struct rproc *rproc); > int (*stop)(struct rproc *rproc); > int (*attach)(struct rproc *rproc); > + int (*detach)(struct rproc *rproc); > void (*kick)(struct rproc *rproc, int vqid); > void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); > int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); >