From: Bjorn Andersson <andersson@kernel.org>
To: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
Cc: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Luca Weiss <luca.weiss@fairphone.com>,
Bartosz Golaszewski <brgl@kernel.org>,
Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Konrad Dybcio <konradybcio@kernel.org>,
shengchao.guo@oss.qualcomm.com, aiqun.yu@oss.qualcomm.com,
tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com,
yijie.yang@oss.qualcomm.com, linux-arm-msm@vger.kernel.org,
linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
Subject: Re: [PATCH v6 5/6] remoteproc: qcom: pas: Add late attach support for subsystems
Date: Mon, 8 Jun 2026 21:33:01 -0500 [thread overview]
Message-ID: <aid5y4dd62fHi63l@baldur> (raw)
In-Reply-To: <e67907bc-ce96-4654-b210-2ae8f35cacc7@oss.qualcomm.com>
On Thu, May 21, 2026 at 11:42:49AM +0800, Jingyi Wang wrote:
>
>
> On 5/20/2026 4:27 PM, Mukesh Ojha wrote:
> > On Tue, May 19, 2026 at 12:24:23AM -0700, Jingyi Wang wrote:
> > > Subsystems can be brought out of reset by entities such as bootloaders.
> > > As the irq enablement could be later than subsystem bring up, the state
> > > of subsystem should be checked by reading SMP2P bits.
> > >
> > > A new qcom_pas_attach() function is introduced. if a crash state is
> > > detected for the subsystem, rproc_report_crash() is called. If the ready
> > > state is detected, it will be marked as "attached", otherwise it could
> > > be the early boot feature is not supported by other entities. In this
> > > case, the state will be marked as RPROC_OFFLINE so that the PAS driver
> > > can load the firmware and start the remoteproc.
> > >
> > > Co-developed-by: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
> > > Signed-off-by: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
> > > Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> > > ---
> > > drivers/remoteproc/qcom_q6v5_pas.c | 58 ++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 58 insertions(+)
> > >
> > > diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> > > index da27d1d3c9da..ac2a00aacd2e 100644
> > > --- a/drivers/remoteproc/qcom_q6v5_pas.c
> > > +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> > > @@ -60,6 +60,7 @@ struct qcom_pas_data {
> > > int region_assign_count;
> > > bool region_assign_shared;
> > > int region_assign_vmid;
> > > + bool early_boot;
> > > };
> > > struct qcom_pas {
> > > @@ -510,6 +511,57 @@ static unsigned long qcom_pas_panic(struct rproc *rproc)
> > > return qcom_q6v5_panic(&pas->q6v5);
> > > }
> > > +static int qcom_pas_attach(struct rproc *rproc)
> > > +{
> > > + int ret;
> > > + struct qcom_pas *pas = rproc->priv;
> > > + bool ready_state;
> > > + bool crash_state;
> > > +
> > > + pas->q6v5.handover_issued = true;
> > > + enable_irq(pas->q6v5.handover_irq);
> > > +
> > > + pas->q6v5.running = true;
> > > + ret = irq_get_irqchip_state(pas->q6v5.fatal_irq,
> > > + IRQCHIP_STATE_LINE_LEVEL, &crash_state);
> > > +
> > > + if (ret)
> > > + goto disable_running;
> > > +
> > > + if (crash_state) {
> > > + dev_err(pas->dev, "Subsystem has crashed before driver probe\n");
> > > + rproc_report_crash(rproc, RPROC_FATAL_ERROR);
> >
> > I am not sure if this is already discussed, but what if it is the first
> > crash with recovery and coredump enabled? What would be in the dump,
> > nothing? As there is no segment, is it expected since Linux did not load
> > this?
> >
> > This is even true if it is a crash after a successful attach.
> >
>
> It is suggested by Bjorn:
> https://lore.kernel.org/all/qfls6xlvfppqw7p6rjpmzqesh6sbob4myfc6dz47qh3jywqrjk@5xiutkbybk5d/
>
I requested that we try to recover the subsystem if we determine that is
has crashed, but Mukesh is talking about the fact that we don't have the
ELF header for that image to there are no segments loaded to perform the
coredump against.
I'm not aware of a discussion related to this...
> I did a hack to test the recovery by setting crash_state true, it can recovery
> (stop and start) successfully with below patches:
> https://lore.kernel.org/all/20260519-rproc-attach-issue-v2-0-caa1eaf75081@oss.qualcomm.com/
>
> For coredump, it will return from the first "list_empty(&rproc->dump_segments)" check in
> rproc_coredump as segments are not configured in attach.
>
This is what Mukesh is asking about.
Regards,
Bjorn
> Thanks,
> Jingyi
>
>
> > @Sibi, has this series been tested on Glymur with KVM?
> > I don't see the iommu property in the below patch.
> > https://lore.kernel.org/lkml/20260403-glymur-soccp-v3-1-f0e8d57f11ba@oss.qualcomm.com/
> >
>
next prev parent reply other threads:[~2026-06-09 2:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 7:24 [PATCH v6 0/6] Add binding and driver for Kaanapali SoCCP Jingyi Wang
2026-05-19 7:24 ` [PATCH v6 1/6] dt-bindings: remoteproc: qcom: cleanup qcom,adsp.yaml Jingyi Wang
2026-05-19 7:24 ` [PATCH v6 2/6] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common Jingyi Wang
2026-05-19 7:24 ` [PATCH v6 3/6] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms Jingyi Wang
2026-05-19 8:05 ` sashiko-bot
2026-05-19 8:45 ` Shawn Guo
2026-05-20 2:44 ` Jingyi Wang
2026-05-19 7:24 ` [PATCH v6 4/6] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Hawi SoC Jingyi Wang
2026-05-19 9:54 ` Rob Herring (Arm)
2026-05-20 4:11 ` Jingyi Wang
2026-05-19 7:24 ` [PATCH v6 5/6] remoteproc: qcom: pas: Add late attach support for subsystems Jingyi Wang
2026-05-19 8:33 ` Shawn Guo
2026-05-19 8:50 ` sashiko-bot
2026-05-20 8:27 ` Mukesh Ojha
2026-05-20 10:18 ` Shawn Guo
2026-05-21 3:42 ` Jingyi Wang
2026-05-21 11:22 ` Mukesh Ojha
2026-06-09 2:33 ` Bjorn Andersson [this message]
2026-05-22 12:07 ` Stephan Gerhold
2026-05-25 4:30 ` Shawn Guo
2026-06-02 7:49 ` Jingyi Wang
2026-05-19 7:24 ` [PATCH v6 6/6] remoteproc: qcom_q6v5_pas: Add SoCCP node on Kaanapali Jingyi Wang
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=aid5y4dd62fHi63l@baldur \
--to=andersson@kernel.org \
--cc=aiqun.yu@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gokul.krishnakumar@oss.qualcomm.com \
--cc=jingyi.wang@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=mani@kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=shengchao.guo@oss.qualcomm.com \
--cc=sibi.sankar@oss.qualcomm.com \
--cc=tingwei.zhang@oss.qualcomm.com \
--cc=trilok.soni@oss.qualcomm.com \
--cc=yijie.yang@oss.qualcomm.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox