From patchwork Fri Mar 12 16:24:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 12135233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 927FDC433E0 for ; Fri, 12 Mar 2021 16:26:58 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 080836500D for ; Fri, 12 Mar 2021 16:26:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 080836500D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/PVaCJAaUA2pXo8cxyaqiwWVooA7ZBBVEHEmwmE4ha0=; b=j8znz0Z7XH2+2E6T7V2GVp6vFP jolK7d3NakANf4zHjL+AcSWlRVhXK7d4PnJ0eVK1HoCenZCsICpYeFHP7quevaISQHy60wORjcMHO 6LKK95Yd3UFzwv1wPTclOljQWTIc0JsWx7IkEeUvG76L9Tjabe5QsAYXW/1n5iPikolGIc2WS2yY+ W8GsXoJgUoqLRmir2ct4tL+lOwiNHL5NNwJVxBHUTR5tkq53tZFU+7aU6nj5BtuwCBbGFkv+wSVq7 7B0OQ4vapcHNE7fb5BYMIdcM6F1phmpslBLBA7YHsAxrkdyMj4x2SNx5Wg8eqX0r/xSf5tudRWRKQ Tunu5Xmw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKkb6-00Bwgf-1y; Fri, 12 Mar 2021 16:25:08 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKkav-00BwaV-LN for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 16:25:01 +0000 Received: by mail-pf1-x430.google.com with SMTP id 16so2201729pfn.5 for ; Fri, 12 Mar 2021 08:24:56 -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=GLPYqdvg9MFVJ4vgEAAqaEwpKmLxtxoj80nZ7ASbFTw=; b=gGBk5i2sXg8XfPoDZIGwKeoBZ3o+Q2za8Akb+lk6i8b0iin+UFMLlkD86TAEbW0h50 2pHwcpvBWGcACPe2uapXqofrp9XZpB/dU8I/WuqJRgo6eYFOobgJ2a0bY3m3FAbamCNr eJmEg5cAlZO1k52FhpswI+Nm9v13XUJhTWPcW4HTr+/V/G7IcK7KLY01rSHGrJEeVqIT eLmlozDgdi36Ema2omChbE9LcgPpxi/8om4ytlsKXRxaxMHJhEkha2/CHv96Tx/GgU7a PM6fAvU2Chub8oQDDV23TXxTiJyv9WzyBlZrUiXAhMW/o7TTW3mjVK2x13MlBeikTtzo Wgeg== 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=GLPYqdvg9MFVJ4vgEAAqaEwpKmLxtxoj80nZ7ASbFTw=; b=cIpXFTWRajYBBe5/GZ7Oc3M/o7X6yZCh/ppcut4nbBzIKZZONeVvJuDl04FT+gByEI zerI9xFZouk6Mtpei+HZcsYMwx36HrwxoDi7ILLnModoHkTCu/UOtfD0/mwEZ18KtO+a 5hP2fyl+V2X3S1ju0mJpRzwKYBPTEPm2uxqfroaUOoY8JeeLVCQD/kyVw7XV8/vnb3Oa eJ2K0CiPyZckNmjXBCz8yJomig0NkaLLMcsQSXb9+lsbZUmqm6TLHIUcSx+gN12YPa2W EGNhTnmgJdiJU2/Zlg4aNwNOaeUq1zRsORbK1Qhp1OSY7YC1XIMaZMKXe56u0UjV8v82 yA3A== X-Gm-Message-State: AOAM53299olBbnSNUpXvKAuAUwS7CGaDaMPMEw/1dSOe5zQFM/SPYYed fQqG1NN6BZxIb3NqkYAtmrxQNg== X-Google-Smtp-Source: ABdhPJwSpltrCO0OnpdZMIJb8pP+93hJhPCIK5TilQeex21X3PF2rwNf/G+LSkE/z7+rsuAaQIu6yQ== X-Received: by 2002:a65:5a0a:: with SMTP id y10mr12576669pgs.285.1615566295421; Fri, 12 Mar 2021 08:24:55 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id e8sm5899599pgb.35.2021.03.12.08.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 08:24:55 -0800 (PST) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: arnaud.pouliquen@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 00/17] remoteproc: Add support for detaching a remote processor Date: Fri, 12 Mar 2021 09:24:36 -0700 Message-Id: <20210312162453.1234145-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210312_162459_578736_B2AF9826 X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. This revision fixes a couple of minor problems with patch 11 and 12 as pointed out by Arnaud and the kernel test robot (detailed in the change log for each patch). Other patches have not changed. Applies cleanly on rproc-next and v5.12-rc2. Thanks, Mathieu Arnaud POULIQUEN (1): remoteproc: stm32: Move memory parsing to rproc_ops Mathieu Poirier (16): remoteproc: Remove useless check in rproc_del() remoteproc: Rename function rproc_actuate() remoteproc: Add new RPROC_ATTACHED state remoteproc: Properly represent the attached state remoteproc: Add new get_loaded_rsc_table() to rproc_ops remoteproc: stm32: Move resource table setup to rproc_ops remoteproc: Add new detach() remoteproc operation remoteproc: Introduce function __rproc_detach() remoteproc: Introduce function rproc_detach() remoteproc: Properly deal with the resource table when detaching remoteproc: Properly deal with the resource table when stopping remoteproc: Properly deal with a kernel panic when attached remoteproc: Properly deal with a start request when attached remoteproc: Properly deal with a stop request when attached remoteproc: Properly deal with a detach request when attached remoteproc: Refactor function rproc_cdev_release() drivers/remoteproc/remoteproc_cdev.c | 21 +- drivers/remoteproc/remoteproc_core.c | 302 ++++++++++++++++++++--- drivers/remoteproc/remoteproc_internal.h | 10 + drivers/remoteproc/remoteproc_sysfs.c | 17 +- drivers/remoteproc/stm32_rproc.c | 168 ++++++------- include/linux/remoteproc.h | 21 +- 6 files changed, 401 insertions(+), 138 deletions(-)