Skip to content

Commit a21af9d

Browse files
author
Myron Stowe
committed
irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()
JIRA: https://issues.redhat.com/browse/RHEL-120705 Upstream Status: b8c7bfb commit b8c7bfb Author: Frank Li <Frank.Li@nxp.com> Date: Mon Apr 14 14:30:56 2025 -0400 irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable() Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function irq_domain_is_msi_immutable() to check if the MSI controller retains an immutable address/data pair during irq_set_affinity(). Ensure compatibility with MSI users like PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged after setup. Use this function to verify if the MSI controller is immutable. Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250414-ep-msi-v18-2-f69b49917464@nxp.com Signed-off-by: Myron Stowe <mstowe@redhat.com>
1 parent f9dff67 commit a21af9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/irqdomain.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ enum {
231231
/* Irq domain must destroy generic chips when removed */
232232
IRQ_DOMAIN_FLAG_DESTROY_GC = (1 << 10),
233233

234+
/* Address and data pair is mutable when irq_set_affinity() */
235+
IRQ_DOMAIN_FLAG_MSI_IMMUTABLE = (1 << 11),
236+
234237
/*
235238
* Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved
236239
* for implementation specific purposes and ignored by the
@@ -693,6 +696,10 @@ static inline bool irq_domain_is_msi_device(struct irq_domain *domain)
693696
return domain->flags & IRQ_DOMAIN_FLAG_MSI_DEVICE;
694697
}
695698

699+
static inline bool irq_domain_is_msi_immutable(struct irq_domain *domain)
700+
{
701+
return domain->flags & IRQ_DOMAIN_FLAG_MSI_IMMUTABLE;
702+
}
696703
#else /* CONFIG_IRQ_DOMAIN_HIERARCHY */
697704
static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
698705
unsigned int nr_irqs, int node, void *arg)

0 commit comments

Comments
 (0)