[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ea31c61-7bf5-441c-a7c1-e346039d03d2@bootlin.com>
Date: Mon, 10 Nov 2025 16:11:15 +0100
From: Thomas Richard <thomas.richard@...tlin.com>
To: Nishanth Menon <nm@...com>
Cc: Tero Kristo <kristo@...nel.org>, Santosh Shilimkar <ssantosh@...nel.org>,
Gregory CLEMENT <gregory.clement@...tlin.com>, richard.genoud@...tlin.com,
Udit Kumar <u-kumar1@...com>, Prasanth Mantena <p-mantena@...com>,
Abhash Kumar <a-kumar2@...com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 2/2] firmware: ti_sci: handle IRQ restore in
BOARDCFG_MANAGED mode during resume
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@...tlin.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
Powered by blists - more mailing lists