Message ID | 20210211234627.2669674-3-mathieu.poirier@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=xpWt=HN=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 E4ED6C433DB for <linux-arm-kernel@archiver.kernel.org>; Thu, 11 Feb 2021 23:48:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8683564E42 for <linux-arm-kernel@archiver.kernel.org>; Thu, 11 Feb 2021 23:48:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8683564E42 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+vdKpMJLdMiACfeuO2+eO6LwZh8QhlYE+sJAadnmteY=; b=LTlfIRYr9s8qHk8omdfoybgQR we/3O1cIjsfT2FKKzj/KdzJOQr4Hv31zpAucrKPum3rU6I/60Vbj6EzJyyn6ppCeXLF4LHQ4lboC6 tpycCeEMeUoCnn7JjVmTWs+jfD7VEGQcMc/Hc6oD8HfnWj9zw5htteqpjoS4/FK6pYnuoF7FRGw+b 9nUdXMtgEFN2VZ+nwah9JPRa/fx/f+RR9ArRlsKzxr0mQMDI2ZxBpJ944yQ29T+EV9ZNnwPs7tuuC KTtnFQC/n5493gXyUO8x2+nkqS7zJPdEnP9xsFCjfWcEnZEqAyHc9MT2fhm0sBAiV76PI4BUb92yM m5LhZMz6w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALfZ-0004Mw-Iw; Thu, 11 Feb 2021 23:46:45 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALfM-0004Gr-VA for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2021 23:46:34 +0000 Received: by mail-pg1-x531.google.com with SMTP id j5so5049774pgb.11 for <linux-arm-kernel@lists.infradead.org>; Thu, 11 Feb 2021 15:46:32 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=2KYl68Dz1gSnngZXwIN4sqByIS0YQQztG8qhw3LioGM=; b=zIatSa7CJYFApIdlA+4ilgXNyRLDat4ml/F/f4McziCPqJX/qShgyLX1ikZm1Hx8L9 ogLgeKsFhOGJqUsy/9s7dsqrPpsb58CdyJtW4xpXr4AHoqgsOOVhKDGUJ2GWAF4jNRHS SFy2Qm8eNeRt0gF6tugmbnUwJOHDorASZOeV11ZeoqIep9k8QOlPN4bEnWpu0nEM+jag h/dJCsLpRCCXnAf+QYGOxitC4pyrYUUXIt6Qpb/03n37zjB5ZdfVMDHNX+TPNV7wANH8 FO5sPFiNQoLsIBIaiHBzjSGH64MyFuqyKxIY+mWI7cHXP6QXVuCOFHCZdGVHYRrLbX3F aH5Q== 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=2KYl68Dz1gSnngZXwIN4sqByIS0YQQztG8qhw3LioGM=; b=Z1TAL5975v4/e/xaRYA69DPZUebePxqk9qvkL/p4N+d7ctxNt6vcEsnUzNfgIQ+BcX VuXAASNSTFJAMdmFBMMdC3UzHM7bVAxL4kB8N/vxrhyU8p4HMxpPuVnSZSoeQtEDlQec J1Xl1HEcMMZ7eCrzqfTYCOLjkSenT2a2NVWWB+/fMHLSJTUanX4gm/008kmJnHnIy3w3 wijxB5/2R1WaHuT8lwyoad7WzgzDHy1GPylYX+Mndv78rJwGMdM4ZUI/B5zA5ytaXEfp rY4kdVtfi+Y4g14BWYh2QqFpg+SrNr0K0Tdo5lrUYfLL27l1GLmbNwVLx+4lICGtVIoj fwew== X-Gm-Message-State: AOAM531SjSSrErE2DqKNh7t5uJkRK/kxTbYh7IGHhvwlJKbUWT7/xPI0 aBMpGqGu3D0GKpfzwcMp/CgAVw== X-Google-Smtp-Source: ABdhPJwimie60L2qE+VDXtDsRyA3fx/afzXxDMnPnvMXXaaUYPUehkvHoQwKs/gicTDp11o+U93fgw== X-Received: by 2002:a63:f95b:: with SMTP id q27mr567144pgk.82.1613087190926; Thu, 11 Feb 2021 15:46:30 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id iq6sm5932740pjb.6.2021.02.11.15.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 15:46:30 -0800 (PST) From: Mathieu Poirier <mathieu.poirier@linaro.org> To: ohad@wizery.com, bjorn.andersson@linaro.org, arnaud.pouliquen@st.com Subject: [PATCH v5 02/19] remoteproc: Re-check state in rproc_shutdown() Date: Thu, 11 Feb 2021 16:46:10 -0700 Message-Id: <20210211234627.2669674-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210211234627.2669674-1-mathieu.poirier@linaro.org> References: <20210211234627.2669674-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210211_184633_169502_9A64F831 X-CRM114-Status: GOOD ( 14.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, alexandre.torgue@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, mcoquelin.stm32@gmail.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
remoteproc: Add support for detaching a remote processor
|
expand
|
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 2394eef383e3..f1c097572e01 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1857,6 +1857,9 @@ void rproc_shutdown(struct rproc *rproc) return; } + if (rproc->state != RPROC_RUNNING) + goto out; + /* if the remote proc is still needed, bail out */ if (!atomic_dec_and_test(&rproc->power)) goto out;