linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Cc: helgaas@kernel.org, linux-pci@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	mka@chromium.org, quic_vbadigan@quicinc.com,
	quic_hemantk@quicinc.com, quic_nitegupt@quicinc.com,
	quic_skananth@quicinc.com, quic_ramkri@quicinc.com,
	manivannan.sadhasivam@linaro.org, swboyd@chromium.org,
	dmitry.baryshkov@linaro.org, "Jingoo Han" <jingoohan1@gmail.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Stanimir Varbanov" <svarbanov@mm-sol.com>,
	"Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>
Subject: Re: [PATCH v4 2/2] PCI: qcom: Restrict pci transactions after pci suspend
Date: Fri, 15 Jul 2022 15:51:53 +0200	[thread overview]
Message-ID: <YtFw+ezt6s/yXaLY@hovoldconsulting.com> (raw)
In-Reply-To: <1657118425-10304-3-git-send-email-quic_krichai@quicinc.com>

On Wed, Jul 06, 2022 at 08:10:25PM +0530, Krishna chaitanya chundru wrote:
> If the endpoint device state is D0 and irq's are not freed, then
> kernel try to mask interrupts in system suspend path by writing
> in to the vector table (for MSIX interrupts) and config space (for MSI's).
> 
> These transactions are initiated in the pm suspend after pcie clocks got
> disabled as part of platform driver pm  suspend call. Due to it, these
> transactions are resulting in un-clocked access and eventually to crashes.
> 
> So added a logic in qcom driver to restrict these unclocked access.
> And updated the logic to check the link state before masking
> or unmasking the interrupts.
> 
> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
> ---
>  drivers/pci/controller/dwc/pcie-designware-host.c | 14 +++++++--
>  drivers/pci/controller/dwc/pcie-qcom.c            | 36 +++++++++++++++++++++--
>  2 files changed, 46 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 2fa86f3..2a46b40 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -29,13 +29,23 @@ static void dw_msi_ack_irq(struct irq_data *d)
>  
>  static void dw_msi_mask_irq(struct irq_data *d)
>  {
> -	pci_msi_mask_irq(d);
> +	struct pcie_port *pp = irq_data_get_irq_chip_data(d->parent_data);
> +	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);

When rebasing you'll notice that struct pcie_port has now been renamed:

	60b3c27fb9b9 ("PCI: dwc: Rename struct pcie_port to dw_pcie_rp")

Johan

  parent reply	other threads:[~2022-07-15 13:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  7:28 [PATCH v1 0/2] PCI: Restrict pci transactions after pci suspend Krishna chaitanya chundru
2022-06-24  7:28 ` [PATCH v1 1/2] PCI: qcom: Add system PM support Krishna chaitanya chundru
2022-06-24 18:31   ` Matthias Kaehlcke
2022-06-24  7:28 ` [PATCH v1 2/2] PCI: qcom: Restrict pci transactions after pci suspend Krishna chaitanya chundru
2022-06-29  9:33 ` [PATCH v2 0/2] PCI: " Krishna chaitanya chundru
2022-06-29  9:33   ` [PATCH v2 1/2] PCI: qcom: Add system PM support Krishna chaitanya chundru
2022-06-29 19:33     ` Matthias Kaehlcke
2022-06-30  4:34     ` Manivannan Sadhasivam
2022-06-30  9:59       ` Krishna Chaitanya Chundru
2022-07-04  4:44         ` Manivannan Sadhasivam
2022-07-04  4:48           ` Manivannan Sadhasivam
2022-06-29  9:33   ` [PATCH v2 2/2] PCI: qcom: Restrict pci transactions after pci suspend Krishna chaitanya chundru
2022-07-04  4:54     ` Manivannan Sadhasivam
2022-07-01 14:13   ` [PATCH v3 0/2] PCI: " Krishna chaitanya chundru
2022-07-01 14:13     ` [PATCH v3 1/2] PCI: qcom: Add system PM support Krishna chaitanya chundru
2022-07-01 14:13     ` [PATCH v3 2/2] PCI: qcom: Restrict pci transactions after pci suspend Krishna chaitanya chundru
2022-07-06 14:40     ` [PATCH v4 0/2] PCI: " Krishna chaitanya chundru
2022-07-06 14:40       ` [PATCH v4 1/2] PCI: qcom: Add system PM support Krishna chaitanya chundru
2022-07-11 21:53         ` Matthias Kaehlcke
2022-07-14 10:41           ` Krishna Chaitanya Chundru
2022-07-15 13:43         ` Johan Hovold
2022-07-06 14:40       ` [PATCH v4 2/2] PCI: qcom: Restrict pci transactions after pci suspend Krishna chaitanya chundru
2022-07-12  0:34         ` Matthias Kaehlcke
2022-07-15 13:51         ` Johan Hovold [this message]
2022-07-06 15:13       ` [PATCH v4 0/2] PCI: " Dmitry Baryshkov

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=YtFw+ezt6s/yXaLY@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=agross@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=helgaas@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mka@chromium.org \
    --cc=quic_hemantk@quicinc.com \
    --cc=quic_krichai@quicinc.com \
    --cc=quic_nitegupt@quicinc.com \
    --cc=quic_ramkri@quicinc.com \
    --cc=quic_skananth@quicinc.com \
    --cc=quic_vbadigan@quicinc.com \
    --cc=robh@kernel.org \
    --cc=svarbanov@mm-sol.com \
    --cc=swboyd@chromium.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;
as well as URLs for NNTP newsgroup(s).