[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ed481c4-0a47-4616-97f6-89f58e423eed@bootlin.com>
Date: Thu, 18 Dec 2025 11:17:06 +0100
From: Thomas Richard <thomas.richard@...tlin.com>
To: Dhruva Gole <d-gole@...com>, "Kumar, Udit" <u-kumar1@...com>
Cc: Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
Santosh Shilimkar <ssantosh@...nel.org>,
Michael Turquette <mturquette@...libre.com>, Stephen Boyd
<sboyd@...nel.org>, Gregory CLEMENT <gregory.clement@...tlin.com>,
richard.genoud@...tlin.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,
linux-clk@...r.kernel.org
Subject: Re: [PATCH v3 2/4] firmware: ti_sci: handle IRQ restore in
BOARDCFG_MANAGED mode during resume
On 12/17/25 6:29 AM, Dhruva Gole wrote:
> On Dec 16, 2025 at 08:17:24 +0530, Kumar, Udit wrote:
>>
>> On 12/5/2025 7:58 PM, 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.
>>>
>>> Signed-off-by: Thomas Richard (TI.com) <thomas.richard@...tlin.com>
[...]
>>> +
>>> + hash_for_each_possible_safe(info->irqs, this_irq, tmp_node, node,
>>> + ti_sci_irq_hash(&irq_desc)) {
>>> + if (ti_sci_irq_equal(&irq_desc, &this_irq->desc)) {
>>> + hlist_del(&this_irq->node);
>>> + kfree(this_irq);
>>> + return 0;
>>
>>
>> IMO, you can restrict saving of irq and list management to fw having
>>
>> BOARDCFG_MANAGED capability.
>>
>> Dhurva ?
>
> Yes I agree with Udit, we should gate hash operations by firmware capability.
> Everywhere else you'll need to make it conditional accordingly.
ack
>
> Also, how much is the IRQ count usually? If IRQ count is typically small (< 50),
> then won't a simple linked list be more efficient than a hash table? The
> code becomes a bit more readable too that way IMO.
> Take a call based on if there's really that many IRQs that LL's become
> less practical.
>
I tested a TI kernel on J721S2 and I got 60 entries. I guess we can
expect this number to grow with the next SOCs. But maybe the test does
not reflect the usual cases.
Best Regards,
Thomas
Powered by blists - more mailing lists