From: Lukas Wunner <lukas@wunner.de>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, mika.westerberg@linux.intel.com,
Hsin-Yi Wang <hsinyi@chromium.org>
Subject: Re: [PATCH v5 4/4] PCI: Allow PCI bridges to go to D3Hot on all Devicetree based platforms
Date: Tue, 6 Aug 2024 15:02:39 +0200 [thread overview]
Message-ID: <ZrIe70Z7uFven8HH@wunner.de> (raw)
In-Reply-To: <20240806124107.GB2968@thinkpad>
On Tue, Aug 06, 2024 at 06:11:07PM +0530, Manivannan Sadhasivam wrote:
> On Tue, Aug 06, 2024 at 08:53:01AM +0200, Lukas Wunner wrote:
> > AFAICS we always program the device to go to D3hot and the platform
> > then cuts power, thereby putting it into D3cold. So D3hot is never
> > skipped. See __pci_set_power_state():
> >
> > if (state == PCI_D3cold) {
> > /*
> > * To put the device in D3cold, put it into D3hot in the native
> > * way, then put it into D3cold using platform ops.
> > */
> > error = pci_set_low_power_state(dev, PCI_D3hot, locked);
> >
> > if (pci_platform_power_transition(dev, PCI_D3cold))
> > return error;
> >
>
> This is applicable only to pci_set_power_state(), but AFAIK PCIe spec
> doesn't mandate switching to D3Hot for entering D3Cold.
Per PCI Bus Power Management Interface Specification r1.2 sec 5.5 fig 5-1,
the only supported state transition to D3cold is from D3hot.
Per PCIe r6.2 sec 5.2, "PM is compatible with the PCI Bus Power Management
Interface Specification".
Granted, PCI-PM is an ancient spec, so I think anyone can be forgiven
for not knowing its intricacies off-the-cuff. :)
> So the PCIe host controller drivers (especically non-ACPI platforms)
> may just send PME_Turn_Off followed by removing the slot power
> (which again is not controlled by pci_set_power_state())
> as there are no non-ACPI related hooks as of now.
Ideally, devicetree-based platforms should be brought into the
platform_pci_*() fold to align them with ACPI and get common
behavior across all platforms.
Thanks,
Lukas
next prev parent reply other threads:[~2024-08-06 13:02 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 5:54 [PATCH v5 0/4] PCI: Allow D3Hot for PCI bridges in Devicetree based platforms Manivannan Sadhasivam
2024-08-02 5:54 ` Manivannan Sadhasivam via B4 Relay
2024-08-02 5:55 ` [PATCH v5 1/4] PCI/portdrv: Make use of pci_dev::bridge_d3 for checking the D3 possibility Manivannan Sadhasivam
2024-08-02 5:55 ` Manivannan Sadhasivam via B4 Relay
2024-08-02 9:49 ` Lukas Wunner
2024-08-02 11:19 ` Rafael J. Wysocki
2024-08-02 20:07 ` Lukas Wunner
2024-08-05 13:24 ` Manivannan Sadhasivam
2024-08-06 6:46 ` Lukas Wunner
2024-08-06 11:48 ` Manivannan Sadhasivam
2024-08-02 5:55 ` [PATCH v5 2/4] PCI: Rename pci_bridge_d3_possible() to pci_bridge_d3_allowed() Manivannan Sadhasivam
2024-08-02 5:55 ` Manivannan Sadhasivam via B4 Relay
2024-08-03 11:03 ` kernel test robot
2024-08-05 13:26 ` Manivannan Sadhasivam
2024-08-02 5:55 ` [PATCH v5 3/4] PCI: Decouple D3Hot and D3Cold handling for bridges Manivannan Sadhasivam
2024-08-02 5:55 ` Manivannan Sadhasivam via B4 Relay
2024-08-19 12:44 ` Oliver Neukum
2024-08-20 6:00 ` Manivannan Sadhasivam
2024-08-20 23:45 ` Bjorn Helgaas
2024-08-29 6:10 ` Manivannan Sadhasivam
2024-08-21 1:45 ` Bjorn Helgaas
2024-08-28 15:52 ` Manivannan Sadhasivam
2024-08-28 21:07 ` Bjorn Helgaas
2024-08-29 5:22 ` Manivannan Sadhasivam
2024-11-21 18:54 ` Brian Norris
2024-08-02 5:55 ` [PATCH v5 4/4] PCI: Allow PCI bridges to go to D3Hot on all Devicetree based platforms Manivannan Sadhasivam
2024-08-02 5:55 ` Manivannan Sadhasivam via B4 Relay
2024-08-02 10:13 ` Lukas Wunner
2024-08-05 13:35 ` Manivannan Sadhasivam
2024-08-06 6:53 ` Lukas Wunner
2024-08-06 12:41 ` Manivannan Sadhasivam
2024-08-06 13:02 ` Lukas Wunner [this message]
2024-08-06 14:39 ` Manivannan Sadhasivam
2024-08-06 20:20 ` Lukas Wunner
2024-08-19 15:34 ` Manivannan Sadhasivam
2024-08-06 20:58 ` Hsin-Yi Wang
2024-11-21 18:53 ` Brian Norris
Reply instructions:
You may reply publicly 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=ZrIe70Z7uFven8HH@wunner.de \
--to=lukas@wunner.de \
--cc=bhelgaas@google.com \
--cc=hsinyi@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.