Re: [PATCH] irqchip/ti-sci-intr: Add support for system suspend/resume PM

From: Marc Zyngier
Date: Wed Nov 01 2023 - 04:42:49 EST


On Tue, 31 Oct 2023 16:00:59 +0000,
Thomas Richard <thomas.richard@xxxxxxxxxxx> wrote:
>
> On 6/8/22 11:12, Marc Zyngier wrote:
> > On Wed, 08 Jun 2022 09:48:20 +0100,
> > Aswath Govindraju <a-govindraju@xxxxxx> wrote:
> >>
> >> As, the resource allocator does not have enough memory to save and
> >> restore all the mappings corresponding various resources, this is being
> >> done on the requester or consumer side.
> >
> > You're missing the point: the ti_sci_resource structure is managed by
> > this resource allocator, and it isn't exactly rocket science to add
> > the required context to it, and then get it to restore that context on
> > resume.
>
> Hi Marc,
>
> I'm interested to continue the work to upstream this patch.
> I read all the thread, but I think I'm also missing the point.
>
> Do you mean the ti_sci_intr_irq_domain struct is not the right place to
> save the mappings, and it shall not be done in this irqchip driver?
> The context should be saved and restored from the ti_sci driver using
> the ti_sci_resource struct?

That's exactly my point. There is already a large body of code that is
aware of the resource allocation (the ti_sci driver), which is common
to a whole lot of subsystem that will need some form of save/restore.

It seems natural to put the save/restore aspects inside that driver,
unless there is some other reasons not to do so (which haven't so far
been explained).

Thanks,

M.

--
Without deviation from the norm, progress is not possible.