From: Chris Lew <christopher.lew@oss.qualcomm.com>
To: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-remoteproc@vger.kernel.org,
Chris Lew <chris.lew@oss.qualcomm.com>
Subject: Re: [PATCH v3 1/2] soc: qcom: smp2p: Add irqchip state support
Date: Thu, 29 Jan 2026 16:46:19 -0800 [thread overview]
Message-ID: <aXv/W2CDvixANtIx@hu-clew-lv.qualcomm.com> (raw)
In-Reply-To: <52d01bf9-2d73-4a7a-a734-2330bc426bd7@oss.qualcomm.com>
On Thu, Jan 29, 2026 at 04:26:38PM +0530, Deepak Kumar Singh wrote:
>
> On 1/27/2026 6:25 PM, Konrad Dybcio wrote:
> > On 1/27/26 11:38 AM, Deepak Kumar Singh wrote:
> > > From: Chris Lew <chris.lew@oss.qualcomm.com>
> > >
> > > A remoteproc booted during earlier boot stages such as UEFI or the
> > > bootloader, may need to be attached to without restarting the remoteproc
> > > hardware. To do this the remoteproc will need to check the ready and
> > > handover states in smp2p without an interrupt notification. Create
> > > qcom_smp2p_start_in() to initialize the shadow state without notifying
> > > clients because these early events happened in the past.
> > >
> > > Add support for the .irq_get_irqchip_state callback so remoteproc can
> > > read the current state of the fatal, ready and handover bits.
> > >
> > > Signed-off-by: Chris Lew <chris.lew@oss.qualcomm.com>
> > > Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
> > > ---
> > > drivers/soc/qcom/smp2p.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 55 insertions(+)
> > >
> > > diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
> > > index cb515c2340c1..c27ffb44b825 100644
> > > --- a/drivers/soc/qcom/smp2p.c
> > > +++ b/drivers/soc/qcom/smp2p.c
> > > @@ -222,6 +222,39 @@ static void qcom_smp2p_negotiate(struct qcom_smp2p *smp2p)
> > > }
> > > }
> > > +static void qcom_smp2p_start_in(struct qcom_smp2p *smp2p)
> > > +{
> > > + unsigned int smem_id = smp2p->smem_items[SMP2P_INBOUND];
> > > + unsigned int pid = smp2p->remote_pid;
> > > + char buf[SMP2P_MAX_ENTRY_NAME];
> > > + struct smp2p_smem_item *in;
> > > + struct smp2p_entry *entry;
> > > + size_t size;
> > > + int i;
> > > +
> > > + in = qcom_smem_get(pid, smem_id, &size);
> > > + if (IS_ERR(in))
> > > + return;
> > > +
> > > + smp2p->in = in;
> > > +
> > > + /* Check if version is initialized by the remote. */
> > > + if (in->version == 0)
> > > + return;
> > > +
> > > + for (i = smp2p->valid_entries; i < in->valid_entries; i++) {
> > > + list_for_each_entry(entry, &smp2p->inbound, node) {
> > > + memcpy(buf, in->entries[i].name, sizeof(buf));
> > Is there a reason for this copy at all?
> I don't see a compelling reason. This code snippet is same as present in
> qcom_smp2p_notify_in().
My understanding was that we do this copy because we don't want to do a
strcmp on memory that the remote could change at any time. Maybe it's
overkill but I thought it was considered good practice and as Deepak
mentioned, it is similarly present in qcom_smp2p_notify_in().
> > [...]
> >
> > > + /* Check inbound entries in the case of early boot processor */
> > "in case a remote processor has already been started"?
> This i can update in case new patch set is required.
> > Konrad
> >
next prev parent reply other threads:[~2026-01-30 0:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 10:38 [PATCH v3 0/2] soc: qcom: smp2p: Add support for remoteproc early attach Deepak Kumar Singh
2026-01-27 10:38 ` [PATCH v3 1/2] soc: qcom: smp2p: Add irqchip state support Deepak Kumar Singh
2026-01-27 12:55 ` Konrad Dybcio
2026-01-29 10:56 ` Deepak Kumar Singh
2026-01-30 0:46 ` Chris Lew [this message]
2026-01-30 10:13 ` Konrad Dybcio
2026-02-04 7:21 ` Deepak Kumar Singh
2026-02-04 12:27 ` Konrad Dybcio
2026-01-27 10:38 ` [PATCH v3 2/2] soc: qcom: smp2p: Add support for smp2p v2 Deepak Kumar Singh
2026-03-16 2:02 ` [PATCH v3 0/2] soc: qcom: smp2p: Add support for remoteproc early attach Bjorn Andersson
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=aXv/W2CDvixANtIx@hu-clew-lv.qualcomm.com \
--to=christopher.lew@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=chris.lew@oss.qualcomm.com \
--cc=deepak.singh@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.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: 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
all inboxes | Powered by JetHome®