Message ID | 20210211234627.2669674-16-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 DF26EC433E6 for <linux-arm-kernel@archiver.kernel.org>; Thu, 11 Feb 2021 23:50:15 +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 7A9F564E42 for <linux-arm-kernel@archiver.kernel.org>; Thu, 11 Feb 2021 23:50:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A9F564E42 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=Di4GfQI6tieGim7w8S2aqTTU9eFVrc/XHRAIW8FFAH4=; b=Ut1K/UGdVRIKpljwOtI60ZUY6 /+CJ4ptZ/4/4jLxCih1I+S8yzEkFEgG/fANiu01T8qJ7eZ5J0gD3DOu7zBM/UY0DyZdGysu1EmyYN bBuft6x4YOKCieW5Ui92lig6E8foU6FRbGrwaLmq+FDU+rXryiZjZBeEsZOpXp7lQWtoGykliHGFL 9mMWMeLGdwy8GzbLWXF07WRLdzHco2GVDhMAM65kKRq8Mq3K8HTQNPGK5NFAdhRPr8hx57FFCltIS SF3y0Gw28A2myMoX9zYtXeu02zfdO1joKWDDDSD1xDiVekZm8f3EuJQ3njjMUe3aiotKwKIm2Qv7C BHbJTCUBg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALhJ-0005B8-91; Thu, 11 Feb 2021 23:48:33 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALfZ-0004N6-Ir for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2021 23:46:52 +0000 Received: by mail-pg1-x535.google.com with SMTP id t26so5073597pgv.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 11 Feb 2021 15:46:45 -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=Mp+mWSDpsQpj9MF3x3T5H2fS4e1Av4X97/izXSyp1vI=; b=IuMH+Xl3+C4gUMMxtAllS7ZPSyGIoYf2rMe0IufQxwt52j9zVpYi7Q3JUk8+OxWzM3 PvpHM5+brzjn0zNVXbpwOTW6Fr/Sphi34Y+Rvf4XaNv4qvbVCuVST2bvyBMNbXSy8a2O cefrrkXqEPkTtXSPRfrSIYYPiFexWCuzTM7gVdqpFmeWvFgI7gDGsq2XFJ3t5jph5Pt9 xjrSqVy1afVFI63asEptOugavONzuOBGj2UtNCaJqtu6Kjw4P04eiojQ+/1Txmthy8PW PLREL70UwzlmOeiYrHjsXjEoQKJQxrAe6rZoEkPScppHQGdzJu74eD8haECB6A9poH/Q N/pw== 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=Mp+mWSDpsQpj9MF3x3T5H2fS4e1Av4X97/izXSyp1vI=; b=YDTva60MT4rZszAV7W1Qq/oe2i87wWLlmOgxnIuwTvmjv73UAsyPvfL5GRq3HWHoa0 ZLacUABxRnSTDwgQehddvJxAj230laBVNjWIv3X09xT3yS5S2Dgsbca+6MuSCHRazmWX LDFekt2qjmC3dGeS8eaoSxZv56Q97rmO58n8LfjGoK+aZ0Cc4FcgybkdmHOXHM8yShYm 3ezPeHqq92nN8/GtEGNbcyTHFVNZRu4U2+doKJzUI4TnRWietR5aPkZp1i34McbBj6lH vJqlRDOwspA1hdvddJqDcVgHKxrhCSBYzVfyUs6aHOHJ0d1ynlZ8TX5/gsLbBZtVNAe2 UcTQ== X-Gm-Message-State: AOAM531SXb+nDDpJq7B/ds10Cdyb1ZyO0qlYUpIzBXV3KIH53QdTl5cF qSaNejtxvbrZ95yg6/BnHQB+CrKuzWu4Bg== X-Google-Smtp-Source: ABdhPJy8Mb/RaDN4E9yiyhX9HRl5bhPkreXY/KdCrERlX6WBjqpAKbwRDF5yZPdwFRMoauRSVPM6Xg== X-Received: by 2002:aa7:92d9:0:b029:1bb:b6de:c872 with SMTP id k25-20020aa792d90000b02901bbb6dec872mr427305pfa.68.1613087203698; Thu, 11 Feb 2021 15:46:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 15:46:43 -0800 (PST) From: Mathieu Poirier <mathieu.poirier@linaro.org> To: ohad@wizery.com, bjorn.andersson@linaro.org, arnaud.pouliquen@st.com Subject: [PATCH v5 15/19] remoteproc: Properly deal with a kernel panic when attached Date: Thu, 11 Feb 2021 16:46:23 -0700 Message-Id: <20210211234627.2669674-16-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_184645_762759_62C23765 X-CRM114-Status: GOOD ( 13.97 ) 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 62f708662052..0dd9f02f52b6 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2693,7 +2693,11 @@ static int rproc_panic_handler(struct notifier_block *nb, unsigned long event, rcu_read_lock(); list_for_each_entry_rcu(rproc, &rproc_list, node) { - if (!rproc->ops->panic || rproc->state != RPROC_RUNNING) + if (!rproc->ops->panic) + continue; + + if (rproc->state != RPROC_RUNNING && + rproc->state != RPROC_ATTACHED) continue; d = rproc->ops->panic(rproc);