[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220526204837.GJ54904-robh@kernel.org>
Date: Thu, 26 May 2022 15:48:37 -0500
From: Rob Herring <robh@...nel.org>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
bhelgaas@...gle.com, lorenzo.pieralisi@....com, kbusch@...nel.org,
hch@....de, linux-nvme@...ts.infradead.org,
linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, svarbanov@...sol.com,
bjorn.andersson@...aro.org, axboe@...com,
quic_vbadigan@...cinc.com, quic_krichai@...cinc.com,
quic_nitirawa@...cinc.com, vidyas@...dia.com, sagi@...mberg.me
Subject: Re: [PATCH 1/3] PCI: Add a flag to notify PCI drivers about
powerdown during suspend
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@...aro.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
Powered by blists - more mailing lists