struct msi_domain_info *info)
{
const struct msi_parent_ops *pops = real_parent->msi_parent_ops;
+ u32 required_flags;
/* Parent ops available? */
if (WARN_ON_ONCE(!pops))
return false;
}
+ required_flags = pops->required_flags;
+
/* Is the target domain bus token supported? */
switch(info->bus_token) {
+ case DOMAIN_BUS_PCI_DEVICE_MSI:
+ case DOMAIN_BUS_PCI_DEVICE_MSIX:
+ if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_PCI_MSI)))
+ return false;
+
+ break;
default:
/*
* This should never be reached. See
*/
info->flags &= pops->supported_flags;
/* Enforce the required flags */
- info->flags |= pops->required_flags;
+ info->flags |= required_flags;
/* Chip updates for all child bus types */
if (!info->chip->irq_eoi)
#include <linux/irqdomain.h>
#include <linux/msi.h>
+#ifdef CONFIG_PCI_MSI
+#define MATCH_PCI_MSI BIT(DOMAIN_BUS_PCI_MSI)
+#else
+#define MATCH_PCI_MSI (0)
+#endif
+
int msi_lib_irq_domain_select(struct irq_domain *d, struct irq_fwspec *fwspec,
enum irq_domain_bus_token bus_token);