Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp257929pxa; Wed, 26 Aug 2020 09:47:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd+bq5ogy3cyzL6V7w1FJB0OIu0IjZInvwFQyYgxbgPfx5aky3fcItFjoV28JAisdF77Zj X-Received: by 2002:a50:88a4:: with SMTP id d33mr16218538edd.43.1598460472365; Wed, 26 Aug 2020 09:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598460472; cv=none; d=google.com; s=arc-20160816; b=M1KO0WWDvr7+mpd/SnTUE+og5BgbPUHjFlFYQzlG1zKPBHseRhY6pTZwnTt2RWQx1l EOGMadeGjJQq9EKgPz6IUG+7awpR788RsXHYmflO/ArhkJG5KOq83TcTnCmQs6IMdJe0 WhAJyPb+EkCv2h7vlQxXvsqM/OVYbPEJYyaaUEvyzMsxRuxKwF2CBpMzGpwura3OLNtC o9kXIp8XpbX7Jq2AGchN7fnCTbyj2MGxcYppkFsdkypb3g0YNf8Pi52jpCD5Nuv/yDaW RfSmlAGkpged30n/RYKh4HFdRUdFGKGPLMbww9SBA3zD96vZVh3zU283r7S4Z588M9hx n1CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lYOgLwnu7WcXXfGvAZrIa+HvcswO98ITukkP4wr02mQ=; b=WI9UGnaPq1QvU8f2u0qwxWZfzNCo9jOT5+teDn9kP3OILD0K+Sh4dKrM1VFoN3Yxe4 AuUJCR7n+6Jd+eAoq1uS0tyw8nftB0HsOVl1GaTswodVUVuvpMku9/Rt3OmOc/yqqEoX R2ILlT3SOvEd8dLyrBuSUtkg+vMZ6nkDYmSj2qv8ru0ja3gMrGyAZgY75Zv+MOXl390O q76fjoE5398yXPueOOjpaIsjGmzMNc3fzjT+O2EhdN5G1leUZU1p/SYmRevoJtkYRaUH fsmps8oRWz4yKIVoNyTrpWajMkqRAKRJlTkVGt/XVAgoykaTvVhsfBDcIaweIhWgpLh1 ikJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qm/4WZiz"; 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 n1si1123054edt.286.2020.08.26.09.47.28; Wed, 26 Aug 2020 09:47:52 -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="Qm/4WZiz"; 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 S1728185AbgHZQqx (ORCPT + 99 others); Wed, 26 Aug 2020 12:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbgHZQpn (ORCPT ); Wed, 26 Aug 2020 12:45:43 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12859C06179A for ; Wed, 26 Aug 2020 09:45:37 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id s2so527969pjr.4 for ; Wed, 26 Aug 2020 09:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lYOgLwnu7WcXXfGvAZrIa+HvcswO98ITukkP4wr02mQ=; b=Qm/4WZizP1KnyzgrqrSHdleNAP9snMSeWa1K5KztBk5eaOiDE1sfr5M06EEs7mq51Q ojW3MSEtGwhKk0v0h5flQ3LUG8aI68i2z2HYgyTb8rNm6N3QTm2iqZbnPrVaUuPMeCum cqpoYqEHg3wO/Xc0VJMXnoCEbD8G82Eqnv9KsmcoaNAU00Xuz23+s7qmIJK5az0cXhio jy77TmnzR4OTRHk25OIsp6rz5RrlvgQe+x+JeEwjQyqrKROf2EqT0XIjUOeVEyHKvLsz AwILZNfUx/NmEXjBUnfUMdCAMWAPUFgM9Kmp9ehd+2DpSLHzR77lVA57Ujw3FmYtrIQa bqlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lYOgLwnu7WcXXfGvAZrIa+HvcswO98ITukkP4wr02mQ=; b=jmxUqxymLnYBnX4gqL66+UXf8lgq34TDsgX7ddulYx+q7iErcGVZc89chNwukbUT5N FEuZng9rOU2h+JkHvwQdZjitVzYufXmuIXRtlLeFl0YAlb/R5UkzKjLZOHPOwQV0+9YN JHXfT39rMGNuez+l5J/I7AhMhHpVilYghWEr1TGsgZ2J6PDfJQnYhbMBEB2USCFiULq8 3p/YGaDjl0z56i0sm5O+0gt3vxZNEIj/QL6FYdlVk6D5LDDzgXvjqp5gwYPoJo6A4DAu i8J5D9NTgx00hmoGgCai10u9lrDCP/e6i/kAua+QA9ALMgMchM1b66Qv53d4H4zOoDNN 6ORw== X-Gm-Message-State: AOAM530aQU/oSkp2DOluK5pvhwRXTcwKeFwY15JkaC76uJjop8yFCiSl 5eSyNEpfZkGd+CT01yOB7M1U+A== X-Received: by 2002:a17:90a:39c8:: with SMTP id k8mr7142436pjf.19.1598460336599; Wed, 26 Aug 2020 09:45:36 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id u3sm2548878pjn.29.2020.08.26.09.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:45:36 -0700 (PDT) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/13] remoteproc: Add new detach() remoteproc operation Date: Wed, 26 Aug 2020 10:45:21 -0600 Message-Id: <20200826164529.224476-6-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200826164529.224476-1-mathieu.poirier@linaro.org> References: <20200826164529.224476-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index fe383392a821..1a57e165da2c 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: tell the remote processor that the core is going away * @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); -- 2.25.1