From: Nishanth Menon <nm@ti.com>
To: "Thomas Richard (TI.com)" <thomas.richard@bootlin.com>
Cc: Tero Kristo <kristo@kernel.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Gregory CLEMENT <gregory.clement@bootlin.com>,
<richard.genoud@bootlin.com>, Udit Kumar <u-kumar1@ti.com>,
Prasanth Mantena <p-mantena@ti.com>,
"Abhash Kumar" <a-kumar2@ti.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 2/2] firmware: ti_sci: handle IRQ restore in BOARDCFG_MANAGED mode during resume
Date: Fri, 7 Nov 2025 05:54:57 -0600 [thread overview]
Message-ID: <20251107115457.i6tkt466bp62mwp2@whiff> (raw)
In-Reply-To: <20251017-ti-sci-jacinto-s2r-restore-irq-v1-2-34d4339d247a@bootlin.com>
On 16:44-20251017, Thomas Richard (TI.com) wrote:
> In BOARDCFG_MANAGED mode, the firmware cannot restore IRQs during
> resume. This responsibility is delegated to the ti_sci driver,
> which maintains an internal list of all requested IRQs. This list
> is updated on each set/free operation, and all IRQs are restored
> during the resume_noirq() phase.
Couple of drive by comments:
clarify why is this not handled by ia / ir driver?
>
> Signed-off-by: Thomas Richard (TI.com) <thomas.richard@bootlin.com>
> ---
> drivers/firmware/ti_sci.c | 143 +++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 135 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index f9f1a67e8e66b0a4048fae04ce31be54ca5cba7a..a211f8805dd21c7675b8cefd61929ecfda8e0f7f 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -87,6 +87,16 @@ struct ti_sci_desc {
> int max_msg_size;
[...]
> +
> + irq_desc.valid_params = valid_params;
> + irq_desc.src_id = src_id;
> + irq_desc.src_index = src_index;
> + irq_desc.dst_id = dst_id;
> + irq_desc.dst_host_irq = dst_host_irq;
> + irq_desc.ia_id = ia_id;
> + irq_desc.vint = vint;
> + irq_desc.global_event = global_event;
> + irq_desc.vint_status_bit = vint_status_bit;
> + irq_desc.secondary_host = s_host;
> +
> + list_for_each(this, &info->irqs.list) {
list_for_each_entry_safe ?
How big is this list on a j784s4 class device? is it worth creating a
irq_desc_hash and using a hlist a better option?
> + this_irq = list_entry(this, struct ti_sci_irq, list);
> + if (ti_sci_irq_equal(irq_desc, this_irq->desc)) {
> + list_del(&this_irq->list);
> + kfree(this_irq);
> + break;
> + }
> + }
> +
[...]
> ret = ti_sci_msg_cmd_lpm_wake_reason(&info->handle, &source, &time, &pin, &mode);
> /* Do not fail to resume on error as the wake reason is not critical */
> if (!ret)
> @@ -3961,6 +4085,9 @@ static int ti_sci_probe(struct platform_device *pdev)
> list_add_tail(&info->node, &ti_sci_list);
> mutex_unlock(&ti_sci_list_mutex);
>
> + if (info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED)
> + INIT_LIST_HEAD(&info->irqs.list);
probably not worth doing a conditional initialization here.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
next prev parent reply other threads:[~2025-11-07 11:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 14:44 [PATCH RFC 0/2] firmware: ti_sci: Introduce BOARDCFG_MANAGED mode for Jacinto family Thomas Richard (TI.com)
2025-10-17 14:44 ` [PATCH RFC 1/2] firmware: ti_sci: add BOARDCFG_MANAGED mode support Thomas Richard (TI.com)
2025-11-07 11:41 ` Nishanth Menon
2025-11-10 15:09 ` Thomas Richard
2025-10-17 14:44 ` [PATCH RFC 2/2] firmware: ti_sci: handle IRQ restore in BOARDCFG_MANAGED mode during resume Thomas Richard (TI.com)
2025-11-07 11:54 ` Nishanth Menon [this message]
2025-11-10 15:11 ` Thomas Richard
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=20251107115457.i6tkt466bp62mwp2@whiff \
--to=nm@ti.com \
--cc=a-kumar2@ti.com \
--cc=gregory.clement@bootlin.com \
--cc=kristo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p-mantena@ti.com \
--cc=richard.genoud@bootlin.com \
--cc=ssantosh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=thomas.richard@bootlin.com \
--cc=u-kumar1@ti.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