Star64_linux/drivers/pci/controller/dwc
Jisheng Zhang 07940c369a PCI: dwc: Fix MSI page leakage in suspend/resume
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().

Suggested-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201009155505.5a580ef5@xhacker.debian
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2020-10-13 09:52:49 +01:00
..
Kconfig Merge branch 'remotes/lorenzo/pci/dwc' 2020-06-04 12:59:15 -05:00
Makefile PCI: uniphier: Add Socionext UniPhier Pro5 PCIe endpoint controller driver 2020-06-04 10:03:18 +01:00
pci-dra7xx.c PCI: dwc: Fix MSI page leakage in suspend/resume 2020-10-13 09:52:49 +01:00
pci-exynos.c PCI: dwc: exynos: Use pci_ops for root config space accessors 2020-09-08 16:37:02 +01:00
pci-imx6.c PCI: dwc: Centralize link gen setting 2020-09-10 16:50:54 +01:00
pci-keystone.c PCI: keystone: Remove iATU register mapping 2020-10-13 09:52:49 +01:00
pci-layerscape-ep.c PCI: layerscape: Add EP mode support for ls1088a and ls2088a 2020-09-21 11:46:05 +01:00
pci-layerscape.c PCI: layerscape: Add LS1028a support 2019-11-08 10:45:00 +00:00
pci-meson.c PCI: dwc/meson: Rework PCI config and DW port logic register accesses 2020-09-08 16:37:02 +01:00
pcie-al.c PCI: dwc: Remove storing of PCI resources 2020-09-08 16:37:02 +01:00
pcie-armada8k.c Merge branch 'pci/irq-error' 2020-08-05 18:24:22 -05:00
pcie-artpec6.c PCI: dwc: Move N_FTS setup to common setup 2020-09-10 16:50:53 +01:00
pcie-designware-ep.c PCI: designware-ep: Modify MSI and MSIX CAP way of finding 2020-09-21 11:46:04 +01:00
pcie-designware-host.c PCI: dwc: Fix MSI page leakage in suspend/resume 2020-10-13 09:52:49 +01:00
pcie-designware-plat.c PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() 2020-09-08 16:37:02 +01:00
pcie-designware.c PCI: dwc: Add common iATU register support 2020-10-13 09:52:49 +01:00
pcie-designware.h PCI: dwc: Fix MSI page leakage in suspend/resume 2020-10-13 09:52:49 +01:00
pcie-hisi.c PCI: dwc: hisi: Remove non-ECAM HiSilicon hip05/hip06 driver 2020-07-27 17:06:32 +01:00
pcie-histb.c PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() 2020-09-08 16:37:02 +01:00
pcie-intel-gw.c PCI: dwc: Move N_FTS setup to common setup 2020-09-10 16:50:53 +01:00
pcie-kirin.c PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() 2020-09-08 16:37:02 +01:00
pcie-qcom.c PCI: dwc: Centralize link gen setting 2020-09-10 16:50:54 +01:00
pcie-spear13xx.c PCI: dwc: Use DBI accessors 2020-09-10 16:50:53 +01:00
pcie-tegra194.c PCI: dwc: Use DBI accessors 2020-09-10 16:50:53 +01:00
pcie-uniphier-ep.c PCI: uniphier: Add Socionext UniPhier Pro5 PCIe endpoint controller driver 2020-06-04 10:03:18 +01:00
pcie-uniphier.c PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() 2020-09-08 16:37:02 +01:00