[patch 11/52] genirq/irqdomain: Add force reactivation flag to irq domains
From: Thomas Gleixner
Date: Wed Sep 13 2017 - 17:47:18 EST
Allow irqdomains to tell the core code, that after early activation the
interrupt needs to be reactivated at request_irq() time.
This allows reservation of vectors at early activation time and actual
vector assignment at request_irq() time.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/msi.h | 5 +++++
kernel/irq/msi.c | 2 ++
2 files changed, 7 insertions(+)
Index: b/include/linux/msi.h
===================================================================
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -283,6 +283,11 @@ enum {
MSI_FLAG_PCI_MSIX = (1 << 3),
/* Needs early activate, required for PCI */
MSI_FLAG_ACTIVATE_EARLY = (1 << 4),
+ /*
+ * Must reactivate when irq is started even when
+ * MSI_FLAG_ACTIVATE_EARLY has been set.
+ */
+ MSI_FLAG_MUST_REACTIVATE = (1 << 5),
};
int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
Index: b/kernel/irq/msi.c
===================================================================
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -403,6 +403,8 @@ int msi_domain_alloc_irqs(struct irq_dom
ret = irq_domain_activate_irq(irq_data, true);
if (ret)
goto cleanup;
+ if (info->flags & MSI_FLAG_MUST_REACTIVATE)
+ irqd_clr_activated(irq_data);
}
}
return 0;