diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-11-25 00:24:17 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-12-05 19:20:58 +0100 |
commit | e71c5d0bb1885b73c746b634895b85d135ce2c87 (patch) | |
tree | 63321d9d89ab883d066777c60d420153e8303abf | |
parent | b749e6d31c88cff2202b968aaba246e5d7379038 (diff) | |
download | linux-e71c5d0bb1885b73c746b634895b85d135ce2c87.tar.bz2 |
genirq/irqdomain: Provide IRQ_DOMAIN_FLAG_MSI_DEVICE
Similar to marking parent MSI domains it's required to identify per device
domains. Add flag and helpers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124230313.747627287@linutronix.de
-rw-r--r-- | include/linux/irqdomain.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index f837db9a5339..24b76688c2fb 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -192,6 +192,9 @@ enum { /* Irq domain is a MSI parent domain */ IRQ_DOMAIN_FLAG_MSI_PARENT = (1 << 8), + /* Irq domain is a MSI device domain */ + IRQ_DOMAIN_FLAG_MSI_DEVICE = (1 << 9), + /* * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved * for implementation specific purposes and ignored by the @@ -559,6 +562,11 @@ static inline bool irq_domain_is_msi_parent(struct irq_domain *domain) return domain->flags & IRQ_DOMAIN_FLAG_MSI_PARENT; } +static inline bool irq_domain_is_msi_device(struct irq_domain *domain) +{ + return domain->flags & IRQ_DOMAIN_FLAG_MSI_DEVICE; +} + #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ static inline int irq_domain_alloc_irqs(struct irq_domain *domain, unsigned int nr_irqs, int node, void *arg) @@ -610,6 +618,11 @@ static inline bool irq_domain_is_msi_parent(struct irq_domain *domain) return false; } +static inline bool irq_domain_is_msi_device(struct irq_domain *domain) +{ + return false; +} + #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */ #else /* CONFIG_IRQ_DOMAIN */ |