[PATCH v3 2/4] firmware: ti_sci: handle IRQ restore in BOARDCFG_MANAGED mode during resume
Thomas Richard
thomas.richard at bootlin.com
Thu Dec 18 02:17:06 PST 2025
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 at bootlin.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
More information about the linux-arm-kernel
mailing list