]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map"
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Mon, 10 May 2021 17:31:30 +0000 (19:31 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 25 May 2021 23:37:37 +0000 (18:37 -0500)
commit4ea401f0a16d057aa965fa976d2379006e526692
tree63b2c9b396ffd828691891afcc552163f46edfe9
parentcde4d8be6ede8cf3ea8fff02667475fc9981b8a3
PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map"

Since commit de099f1e4300 ("PCI/MSI: Make pci_host_common_probe() declare
its reliance on MSI domains"), platforms that rely on the "msi-map"
device-tree property don't get MSIs anymore.

On the Arm Fast Model for example [1], the host bridge doesn't have a
"msi-parent" property since it doesn't itself generate MSIs, and so doesn't
get a MSI domain. It has an "msi-map" property instead to describe MSI
controllers of child devices. As a result, due to the new msi_domain check
in pci_register_host_bridge(), the whole bus gets PCI_BUS_FLAGS_NO_MSI.

Check whether the root complex has an "msi-map" property before giving
up on MSIs.

[1] arch/arm64/boot/dts/arm/fvp-base-revc.dts

Fixes: de099f1e4300 ("PCI/MSI: Make pci_host_common_probe() declare its reliance on MSI domains")
Link: https://lore.kernel.org/r/20210510173129.750496-1-jean-philippe@linaro.org
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
drivers/pci/of.c
drivers/pci/probe.c
include/linux/pci.h