Skip to content

Commit 22d0b12

Browse files
committed
genirq/irqdomain: Add force reactivation flag to irq domains
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 <[email protected]> Tested-by: Juergen Gross <[email protected]> Tested-by: Yu Chen <[email protected]> Acked-by: Juergen Gross <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Tony Luck <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Alok Kataria <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Rui Zhang <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Dan Williams <[email protected]> Cc: Len Brown <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 42e1cc2 commit 22d0b12

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/linux/msi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ enum {
283283
MSI_FLAG_PCI_MSIX = (1 << 3),
284284
/* Needs early activate, required for PCI */
285285
MSI_FLAG_ACTIVATE_EARLY = (1 << 4),
286+
/*
287+
* Must reactivate when irq is started even when
288+
* MSI_FLAG_ACTIVATE_EARLY has been set.
289+
*/
290+
MSI_FLAG_MUST_REACTIVATE = (1 << 5),
286291
};
287292

288293
int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,

kernel/irq/msi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
404404
ret = irq_domain_activate_irq(irq_data, true);
405405
if (ret)
406406
goto cleanup;
407+
if (info->flags & MSI_FLAG_MUST_REACTIVATE)
408+
irqd_clr_activated(irq_data);
407409
}
408410
}
409411
return 0;

0 commit comments

Comments
 (0)