Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1158320pxu; Fri, 27 Nov 2020 00:46:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1l8Yl/x/JaQ1wD5olnyMkngGgho3UV1s15R7RQfHRoxr1zZLuhStUPBp0/79o64KDjYjk X-Received: by 2002:a17:906:4057:: with SMTP id y23mr6122578ejj.299.1606466766188; Fri, 27 Nov 2020 00:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466766; cv=none; d=google.com; s=arc-20160816; b=Z6IqwhObcnB/9U9YOo8w2OD7NVfVxMP9OTQFdNhHXZSQkNxgyX51IvjFKRRtwmgH8n S9+zfbZuXBhYA/4lr5WvOJCFV+NjxbF456evYX67wP9f1u5srM0o6X5JVdUkkuAmYVCu gmlyYSopcd15gnD7lTeBrAdXc4J+J9oI05J4bNbdrebErAVUGpNDh0FpEGQzZrjlh4uv QsREC0yNDs2Ft+G5Mk6LYvkUiK3Xwf7kLbzbuwHXwjPKGCC1IX423lYjbjwRfUCOgl12 tXEmM35mNms6kARpclFBkFBDmLPbZoF6IysuARNi6C429MsNXI8qz6XWH6ZQaM2ZA+yM fARQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2RSwp2FaxZrOvHsikh11ndH236WC9DHwtvvMtCMsWVE=; b=nGqEmFAWA6A5q4LSM0iy3de2ef9TaJ1Dx2m55TQD2E4CcWJtqg7emdZmaYrjsEOQan /fSRny4WvCyovEnLVMj8gRjnXnEkHpPQ1nyrmXGg8BmjDr75gmkdzILeoivVxA5X0Oyx 6KS8TS9KpdGt8j/3gN8GhaumLGGOqeDofh6zJrCCPFBom32NwvOS9faMP4sFm30QM0BZ YprUgvWv754EKZQaT3F/+IOJWpAQbUT4QD+mVmOLmhH2MTGQEKqnkyuLOyI11HluN5vV 7esriNa5/CMnduqEpbeGH6v0A0mikltPRNfHk575t7liA9HKpFdbI3Jzencu9vSd1vqb 0Z5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WCLVMJKo; 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 mh12si2078460ejb.48.2020.11.27.00.45.43; Fri, 27 Nov 2020 00:46:06 -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=@linaro.org header.s=google header.b=WCLVMJKo; 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 S2387626AbgKZVGq (ORCPT + 99 others); Thu, 26 Nov 2020 16:06:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733136AbgKZVGp (ORCPT ); Thu, 26 Nov 2020 16:06:45 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22DCDC0613D4 for ; Thu, 26 Nov 2020 13:06:44 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id 62so2547661pgg.12 for ; Thu, 26 Nov 2020 13:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2RSwp2FaxZrOvHsikh11ndH236WC9DHwtvvMtCMsWVE=; b=WCLVMJKohk7tpNgIMveowBplgnFQVZhH9HgOvahmn7+xrODcXctJrrgY00/CccPGwv tyHt5rAF9C2NJvufmc4ZCVcsi8b0UawM/TuHOQjjI4FtHr3jR5w8bh/oirrMYUDsHDpN ttzBDqiYOftZrygCewF/fu1BtQR2MNTVBG+AXFYw2zZMgPEHXiLqxIXeAW1cqORmDjEJ s2mtIMeS+Swup/wHX+wnCOJLH9tsLxVMn+QHdREOG7Hg3WxIJxW72uYkzsIOTdnMSz5Q Rg7Vybd1CsCBms8ONBejFbYhdfccvDBXuCjEBN0zJOGUPhFwp0GlyaXINylnEKYgf8B/ fYsw== 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:mime-version :content-transfer-encoding; bh=2RSwp2FaxZrOvHsikh11ndH236WC9DHwtvvMtCMsWVE=; b=Pvl9z0UOiBIunwIHrw9VKKyallwmeu3wMORM9AS3QGglVRYunTnyAyb6IL5X//SreV gpuBaXOpZ7DOmk3HIJdxIJHIrMG0u9rUz7LHG2nWR4kT2mZuZj+/2lcRzsR2gom3Y4GS VJPwfsInpC542KE4Isi1aCYU03puLoZPYN5B7gaHuCPX1koMLftEY4PxPcwGzALObm25 8ZY6wiDwXPfGMhkWWhPxhA/nz0OVyjadlJan4umd9yVTUTaPTtuVvIwDSrs4IiZiCUPC 61k4QWVfjAR9DuXf5fz/xUbnfYQQVhWd8SZzrPBM0jXvqrr+4GDkdN8lWsYak3Xwo5K7 C6+A== X-Gm-Message-State: AOAM5313r/w6SUslW/IYRoBIkfkV8sd/+VFztGvGvnNNFj4+n3Mp0ECK 3w4CuVO7pO4Zd/9a7OvVtqswTA== X-Received: by 2002:a63:7b55:: with SMTP id k21mr3901924pgn.256.1606424803641; Thu, 26 Nov 2020 13:06:43 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id c203sm5612676pfc.10.2020.11.26.13.06.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 13:06:43 -0800 (PST) From: Mathieu Poirier To: 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, arnaud.pouliquen@st.com Subject: [PATCH v3 00/15] remoteproc: Add support for detaching from rproc Date: Thu, 26 Nov 2020 14:06:27 -0700 Message-Id: <20201126210642.897302-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following the work done here [1], this set provides support for the remoteproc core to release resources associated with a remote processor without having to switch it off. That way a platform driver can be removed or the application processor power cycled while the remote processor is still operating. Applies cleanly on rproc-next (c3c21b356505). Thanks, Mathieu [1]. https://lkml.org/lkml/2020/7/14/1600 ---- New for V3: - Added RB from Arnaud where applicable. - Reformatted comments about "detach" operation in struct rproc_ops. - Fixed error path in rproc_shutdown(). - Fixed processing of "start" command in state_store() and rproc_cdev_write(). - Changed binding from "autonomous-on-core-reboot" to "autonomous-on-core-shutdown". - Wrote a proper YAML file for the binding. Mathieu Poirier (15): dt-bindings: remoteproc: Add bindind to support autonomous processors remoteproc: Re-check state in rproc_shutdown() remoteproc: Remove useless check in rproc_del() remoteproc: Add new RPROC_ATTACHED state remoteproc: Properly represent the attached state remoteproc: Properly deal with a kernel panic when attached remoteproc: Add new detach() remoteproc operation remoteproc: Introduce function __rproc_detach() remoteproc: Introduce function rproc_detach() remoteproc: Rename function rproc_actuate() remoteproc: Add return value to function rproc_shutdown() remoteproc: Properly deal with a stop request when attached remoteproc: Properly deal with a start request when attached remoteproc: Properly deal with detach request remoteproc: Refactor rproc delete and cdev release path .../bindings/remoteproc/remoteproc-core.yaml | 25 +++ drivers/remoteproc/remoteproc_cdev.c | 27 ++- drivers/remoteproc/remoteproc_core.c | 182 +++++++++++++++--- drivers/remoteproc/remoteproc_sysfs.c | 20 +- include/linux/remoteproc.h | 18 +- 5 files changed, 225 insertions(+), 47 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml -- 2.25.1