Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp259579pxa; Wed, 26 Aug 2020 09:50:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZlghn+K9CYhIssnfEwB0sRvR4ybMl4ORwuF8/Zhitu1BovC7eOpJsOSj0tG4H+PvvMFv4 X-Received: by 2002:a17:906:3e51:: with SMTP id t17mr6964947eji.486.1598460632803; Wed, 26 Aug 2020 09:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598460632; cv=none; d=google.com; s=arc-20160816; b=rOaesG0EfP8LqIzt9mkHokMhpugwWjvbqIaoifOH7WWoZ2mNCe+3CYmm36tRfWYaXq RjuSGKl46PZTds0Uvj328Pgp0CTtzeg1A4mzBUVKp5mTj9xqScgd1SuH/nvos5ZfwNBv Brd6cJP4WO1fo1EFnwCHbU40zbbFza32vOq0WhoOdzzMPy7vr5yDkFiqztitK7pYXB0H c0amRRjJxz78BQuC5ICtDWt6DDhDsLBiZm/jD0SOH30ox98CYxO7/d7MNOjZgrxdeYPf dgSgMNo1Qk4QmyhWB2vDDROM5pWIQSeDak4zFS4nvPS+/DNzzWudR8xV/Y9qdConsJil 11fA== 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=Tv4kkgaRKTSg5mtSljLIfWbV/kKMUzinzR1WF6eOzEg=; b=q0Lzs7ym0XV9pAKi25uau4+l8kuOdEZzYnJvXp8XBpXoDlbOxuqIehG0rsXVdbkiFZ 3WR77xm0KxV/Oy9sEOQs7P20re1XPUowVYokSYgtoG99xNEnX719zFA5REQVNTDWq2UK tErjqIP+HxVOqZiudh//HgzfbBsJ6USudKIyfsIIO43Khwzg/aTxONFziV2+OY6XR+hz /aeynyfogut68BgYREokqMDZ5HGUfEBp5RLYuiOxz8hL7467SxX3/7lRG2r03ryIfV6J 7+oc7J+47mTVmMkA4Tc+V21iTO9WHvXmgylQoaifzZDTcSexi2wGTszm8BqX25kpXeSl dnoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J+4aQEtM; 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 n9si1698729edv.310.2020.08.26.09.50.09; Wed, 26 Aug 2020 09:50:32 -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=J+4aQEtM; 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 S1728218AbgHZQrk (ORCPT + 99 others); Wed, 26 Aug 2020 12:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbgHZQpt (ORCPT ); Wed, 26 Aug 2020 12:45:49 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39D7BC061796 for ; Wed, 26 Aug 2020 09:45:45 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id h12so1318502pgm.7 for ; Wed, 26 Aug 2020 09:45:45 -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=Tv4kkgaRKTSg5mtSljLIfWbV/kKMUzinzR1WF6eOzEg=; b=J+4aQEtMWRdEKu9phF530PTZGUl/xpTYrzdCpeHbB+8t4qEY57QZZ57Oy0uPAG7nWx 4o1yCxg/bHvHeUri+8M0acPYPfr4CtxUJh5903KOR4u2OSWncpgRUzGawcbXVZ+UX3NC uyqfGC7n8eDOLw/mt2lHyNZq35ay3Dv7HTxUNXpgAa+7aVb9IAQgHUOPWw9J3RZi0my2 9Ghv7Soy2weYsjF3W4KQ+m/rX+jwIpGLFwkr1JjOH2R8eENS0dYzpmE4chQDSw6TlNn7 2wVCYXB6Jo/RUhdA8a9m7+P3piMKVs3mHmP54Vi8b92dfQv7zzr57oeQuGFoZOaYcJ3T 6tsA== 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=Tv4kkgaRKTSg5mtSljLIfWbV/kKMUzinzR1WF6eOzEg=; b=XwMrBKbWXIDYEmW4dPn0hVU4OCtuUkUkSKB9edR9b43IXLX+m7ik+7ZeStwQD2tBT8 Kvz0e3zs6+uW1Wv5JuhTsxDfDn/Xy5bPuYtVxUObHN9ZHPJwYhPckkacC1q5DfWjwQ/U 2Vfw2CihxLxFtnbCmf7pjLdu+gIaP1Gtkd/h7xjJRSKOWF+DrK+YDIZIM6t4bKxt5c3o YGwLmtTm6VBLuUzKUvhsYUBAXDDIOS2noNlorN3ifYUIqjBjgtulESHURqA0d/mjOjXs Kio01/MyUD4u/NAg1h0zb/aiaE3ElbICyik0igxIUcT8yJ+YQ1u8Wb3zQLRJ3tBls5DN NYhw== X-Gm-Message-State: AOAM532iftHXQrs8qh+IlipXUfaaUme3tzVM6afQVOXWOcvV497M15xT FxfMHhAH2ilb+4ncATBfWEweUA== X-Received: by 2002:a63:1d01:: with SMTP id d1mr6076566pgd.437.1598460344844; Wed, 26 Aug 2020 09:45:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:45:44 -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 13/13] remoteproc: Properly deal with a kernel panic when attached Date: Wed, 26 Aug 2020 10:45:29 -0600 Message-Id: <20200826164529.224476-14-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 The panic handler operation of registered remote processors should also be called when remote processors have been attached to. Signed-off-by: Mathieu Poirier --- drivers/remoteproc/remoteproc_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 5586582f54c5..54b5e3437ab5 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2491,7 +2491,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); -- 2.25.1