From: Bjorn Helgaas <helgaas@kernel.org>
To: 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, lukas@wunner.de,
mika.westerberg@linux.intel.com,
Hsin-Yi Wang <hsinyi@chromium.org>
Subject: Re: [PATCH v5 3/4] PCI: Decouple D3Hot and D3Cold handling for bridges
Date: Tue, 20 Aug 2024 20:45:59 -0500 [thread overview]
Message-ID: <20240821014559.GA236134@bhelgaas> (raw)
In-Reply-To: <20240802-pci-bridge-d3-v5-3-2426dd9e8e27@linaro.org>
On Fri, Aug 02, 2024 at 11:25:02AM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>
> Currently, there is no proper distinction between D3Hot and D3Cold while
> handling the power management for PCI bridges. For instance,
> pci_bridge_d3_allowed() API decides whether it is allowed to put the
> bridge in D3, but it doesn't explicitly specify whether D3Hot or D3Cold
> is allowed in a scenario. This often leads to confusion and may be prone
> to errors.
>
> So let's split the D3Hot and D3Cold handling where possible. The current
> pci_bridge_d3_allowed() API is now split into pci_bridge_d3hot_allowed()
> and pci_bridge_d3cold_allowed() APIs and used in relevant places.
s/So let's split/Split/
> Also, pci_bridge_d3_update() API is now renamed to
> pci_bridge_d3cold_update() since it was only used to check the possibility
> of D3Cold.
>
> Note that it is assumed that only D3Hot needs to be checked while
> transitioning the bridge during runtime PM and D3Cold in other places. In
> the ACPI case, wakeup is now only enabled if both D3Hot and D3Cold are
> allowed for the bridge.
>
> Still, there are places where just 'd3' is used opaquely, but those are
> hard to distinguish, hence left for future cleanups.
The spec does use "D3Hot/D3Cold" (with Hot/Cold capitalized and
subscripted), but most Linux doc and comments use "D3hot" and
"D3cold", so I think we should stick with the Linux convention (it's
not 100%, but it's a pretty big majority).
> - if (pci_dev->bridge_d3_allowed)
> + if (pci_dev->bridge_d3cold_allowed && pci_dev->bridge_d3hot_allowed)
Much of this patch is renames that could be easily reviewed. But
there are a few things like this that are not simple renames. Can you
split out these non-rename things to their own patch(es) with their
own explanations?
Bjorn
next prev parent reply other threads:[~2024-08-21 1:46 UTC|newest]
Thread overview: 32+ 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 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 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 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 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 [this message]
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 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
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=20240821014559.GA236134@bhelgaas \
--to=helgaas@kernel.org \
--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=lukas@wunner.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox