Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31442408rwd; Thu, 6 Jul 2023 22:35:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlH5oMvTLuluKLhGHxfA+SNiNVKxjS2Sf0GpMd8hdenY+VQTA6kNEpgAOtenhJobcscN2IJ3 X-Received: by 2002:a17:903:246:b0:1b0:3637:384e with SMTP id j6-20020a170903024600b001b03637384emr3865459plh.25.1688708115288; Thu, 06 Jul 2023 22:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688708115; cv=none; d=google.com; s=arc-20160816; b=sqXo77NuyuMVRz/pvVyHCTEnKkXiumau7NwLsgUbFrqAa9ByDnqD30g5tPFRov3By5 55kRIDo74p0PPMee9tcAoBAnXJtxEx6A8zDE36zhr+VgMJvsR31iWy4f6y82P7Ecqlxh DucXQButFN7wXqG4p6uJfOb8ollkiY+zED6/rrJDw0BIFUoZwuSzl0lMBnKxdT2nrgn0 dhA7cdUUthzURk9AkwUi3RSBHE+txne1t4JfBOWUz6oEDJAwxTEhm8ATIJoz4kJUXiw8 2q9KoPDQrvAamGbuqL7POHYDB6EyrL9dBmyO23+CzYioofeVFFzWV9lIreW8VAdRKibB 1kDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3sl11VhqG8akLMJjF6rGhsbeRgG3hMhhC2goJPD+85s=; fh=fiUFlTmdXAnPLHH0bIyIc4brKi/t2/OmtpRJQ8s00Ug=; b=ZhiiOAUc+r+yzbcsSzPrITRSS76fo7qaA9NZUKNz0tZyXMk6ehGoDlVX3pfMKwBInK OpG8fqwCxiKLJaeX04rD5OSJ0GnlEtbTw8YejwmXPoM0bpfyIOvYvn8UmFRfmvoh6my4 S7W03Ke0UezYb6XxXC9iHkT7jLTi+zuR6PAXI633jBf68sY69ha8DwHYDolMc7dMGNay O76Voc5Eq8gdLNkf++vUIHr5Bi/k6lOsIv1nGYfMVYMilLocov6csbSz9zVpHsa4znkw rWrArCnrmlhPhVdPzTHKcXXOHLSHMo7Ly0VfVbsC9GAZJ2r1B9yECbOgBManBCsIoe3k GsBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dOUcxSPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a170902e84e00b001b820de73bfsi3011555plg.229.2023.07.06.22.35.03; Thu, 06 Jul 2023 22:35:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dOUcxSPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232507AbjGGF0b (ORCPT + 99 others); Fri, 7 Jul 2023 01:26:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231245AbjGGF01 (ORCPT ); Fri, 7 Jul 2023 01:26:27 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22B3D1BF4; Thu, 6 Jul 2023 22:26:22 -0700 (PDT) X-UUID: cc301efc1c8611ee9cb5633481061a41-20230707 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=3sl11VhqG8akLMJjF6rGhsbeRgG3hMhhC2goJPD+85s=; b=dOUcxSPR2PjQrnZWc+b8whKivcaMHRy2ejsPZw5ekEoOyenmTmPon7hLjfp9/z5FB2jTbQukilt1kgeo440a4UiTFb5rm6CgHX04FFfuopLgYLamM2z9kBnBd8Yv4xHcW4q8/Qoo5xuSGh45JWUgCVbh/jOweKe9UUpCmcxKvfo=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.27,REQID:e6c0afbe-ff08-472d-85d6-5874eeb984d0,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.27,REQID:e6c0afbe-ff08-472d-85d6-5874eeb984d0,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:01c9525,CLOUDID:e86caa0d-26a8-467f-b838-f99719a9c083,B ulkID:230707132618QZSUWG3G,BulkQuantity:0,Recheck:0,SF:28|17|19|48|38|29,T C:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_SNR,TF_CID_SPAM_SDM,TF_CID_SPAM_ASC, TF_CID_SPAM_FAS X-UUID: cc301efc1c8611ee9cb5633481061a41-20230707 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1861551719; Fri, 07 Jul 2023 13:26:17 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.186) by MTKMBS14N2.mediatek.inc (172.21.101.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 7 Jul 2023 13:26:15 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 7 Jul 2023 13:26:15 +0800 From: Tinghan Shen To: Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Tinghan Shen CC: , , , , , Subject: [PATCH v14 10/12] remoteproc: mediatek: Report watchdog crash to all cores Date: Fri, 7 Jul 2023 13:26:10 +0800 Message-ID: <20230707052612.27521-11-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230707052612.27521-1-tinghan.shen@mediatek.com> References: <20230707052612.27521-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Once the SCP watchdog timeout happened, trigger the rproc recovery flow on all cores. Signed-off-by: Tinghan Shen --- drivers/remoteproc/mtk_scp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 9fed5161f094..7e786aaf04e1 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -80,8 +80,14 @@ EXPORT_SYMBOL_GPL(scp_put); static void scp_wdt_handler(struct mtk_scp *scp, u32 scp_to_host) { + struct mtk_scp_of_cluster *scp_cluster = platform_get_drvdata(scp->cluster_pdev); + struct mtk_scp *scp_node; + dev_err(scp->dev, "SCP watchdog timeout! 0x%x", scp_to_host); - rproc_report_crash(scp->rproc, RPROC_WATCHDOG); + + /* report watchdog timeout to all cores */ + list_for_each_entry(scp_node, &scp_cluster->mtk_scp_list, elem) + rproc_report_crash(scp_node->rproc, RPROC_WATCHDOG); } static void scp_init_ipi_handler(void *data, unsigned int len, void *priv) -- 2.18.0