OpenCloudOS-Kernel/drivers/pci
Vidya Sagar 0baa807ed7 PCI/MSI: Set device flag indicating only 32-bit MSI support
commit 2053230af1 upstream.

The MSI-X Capability requires devices to support 64-bit Message Addresses,
but the MSI Capability can support either 32- or 64-bit addresses.

Previously, we set dev->no_64bit_msi for a few broken devices that
advertise 64-bit MSI support but don't correctly support it.

In addition, check the MSI "64-bit Address Capable" bit for all devices and
set dev->no_64bit_msi for devices that don't advertise 64-bit support.
This allows msi_verify_entries() to catch arch code defects that assign
64-bit addresses when they're not supported.

The warning is helpful to find defects like the one fixed by
https://lore.kernel.org/r/20201117165312.25847-1-vidyas@nvidia.com

[bhelgaas: set no_64bit_msi in pci_msi_init(), commit log]
Link: https://lore.kernel.org/r/20201124105035.24573-1-vidyas@nvidia.com
Link: https://lore.kernel.org/r/20201203185110.1583077-4-helgaas@kernel.org
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Xinghui Li <korantli@tencent.com>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-06-11 20:52:46 +08:00
..
controller Add support for PCIe endpoint controller support 2024-06-11 20:40:58 +08:00
endpoint ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
hotplug ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pcie ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
switch ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
Kconfig pci-v5.4-changes 2019-09-23 19:16:01 -07:00
Makefile PCI/MSI: Move MSI/MSI-X init to msi.c 2024-06-11 20:52:45 +08:00
access.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ats.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
bus.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ecam.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
host-bridge.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
iov.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
irq.c PCI: Use IRQF_ONESHOT if pci_request_irq() called with no handler 2018-07-31 10:43:43 -05:00
mmap.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
msi.c PCI/MSI: Set device flag indicating only 32-bit MSI support 2024-06-11 20:52:46 +08:00
of.c PCI: OF: Correct of_irq_parse_pci() documentation 2019-08-30 14:00:34 -05:00
p2pdma.c PCI/P2PDMA: Update pci_p2pdma_distance_many() documentation 2019-08-16 08:41:59 -05:00
pci-acpi.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pci-bridge-emul.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pci-bridge-emul.h PCI: pci-bridge-emul: Extend pci_bridge_emul_init() with flags 2019-02-22 10:51:14 +00:00
pci-driver.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pci-label.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
pci-mid.c x86/cpu: Sanitize FAM6_ATOM naming 2018-10-02 10:14:32 +02:00
pci-pf-stub.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
pci-stub.c PCI: Replace printk(KERN_INFO) with pr_info(), etc 2019-05-09 07:49:54 -05:00
pci-sysfs.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
pci.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pci.h PCI/MSI: Move MSI/MSI-X init to msi.c 2024-06-11 20:52:45 +08:00
probe.c PCI/MSI: Move MSI/MSI-X init to msi.c 2024-06-11 20:52:45 +08:00
proc.c Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
quirks.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
remove.c PCI/ASPM: Fix link_state teardown on device removal 2018-09-17 16:32:23 -05:00
rom.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
search.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
setup-bus.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
setup-irq.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
setup-res.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
slot.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
syscall.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
vc.c Merge branch 'pci/trivial' 2019-09-23 16:10:31 -05:00
vpd.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
xen-pcifront.c Merge branch 'pci/printk' 2019-05-13 18:34:46 -05:00