mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
Fix bogus MSI IRQ setup warning on RISC-V.
Signed-off-by: Ingo Molnar <mingo@kernel.org> -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxCpYRHG1pbmdvQGtl cm5lbC5vcmcACgkQEnMQ0APhK1ivVA//YII6d9TjaEVcADmGnuM6wo4/QGkVmjqW q5sQUrzsk9Y7uOkru5OfzMpH1/SlXy/LxGTjPb8V4u8d77EK1lwudWyqfubB3MRo F/x34lybF7JE8w0sp3a1DIXQ807oPEs85onGEbNMSMiG8XU/l5xBSSX0IZYevgU/ y0MEfFwV6fU8Wo9MFji8O7K1gW3hbWKfuKL7VlB7Ej3/QgpCAS1adpndysFLc5EE 3b/bpjX6pEGW4BHUKGPSyJm0yuOKFbdZDg7c8whsix7PNsKI1kgQAxg2FxW9nLHj NDDReTw0A9eZUTh4d9OLy55+eGM1BevusEf5gomE5cR5b/4HZmmmC4SjE+k7pszN Qos+OfdaA2teRJWzBKnIxgqOPCc/h9CCS9ta89K9W4z4QrbpHHv5vYReE9ooQ9o/ hH909mDhKQ/fdwIjJESkz3MVIxnqlXAqTA+VWEH1qXistGqQU4Tb2ywhPLzi1JUW vc/dANwef/7CQwfQf0RnPVK20+FATkOHwhw9a8Jwe/aPyrfAQShJi+1N0GUhlAYn n868CGMCJ+yk+RSgsqcxq3r7M4vtbnn7YxKPqlwkz9IOsnCpAUebYxm28SMo0RPH Xkbp4SwO5A7CIad1JF+U3am0DxTnpRj84ItftleYFfKfGmVhDnqxKfSs25mwdnee w46Edap72F0= =EuZb -----END PGP SIGNATURE----- Merge tag 'irq-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Ingo Molnar: "Fix bogus MSI IRQ setup warning on RISC-V" * tag 'irq-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: PCI/MSI: Handle lack of irqdomain gracefully
This commit is contained in:
commit
feffd35a03
@ -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)) {
|
||||
/*
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user