linux_dsm_epyc7002/drivers/pci/controller/dwc
Jon Hunter e22051e7c9 PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift
[ Upstream commit f67092eff2bd40650aad54a1a1910160f41d864a ]

tegra_pcie_ep_raise_msi_irq() shifted a signed 32-bit value left by 31
bits.  The behavior of this is implementation-defined.

Replace the shift by BIT(), which is well-defined.

Found by cppcheck:

  $ cppcheck --enable=all drivers/pci/controller/dwc/pcie-tegra194.c
  Checking drivers/pci/controller/dwc/pcie-tegra194.c ...

  drivers/pci/controller/dwc/pcie-tegra194.c:1829:23: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1826.  [shiftTooManyBitsSigned]

  appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
                     ^

[bhelgaas: commit log]
Link: https://lore.kernel.org/r/20210618160219.303092-1-jonathanh@nvidia.com
Fixes: c57247f940 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:05:52 +02:00
..
Kconfig PCI: meson: Build as module by default 2020-10-05 13:01:42 +01: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 Merge branch 'remotes/lorenzo/pci/imx6' 2020-10-21 09:58:40 -05:00
pci-keystone.c PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c 2021-05-14 09:49:58 +02: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 Merge branch 'remotes/lorenzo/pci/meson' 2020-10-21 09:58:41 -05: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: Restore ATU memory resource setup to use last entry 2020-11-04 13:55:30 -06: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: intel-gw: Fix INTx enable 2021-07-20 16:05:52 +02:00
pcie-kirin.c Merge branch 'remotes/lorenzo/pci/kirin' 2020-10-21 09:58:41 -05:00
pcie-qcom.c PCI: qcom: Use PHY_REFCLK_USE_PAD only for ipq8064 2021-03-04 11:37:18 +01:00
pcie-spear13xx.c PCI: dwc: Use DBI accessors 2020-09-10 16:50:53 +01:00
pcie-tegra194.c PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift 2021-07-20 16:05:52 +02: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