[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221013004444.GA3135316@bhelgaas>
Date: Wed, 12 Oct 2022 19:44:44 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Krishna Chaitanya Chundru <quic_krichai@...cinc.com>
Cc: linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, mka@...omium.org,
quic_vbadigan@...cinc.com, quic_hemantk@...cinc.com,
quic_nitegupt@...cinc.com, quic_skananth@...cinc.com,
quic_ramkri@...cinc.com, manivannan.sadhasivam@...aro.org,
swboyd@...omium.org, dmitry.baryshkov@...aro.org,
svarbanov@...sol.com, agross@...nel.org, andersson@...nel.org,
konrad.dybcio@...ainline.org, lpieralisi@...nel.org,
robh@...nel.org, kw@...ux.com, bhelgaas@...gle.com,
linux-phy@...ts.infradead.org, vkoul@...nel.org, kishon@...com,
mturquette@...libre.com, linux-clk@...r.kernel.org,
Bjorn Andersson <bjorn.andersson@...aro.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, linux-pm@...r.kernel.org,
Marc Zyngier <maz@...nel.org>,
Kevin Rowland <kevin.p.rowland@...il.com>
Subject: Re: [PATCH v7 1/5] PCI: qcom: Add system suspend and resume support
[+cc Marc, Kevin]
On Wed, Oct 12, 2022 at 07:36:52PM +0530, Krishna Chaitanya Chundru wrote:
> On 10/6/2022 2:43 AM, Bjorn Helgaas wrote:
[I'm declaring quote text bankruptcy and dropping the huge wall of
text. The IRQ affinity change you mention seems to be the critical
issue :)]
> > The PCIe spec clearly envisions Refclk being turned off
> > (sec 5.5.3.3.1) and PHYs being powered off (sec 5.5.3.2) while in
> > L1.2.
> >
> > I've been assuming L1.2 exit (which includes Refclk being turned on
> > and PHYs being powered up) is completely handled by hardware, but it
> > sounds like the Qcom controller needs software assistance which fields
> > an interrupt when CLKREQ# is asserted and turns on Refclk and the
> > PHYs?
> >
> > 5.5.3 does say "All Link and PHY state must be maintained during L1.2,
> > or must be restored upon exit using implementation specific means",
> > and maybe Qcom counts as using implementation specific means.
> >
> > I *am* concerned about whether software can do the L1.2 exit fast
> > enough, but the biggest reason I'm struggling with this is because
> > using the syscore framework to work around IRQ affinity changes that
> > happen late in suspend just seems kind of kludgy and it doesn't seem
> > like it fits cleanly in the power management model.
>
> Can you please suggest any another way to work around IRQ affinity
> changes.
One of your earlier patches [1] made dw_msi_mask_irq() look like this:
static void dw_msi_mask_irq(struct irq_data *d)
{
struct pcie_port *pp = irq_data_get_irq_chip_data(d->parent_data);
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
if (dw_pcie_link_up(pci))
pci_msi_mask_irq(d);
irq_chip_mask_parent(d);
}
That was an awful lot like Marc's suggestion [2] that the
pci_msi_mask_irq() should be redundant.
If it's truly redundant, maybe pci_msi_mask_irq() can be removed
from dw_msi_mask_irq() (and other similar *_mask_irq()
implementations) completely?
Bjorn
[1] https://lore.kernel.org/r/1659526134-22978-3-git-send-email-quic_krichai@quicinc.com
[2] https://lore.kernel.org/linux-pci/86k05m7dkr.wl-maz@kernel.org/
Powered by blists - more mailing lists