From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 07558C34047 for ; Wed, 19 Feb 2020 14:40:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BEC4924654 for ; Wed, 19 Feb 2020 14:40:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dM2eATlT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="z4egeqlS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEC4924654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LI7/+QKGn7cvCderQ1IJojgsWfnDnATKk1/J3StgqWo=; b=dM2eATlTTuUW2W fVeWvi39HGAoA3Ywci1drsdIXEds8O5nap2QPY25XsPUbzha8SVt5fPJTS6MuoKcG9nB7MURRRbNF Y/Ri8E6KZhaUexmBW4S4Yl50jXqQZyXpGmvH9MsO77SrZYu8ts/+Sttp/airRNcsGUGGAE7hUYY+V 4+npOFAKUV25i32lwb/PYM7igFwDSHTTUD1BtzvLm8W7cjOq2csbUXilrTBK6preV+EPKmFKgkT71 SGlwgszDp81hu3meXGzSBwarqzEgixLuI793xvbou6TYvLVC+k3gotRxByw3nKvYUmzfXZdEc7Qn3 PaY2ei5lx4diBi4e/CTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4QW9-0002bR-2k; Wed, 19 Feb 2020 14:40:01 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4QW6-0002b0-37 for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 14:39:59 +0000 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01JEXi2Q030251; Wed, 19 Feb 2020 15:39:51 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=l0m5SnrqcSKwIcJ02I4m47wU3dRyUV2O0AFo1NvXshc=; b=z4egeqlSPY3kDhwoRhFHWlSX7bCPaRHnu200fjlGNsRRzK2edQk0z03w3v2mTlpvUSCZ Nkwzix9UVdDCFumMwEg+AIYxxO4DNRxzP+1rGsunFDhge+EwGUiVGiFi4pG0f6xWcMB0 z573OCTee15n34WTnddH30iFeAQ2CgFu/+5bmHjx6sf2jKCrzVq3GKbrOF4Z8zeBptiy 8GiEiRmXmJWrIQ7I8m+S+0l7etv9fmwtxDtZ+7YJquIHuItyTg7eo/pLhvgWKPzWXBAg 4o+vllWecsmTeDOimek+tyLd1GF60R1x1H1EKxi9gsJMwqM98LtT33SsUkKe/XVn/Qot ag== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2y8ub1bhcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Feb 2020 15:39:51 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B903710003D; Wed, 19 Feb 2020 15:39:44 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A1D342BEC6C; Wed, 19 Feb 2020 15:39:44 +0100 (CET) Received: from lmecxl0889.lme.st.com (10.75.127.45) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 19 Feb 2020 15:39:43 +0100 Subject: Re: [PATCH 3/9] remoteproc: add support to skip firmware load when recovery To: , , , , , , , References: <1582097265-20170-1-git-send-email-peng.fan@nxp.com> <1582097265-20170-4-git-send-email-peng.fan@nxp.com> From: Arnaud POULIQUEN Message-ID: <0d90b2c2-cb02-d052-57cb-b11c5f815f07@st.com> Date: Wed, 19 Feb 2020 15:39:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <1582097265-20170-4-git-send-email-peng.fan@nxp.com> Content-Language: en-US X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-02-19_03:2020-02-19, 2020-02-19 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_063958_434855_2BBF0D12 X-CRM114-Status: GOOD ( 22.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 2/19/20 8:27 AM, peng.fan@nxp.com wrote: > From: Peng Fan > > Remote processor such as M4 inside i.MX8QXP is not handled by Linux > when it is configured to run inside its own hardware partition by > system control unit(SCU). So even remote processor crash reset, it is > handled by SCU, not linux. To such case, firmware load should be > ignored, So introduce skip_fw_load_recovery and platform driver > should set it if needed. > > Signed-off-by: Peng Fan > --- > drivers/remoteproc/remoteproc_core.c | 19 +++++++++++-------- > include/linux/remoteproc.h | 1 + > 2 files changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 876b5420a32b..ca310e3582bf 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -1678,20 +1678,23 @@ int rproc_trigger_recovery(struct rproc *rproc) > if (ret) > goto unlock_mutex; > > - /* generate coredump */ > - rproc_coredump(rproc); > + if (!rproc->skip_fw_load_recovery) { > + /* generate coredump */ > + rproc_coredump(rproc); > > - /* load firmware */ > - ret = request_firmware(&firmware_p, rproc->firmware, dev); > - if (ret < 0) { > - dev_err(dev, "request_firmware failed: %d\n", ret); > - goto unlock_mutex; > + /* load firmware */ > + ret = request_firmware(&firmware_p, rproc->firmware, dev); > + if (ret < 0) { > + dev_err(dev, "request_firmware failed: %d\n", ret); > + goto unlock_mutex; > + } Any specific reason to not reuse skip_fw_load here? FYI i'm reworking the Loic's patch and i plan to implement the recovery part using skip_fw_load... Regards Arnaud > } > > /* boot the remote processor up again */ > ret = rproc_start(rproc, firmware_p); > > - release_firmware(firmware_p); > + if (!rproc->skip_fw_load_recovery) > + release_firmware(firmware_p); > > unlock_mutex: > mutex_unlock(&rproc->lock); > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 4fd5bedab4fa..fe6ee253b385 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -514,6 +514,7 @@ struct rproc { > bool has_iommu; > bool auto_boot; > bool skip_fw_load; > + bool skip_fw_load_recovery; > struct list_head dump_segments; > int nb_vdev; > }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel