public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Richard <thomas.richard@bootlin.com>
To: Nishanth Menon <nm@ti.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: Mon, 10 Nov 2025 16:11:15 +0100	[thread overview]
Message-ID: <5ea31c61-7bf5-441c-a7c1-e346039d03d2@bootlin.com> (raw)
In-Reply-To: <20251107115457.i6tkt466bp62mwp2@whiff>

Hello Nishanth,

On 11/7/25 12:54 PM, Nishanth Menon wrote:
> 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?

A patch was sent to handle this in intr driver [1], but the feedback
was: this shall be done in ti_sci driver [2].

And now I have an other argument:

I'm actually working on having functional PCIe after a suspend-resume on
J784s4. And I noticed that set_parent (sci-clk driver) shall be restored
during resume. Restoring irqs and set_parent clk config is only needed
on Jacinto platforms. The sci-clk and inta/intr driver don't know if we
are running on a Jacinto platform or not. The ti_sci have the
information so it can take the decision to restore irqs and set_parent
configs.

[1] https://lore.kernel.org/all/20220607061912.12222-1-a-govindraju@ti.com/
[2] https://lore.kernel.org/all/87r0l96f0e.wl-maz@kernel.org/

> 
>>
>> 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?

I did the test with arm64 defconfig on j784s4 and the list has 43 elements.
I'll look at the hlist.

Best Regards,
Thomas


      reply	other threads:[~2025-11-10 15:11 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
2025-11-10 15:11     ` Thomas Richard [this message]

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=5ea31c61-7bf5-441c-a7c1-e346039d03d2@bootlin.com \
    --to=thomas.richard@bootlin.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=nm@ti.com \
    --cc=p-mantena@ti.com \
    --cc=richard.genoud@bootlin.com \
    --cc=ssantosh@kernel.org \
    --cc=thomas.petazzoni@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