From: "Rafael J. Wysocki" <firstname.lastname@example.org> To: Mika Westerberg <email@example.com> Cc: "Rafael J. Wysocki" <firstname.lastname@example.org>, Bjorn Helgaas <email@example.com>, "Rafael J. Wysocki" <firstname.lastname@example.org>, Len Brown <email@example.com>, Lukas Wunner <firstname.lastname@example.org>, Keith Busch <email@example.com>, Alex Williamson <firstname.lastname@example.org>, Alexandru Gagniuc <email@example.com>, ACPI Devel Maling List <firstname.lastname@example.org>, Linux PCI <email@example.com> Subject: Re: [PATCH 3/3] PCI / ACPI: Handle sibling devices sharing power resources Date: Thu, 6 Jun 2019 16:08:11 +0200 Message-ID: <CAJZ5v0gHTVPNc_LJzPCOLZpHU=wsbYQs__WabOQHmu8GPCChag@mail.gmail.com> (raw) In-Reply-To: <20190606134419.GL2781@lahna.fi.intel.com> On Thu, Jun 6, 2019 at 3:44 PM Mika Westerberg <firstname.lastname@example.org> wrote: > > On Thu, Jun 06, 2019 at 02:26:40PM +0300, Mika Westerberg wrote: > > On Thu, Jun 06, 2019 at 10:54:40AM +0200, Rafael J. Wysocki wrote: > > > On Wed, Jun 5, 2019 at 4:58 PM Mika Westerberg > > > <email@example.com> wrote: > > > > > > > > Intel Ice Lake has an interated Thunderbolt controller which means that > > > > > > integrated > > > > Right :) > > > > > > the PCIe topology is extended directly from the two root ports (RP0 and > > > > RP1). Power management is handled by ACPI power resources that are > > > > shared between the root ports, Thunderbolt controller (NHI) and xHCI > > > > controller. > > > > > > > > The topology with the power resources (marked with ) looks like: > > > > > > > > Host bridge > > > > | > > > > +- RP0 ---\ > > > > +- RP1 ---|--+--> [TBT] > > > > +- NHI --/ | > > > > | | > > > > | v > > > > +- xHCI --> [D3C] > > > > > > > > Here TBT and D3C are the shared ACPI power resources. ACPI _PR3() method > > > > returns either TBT or D3C or both. > > > > > > > > Say we runtime suspend first the root ports RP0 and RP1, then NHI. Now > > > > since the TBT power resource is still on when the root ports are runtime > > > > suspended their dev->current_state is set to D3hot. When NHI is runtime > > > > suspended TBT is finally turned off but state of the root ports remain > > > > to be D3hot. > > > > > > It looks like this problem will affect all ACPI devices using power > > > resources and _PR3 in general, so fixing it just for PCI is not > > > sufficient IMO. > > > > Fair enough. > > > > > An alternative approach may be to set the state of a device that > > > dropped its references to power resources listed in _PR3 to D3cold > > > even though those power resources may be physically "on" at that time. > > > Everything else (including this patch AFAICS) will be racy this way or > > > another. > > > > OK, thanks for the comment. I'll try to look into this approach then. > > One additional question. > > How about the other direction when shared power resource(s) gets turned > on? We would need to wake up all the sharing devices so that their state > gets restored back from D0uninitialized. That isn't necessary IMO as long as the device are not accessed. If the kernel thinks that a given device is in D3cold and doesn't access it, then it really doesn't matter too much what state the device is in physically. On the first access the device should be reinitialized anyway.
next prev parent reply index Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-05 14:58 [PATCH 0/3] PCI: Power management improvements Mika Westerberg 2019-06-05 14:58 ` [PATCH 1/3] PCI: Add missing link delays required by the PCIe spec Mika Westerberg 2019-06-06 8:40 ` Rafael J. Wysocki 2019-06-06 11:24 ` Mika Westerberg 2019-06-05 14:58 ` [PATCH 2/3] PCI: Do not poll for PME if the device is in D3cold Mika Westerberg 2019-06-05 19:05 ` Lukas Wunner 2019-06-06 11:21 ` Mika Westerberg 2019-06-09 18:38 ` Lukas Wunner 2019-06-10 11:35 ` Rafael J. Wysocki 2019-06-05 14:58 ` [PATCH 3/3] PCI / ACPI: Handle sibling devices sharing power resources Mika Westerberg 2019-06-06 8:54 ` Rafael J. Wysocki 2019-06-06 11:26 ` Mika Westerberg 2019-06-06 13:44 ` Mika Westerberg 2019-06-06 14:08 ` Rafael J. Wysocki [this message] 2019-06-06 14:17 ` Mika Westerberg 2019-06-06 14:27 ` Rafael J. Wysocki 2019-06-06 14:36 ` Mika Westerberg 2019-06-12 22:38 ` Rafael J. Wysocki 2019-06-13 12:52 ` Mika Westerberg 2019-06-13 13:51 ` Rafael J. Wysocki 2019-06-13 14:27 ` Mika Westerberg 2019-06-09 18:58 ` Lukas Wunner 2019-06-10 10:57 ` Rafael J. Wysocki
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAJZ5v0gHTVPNc_LJzPCOLZpHU=wsbYQs__WabOQHmu8GPCChag@mail.gmail.com' \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-ACPI Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \ email@example.com firstname.lastname@example.org public-inbox-index linux-acpi Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi AGPL code for this site: git clone https://public-inbox.org/ public-inbox