Skip to content

Commit 457f6d3

Browse files
committed
genirq: Make state consistent for !IRQ_DOMAIN_HIERARCHY
In the !IRQ_DOMAIN_HIERARCHY cas the activation stubs are not setting/clearing the activation status bits. This is not a problem at the moment, but upcoming changes require a correct status. Add the set/clear incovations to the stub functions and move them to the core internal header to avoid duplication and visibility outside the core. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Juergen Gross <jgross@suse.com> Tested-by: Yu Chen <yu.c.chen@intel.com> Acked-by: Juergen Gross <jgross@suse.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Alok Kataria <akataria@vmware.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Rui Zhang <rui.zhang@intel.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Len Brown <lenb@kernel.org> Link: https://lkml.kernel.org/r/20170913213152.591985591@linutronix.de
1 parent c3e7239 commit 457f6d3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

include/linux/irqdomain.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,6 @@ static inline bool irq_domain_is_msi_remap(struct irq_domain *domain)
511511
extern bool irq_domain_hierarchical_is_msi_remap(struct irq_domain *domain);
512512

513513
#else /* CONFIG_IRQ_DOMAIN_HIERARCHY */
514-
static inline void irq_domain_activate_irq(struct irq_data *data) { }
515-
static inline void irq_domain_deactivate_irq(struct irq_data *data) { }
516514
static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
517515
unsigned int nr_irqs, int node, void *arg)
518516
{
@@ -561,8 +559,6 @@ irq_domain_hierarchical_is_msi_remap(struct irq_domain *domain)
561559

562560
#else /* CONFIG_IRQ_DOMAIN */
563561
static inline void irq_dispose_mapping(unsigned int virq) { }
564-
static inline void irq_domain_activate_irq(struct irq_data *data) { }
565-
static inline void irq_domain_deactivate_irq(struct irq_data *data) { }
566562
static inline struct irq_domain *irq_find_matching_fwnode(
567563
struct fwnode_handle *fwnode, enum irq_domain_bus_token bus_token)
568564
{

kernel/irq/internals.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,17 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear)
436436
}
437437
#endif /* !CONFIG_GENERIC_PENDING_IRQ */
438438

439+
#if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY)
440+
static inline void irq_domain_activate_irq(struct irq_data *data)
441+
{
442+
irqd_set_activated(data);
443+
}
444+
static inline void irq_domain_deactivate_irq(struct irq_data *data)
445+
{
446+
irqd_clr_activated(data);
447+
}
448+
#endif
449+
439450
#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
440451
#include <linux/debugfs.h>
441452

0 commit comments

Comments
 (0)