From: Rob Herring <robh@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
bhelgaas@google.com, lorenzo.pieralisi@arm.com,
kbusch@kernel.org, hch@lst.de, linux-nvme@lists.infradead.org,
linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, svarbanov@mm-sol.com,
bjorn.andersson@linaro.org, axboe@fb.com,
quic_vbadigan@quicinc.com, quic_krichai@quicinc.com,
quic_nitirawa@quicinc.com, vidyas@nvidia.com, sagi@grimberg.me
Subject: Re: [PATCH 1/3] PCI: Add a flag to notify PCI drivers about powerdown during suspend
Date: Thu, 26 May 2022 15:48:37 -0500 [thread overview]
Message-ID: <20220526204837.GJ54904-robh@kernel.org> (raw)
In-Reply-To: <20220516201817.GA1047280@bhelgaas>
On Mon, May 16, 2022 at 03:18:17PM -0500, Bjorn Helgaas wrote:
> On Fri, May 13, 2022 at 04:30:25PM +0530, Manivannan Sadhasivam wrote:
> > On some systems like Chromebooks based on Qcom chipsets, the OS may
> > powerdown all PCIe devices during system suspend for aggressive
> > powersaving. In that case, the PCI host controller drivers need to notify
> > the PCI device drivers that the power will be taken off during system
> > suspend so that the drivers can prepare the devices accordingly.
>
> "The OS may powerdown all PCIe devices ..." makes it sound like this
> is an OS policy decision. Where exactly (what function) is that?
>
> Or if it's not an OS policy decision, but rather some property of the
> hardware, say that specifically.
>
> > One prime example is the PCI NVMe driver. This flag can be used by the
> > driver to shutdown the NVMe device during suspend and recover it during
> > resume.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> > include/linux/pci.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/include/linux/pci.h b/include/linux/pci.h
> > index 60adf42460ab..069caf1fe88d 100644
> > --- a/include/linux/pci.h
> > +++ b/include/linux/pci.h
> > @@ -578,6 +578,7 @@ struct pci_host_bridge {
> > unsigned int preserve_config:1; /* Preserve FW resource setup */
> > unsigned int size_windows:1; /* Enable root bus sizing */
> > unsigned int msi_domain:1; /* Bridge wants MSI domain */
> > + unsigned int suspend_poweroff:1; /* OS may poweroff devices during system suspend */
Why does this apply to the whole host bridge? What if you have multiple
devices and some are powered off and others aren't?
Rob
next prev parent reply other threads:[~2022-05-26 20:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 11:00 [PATCH 0/3] PCI: Notify PCI drivers about powerdown during suspend Manivannan Sadhasivam
2022-05-13 11:00 ` [PATCH 1/3] PCI: Add a flag to notify " Manivannan Sadhasivam
2022-05-16 20:18 ` Bjorn Helgaas
2022-05-17 15:09 ` Manivannan Sadhasivam
2022-05-17 17:24 ` Bjorn Helgaas
2022-05-18 3:59 ` Manivannan Sadhasivam
2022-05-26 20:48 ` Rob Herring [this message]
2022-05-13 11:00 ` [PATCH 2/3] PCI: dwc: qcom: Set suspend_poweroff flag for SC7280 Manivannan Sadhasivam
2022-05-16 20:19 ` Bjorn Helgaas
2022-05-17 15:11 ` Manivannan Sadhasivam
2022-05-17 17:18 ` Bjorn Helgaas
2022-05-18 3:52 ` Manivannan Sadhasivam
2022-05-18 16:50 ` Bjorn Helgaas
2022-05-18 8:43 ` Christoph Hellwig
2022-05-13 11:00 ` [PATCH 3/3] nvme-pci: Make use of "suspend_poweroff" flag during system suspend Manivannan Sadhasivam
2022-05-16 5:44 ` [PATCH 0/3] PCI: Notify PCI drivers about powerdown during suspend Christoph Hellwig
2022-05-16 20:15 ` Bjorn Helgaas
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=20220526204837.GJ54904-robh@kernel.org \
--to=robh@kernel.org \
--cc=axboe@fb.com \
--cc=bhelgaas@google.com \
--cc=bjorn.andersson@linaro.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=quic_krichai@quicinc.com \
--cc=quic_nitirawa@quicinc.com \
--cc=quic_vbadigan@quicinc.com \
--cc=sagi@grimberg.me \
--cc=svarbanov@mm-sol.com \
--cc=vidyas@nvidia.com \
/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;
as well as URLs for NNTP newsgroup(s).