From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbdIMVrN (ORCPT ); Wed, 13 Sep 2017 17:47:13 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40027 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbdIMVeq (ORCPT ); Wed, 13 Sep 2017 17:34:46 -0400 Message-Id: <20170913213153.106242536@linutronix.de> User-Agent: quilt/0.63-1 Date: Wed, 13 Sep 2017 23:29:13 +0200 From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Peter Anvin , Marc Zyngier , Peter Zijlstra , Borislav Petkov , Chen Yu , Rui Zhang , "Rafael J. Wysocki" , Len Brown , Dan Williams , Christoph Hellwig , Paolo Bonzini , Joerg Roedel , Boris Ostrovsky , Juergen Gross , Tony Luck , "K. Y. Srinivasan" , Alok Kataria , Steven Rostedt , Arjan van de Ven Subject: [patch 11/52] genirq/irqdomain: Add force reactivation flag to irq domains References: <20170913212902.530704676@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=genirq-irqdomain--Add-force-reactivation-flag-to-irq-domains.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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;