Re: [PATCH v1 1/5] PCI: PM: x86: Drop Intel MID PCI PM support

From: Rafael J. Wysocki
Date: Tue Sep 21 2021 - 10:23:52 EST


On Tue, Sep 21, 2021 at 2:17 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, Sep 20, 2021 at 1:57 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> > On Sun, Sep 19, 2021 at 10:32 PM Andy Shevchenko
> > <andy.shevchenko@xxxxxxxxx> wrote:
> > > On Sun, Sep 19, 2021 at 9:01 AM Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote:
>
> ...
>
> > > > I am going to post patches removing the rest of MID support from arch/x86/
> > > > and elsewhere, but that is still quite a bit of stuff and I don't want this
> > > > simple PCI PM series to depend on that work.
> > >
> > > This is still being used by MID with ACPI assisted (*) support.
> > > Hence, not ack.
> > >
> > > *) ACPI layer is provided by U-Boot and can't fulfill all possible
> > > features that ACPI may use in the Linux kernel.
> >
> > OK, good to know.
> >
> > I'm not sure how this PCI PM stuff works with ACPI.
>
> It doesn't that is the point. The PCI is very interesting there and
> what I meant is that the ACPI implementation I have provided via
> U-Boot does not cover these.

That's OK. It just means that these devices are not power-manageable
via ACPI on the platforms in question, but the MID PCI PM code is
present in the kernel, so we don't need analogous code in AML in the
ACPI tables.

My point is that something like the v2 of this patch series
(https://lore.kernel.org/linux-acpi/1800633.tdWV9SEqCh@kreacher/T/#m1ec249724a5ad5ad358b0ed8e149e3926934955d)
is needed to prevent ACPI from overtaking the PM for the PCI devices
on the platform once we've decided to use the MID PM for them.

Now, if it is necessary to use ACPI PM for some devices and the MID PM
for other devices on the same platform, the latter needs to grow a
meaningful "power manageable" function that needs to be used in the
code as appropriate.

> If you have any hints/ideas how it may be handled, I am all ears!