From: Rob Herring <robh@kernel.org>
To: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Jingoo Han <jingoohan1@gmail.com>,
Gustavo Pimentel <gustavo.pimentel@synopsys.com>,
linux-omap@vger.kernel.org, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] PCI: dwc: Fix MSI page leakage in suspend/resume
Date: Wed, 7 Oct 2020 12:41:19 -0500 [thread overview]
Message-ID: <20201007174119.GA376477@bogus> (raw)
In-Reply-To: <20200930091449.50ae0caf@xhacker.debian>
On Wed, Sep 30, 2020 at 09:15:25AM +0800, Jisheng Zhang wrote:
> Currently, dw_pcie_msi_init() allocates and maps page for msi, then
> program the PCIE_MSI_ADDR_LO and PCIE_MSI_ADDR_HI. The Root Complex
> may lose power during suspend-to-RAM, so when we resume, we want to
> redo the latter but not the former. If designware based driver (for
> example, pcie-tegra194.c) calls dw_pcie_msi_init() in resume path, the
> msi page will be leaked.
>
> As pointed out by Rob and Ard, there's no need to allocate a page for
> the MSI address, we could use an address in the driver data.
>
> To avoid map the MSI msg again during resume, we move the map MSI msg
> from dw_pcie_msi_init() to dw_pcie_host_init().
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
> drivers/pci/controller/dwc/pci-dra7xx.c | 18 ++++++++++-
> .../pci/controller/dwc/pcie-designware-host.c | 32 +++++++++----------
> drivers/pci/controller/dwc/pcie-designware.h | 2 +-
> 3 files changed, 34 insertions(+), 18 deletions(-)
I'm working on some larger MSI clean-ups which should eliminate the
dra7xx addition, but this is good enough for now.
Reviewed-by: Rob Herring <robh@kernel.org>
next prev parent reply other threads:[~2020-10-07 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 1:12 [PATCH v5 0/2] PCI: dwc: fix two MSI issues Jisheng Zhang
2020-09-30 1:12 ` [PATCH v5 1/2] PCI: dwc: Skip PCIE_MSI_INTR0* programming if MSI is disabled Jisheng Zhang
2020-09-30 1:15 ` [PATCH v5 2/2] PCI: dwc: Fix MSI page leakage in suspend/resume Jisheng Zhang
2020-10-07 17:41 ` Rob Herring [this message]
2020-10-08 11:36 ` [PATCH v5 0/2] PCI: dwc: fix two MSI issues Lorenzo Pieralisi
2020-10-09 7:10 ` Jisheng Zhang
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=20201007174119.GA376477@bogus \
--to=robh@kernel.org \
--cc=Jisheng.Zhang@synaptics.com \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.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).