From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Deepak Kumar Singh <quic_deesin@quicinc.com>,
Jingyi Wang <jingyi.wang@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Chris Lew <chris.lew@oss.qualcomm.com>
Subject: Re: [PATCH 1/2] soc: qcom: smp2p: Add irqchip state support
Date: Tue, 21 Oct 2025 11:35:06 +0200 [thread overview]
Message-ID: <344f0f72-27c5-4b88-99ee-f71065cc3a5f@oss.qualcomm.com> (raw)
In-Reply-To: <c239bce2-4bef-4085-8a74-c6d7c863febf@quicinc.com>
On 10/21/25 10:12 AM, Deepak Kumar Singh wrote:
>
>
> On 9/24/2025 8:20 PM, Konrad Dybcio wrote:
>> On 9/24/25 6:18 AM, Jingyi Wang 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.
>>>
>>> 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>
>>> Co-developed-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
>>> Signed-off-by: Jingyi Wang <jingyi.wang@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..e2cfd9ec8875 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 and set to v2 */
>>> + if (in->version == 0)
>>> + return;
>>
>> This doesn't seem to be fully in line with the comment
>>
>> Konrad
>>
> Hi Konard,
>
> Can you please elaborate more on this?
> in->version == 0 means remote has not initialized the version yet, so no need of enumerating entries. For other case i.e in->version == 1 or 2, in entries added by early booted remote has to be enumerated.
It's not at all obvious that 0 is supposed to mean "uninitialized"
Please #define it
Konrad
next prev parent reply other threads:[~2025-10-21 9:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 4:18 [PATCH 0/2] soc: qcom: smp2p: Add support for remoteproc early attach Jingyi Wang
2025-09-24 4:18 ` [PATCH 1/2] soc: qcom: smp2p: Add irqchip state support Jingyi Wang
2025-09-24 14:50 ` Konrad Dybcio
2025-10-21 8:12 ` Deepak Kumar Singh
2025-10-21 9:35 ` Konrad Dybcio [this message]
2025-10-22 10:57 ` Deepak Kumar Singh
2025-10-22 22:13 ` Bjorn Andersson
2025-10-23 1:05 ` Christopher Lew
2025-09-24 4:18 ` [PATCH 2/2] soc: qcom: smp2p: Add support for smp2p v2 Jingyi Wang
2025-09-24 14:57 ` Konrad Dybcio
2025-10-21 8:23 ` Deepak Kumar Singh
2025-10-21 9:39 ` Konrad Dybcio
2025-10-22 10:50 ` Deepak Kumar Singh
2025-10-29 0:35 ` Christopher Lew
2025-10-22 22:19 ` Bjorn Andersson
2025-10-23 2:14 ` Jingyi Wang
2025-10-29 0:44 ` Christopher Lew
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=344f0f72-27c5-4b88-99ee-f71065cc3a5f@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=chris.lew@oss.qualcomm.com \
--cc=jingyi.wang@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_deesin@quicinc.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
all inboxes | Powered by JetHome®