Merge branch into tip/master: 'irq/urgent'

# New commits in irq/urgent:
    a60b990798 ("PCI/MSI: Handle lack of irqdomain gracefully")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2024-12-19 20:24:22 +01:00
commit 8516ed93ca
2 changed files with 9 additions and 2 deletions

View File

@ -350,8 +350,11 @@ bool pci_msi_domain_supports(struct pci_dev *pdev, unsigned int feature_mask,
domain = dev_get_msi_domain(&pdev->dev);
if (!domain || !irq_domain_is_hierarchy(domain))
return mode == ALLOW_LEGACY;
if (!domain || !irq_domain_is_hierarchy(domain)) {
if (IS_ENABLED(CONFIG_PCI_MSI_ARCH_FALLBACKS))
return mode == ALLOW_LEGACY;
return false;
}
if (!irq_domain_is_msi_parent(domain)) {
/*

View File

@ -433,6 +433,10 @@ int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
if (WARN_ON_ONCE(dev->msi_enabled))
return -EINVAL;
/* Test for the availability of MSI support */
if (!pci_msi_domain_supports(dev, 0, ALLOW_LEGACY))
return -ENOTSUPP;
nvec = pci_msi_vec_count(dev);
if (nvec < 0)
return nvec;