Re: [PATCH v5 2/2] PCI: dwc: Fix MSI page leakage in suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux