From: Mathieu Poirier <mathieu.poirier@linaro.org> To: peng.fan@nxp.com Cc: ohad@wizery.com, bjorn.andersson@linaro.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/9] remoteproc: add support to skip firmware load when recovery Date: Fri, 21 Feb 2020 11:42:36 -0700 [thread overview] Message-ID: <20200221184236.GA10368@xps15> (raw) In-Reply-To: <1582097265-20170-4-git-send-email-peng.fan@nxp.com> Hi Peng, On Wed, Feb 19, 2020 at 03:27:39PM +0800, peng.fan@nxp.com wrote: > From: Peng Fan <peng.fan@nxp.com> > > 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. For now I will not comment on the code - I just need clarifications on the scenario. In the specific case you are trying to address here, I understand that when the M4 crashes, the SCU will recognize that and reload the MCU firmware. Does the SCU also start the MCU or is that left to the remoteproc subsystem? Thanks, Mathieu > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > 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; > + } > } > > /* 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; > }; > -- > 2.16.4 >
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org> To: peng.fan@nxp.com Cc: ohad@wizery.com, devicetree@vger.kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/9] remoteproc: add support to skip firmware load when recovery Date: Fri, 21 Feb 2020 11:42:36 -0700 [thread overview] Message-ID: <20200221184236.GA10368@xps15> (raw) In-Reply-To: <1582097265-20170-4-git-send-email-peng.fan@nxp.com> Hi Peng, On Wed, Feb 19, 2020 at 03:27:39PM +0800, peng.fan@nxp.com wrote: > From: Peng Fan <peng.fan@nxp.com> > > 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. For now I will not comment on the code - I just need clarifications on the scenario. In the specific case you are trying to address here, I understand that when the M4 crashes, the SCU will recognize that and reload the MCU firmware. Does the SCU also start the MCU or is that left to the remoteproc subsystem? Thanks, Mathieu > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > 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; > + } > } > > /* 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; > }; > -- > 2.16.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-21 18:42 UTC|newest] Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-19 7:27 [PATCH 0/9] remoteproc: imx_rproc: support i.MX8/8M/7ULP peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 7:27 ` [PATCH 1/9] dt-bindings: remoteproc: Convert imx-rproc to json-schema peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 14:09 ` Rob Herring 2020-02-19 14:09 ` Rob Herring 2020-02-19 14:09 ` Rob Herring 2020-02-19 14:34 ` Peng Fan 2020-02-19 14:34 ` Peng Fan 2020-02-19 14:34 ` Peng Fan 2020-02-20 0:37 ` Rob Herring 2020-02-20 0:37 ` Rob Herring 2020-02-20 0:37 ` Rob Herring 2020-02-19 7:27 ` [PATCH 2/9] dt-bindings: remoteproc: imx-rproc: support i.MX[8,8M,7ULP] peng.fan 2020-02-19 7:27 ` [PATCH 2/9] dt-bindings: remoteproc: imx-rproc: support i.MX[8, 8M, 7ULP] peng.fan 2020-02-19 7:27 ` [PATCH 3/9] remoteproc: add support to skip firmware load when recovery peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 14:39 ` Arnaud POULIQUEN 2020-02-19 14:39 ` Arnaud POULIQUEN 2020-02-19 14:39 ` Arnaud POULIQUEN 2020-02-19 15:40 ` Peng Fan 2020-02-19 15:40 ` Peng Fan 2020-02-19 15:40 ` Peng Fan 2020-02-20 8:49 ` Arnaud POULIQUEN 2020-02-20 8:49 ` Arnaud POULIQUEN 2020-02-20 8:49 ` Arnaud POULIQUEN 2020-02-21 18:42 ` Mathieu Poirier [this message] 2020-02-21 18:42 ` Mathieu Poirier 2020-02-23 0:01 ` Peng Fan 2020-02-23 0:01 ` Peng Fan 2020-02-23 0:01 ` Peng Fan 2020-02-19 7:27 ` [PATCH 4/9] remoteproc: imx_rproc: surport early booted remote processor peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-21 21:16 ` Mathieu Poirier 2020-02-21 21:16 ` Mathieu Poirier 2020-02-23 0:05 ` Peng Fan 2020-02-23 0:05 ` Peng Fan 2020-02-23 0:05 ` Peng Fan 2020-02-19 7:27 ` [PATCH 5/9] remoteproc: imx_rproc: parse early-booted property peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-21 21:56 ` Mathieu Poirier 2020-02-21 21:56 ` Mathieu Poirier 2020-02-23 0:11 ` Peng Fan 2020-02-23 0:11 ` Peng Fan 2020-02-23 0:11 ` Peng Fan 2020-02-19 7:27 ` [PATCH 6/9] remoteproc: imx_proc: enable virtio/mailbox peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 7:27 ` [PATCH 7/9] remoteproc: imx_rproc: add i.MX8QM/QXP peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 7:27 ` [PATCH 8/9] remoteproc: imx_rproc: support i.MX7ULP peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 7:27 ` [PATCH 9/9] remoteproc: imx_rproc: add i.MX8MM support peng.fan 2020-02-19 7:27 ` peng.fan 2020-02-19 18:24 ` [PATCH 0/9] remoteproc: imx_rproc: support i.MX8/8M/7ULP Mathieu Poirier 2020-02-19 18:24 ` Mathieu Poirier 2020-02-20 1:36 ` Peng Fan 2020-02-20 1:36 ` Peng Fan 2020-02-20 21:25 ` Mathieu Poirier 2020-02-20 21:25 ` Mathieu Poirier 2020-02-21 1:35 ` Peng Fan 2020-02-21 1:35 ` Peng Fan 2020-02-21 6:51 ` Oleksij Rempel 2020-02-21 6:51 ` Oleksij Rempel 2020-02-21 6:56 ` Peng Fan 2020-02-21 6:56 ` Peng Fan 2020-02-21 6:56 ` Peng Fan 2020-02-21 7:03 ` Uwe Kleine-König 2020-02-21 7:03 ` Uwe Kleine-König 2020-02-21 7:03 ` Uwe Kleine-König 2020-02-21 7:08 ` Peng Fan 2020-02-21 7:08 ` Peng Fan 2020-02-21 7:08 ` Peng Fan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200221184236.GA10368@xps15 \ --to=mathieu.poirier@linaro.org \ --cc=bjorn.andersson@linaro.org \ --cc=devicetree@vger.kernel.org \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-remoteproc@vger.kernel.org \ --cc=ohad@wizery.com \ --cc=peng.fan@nxp.com \ --cc=robh+dt@kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.