]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
irqdesc: Add function to identify percpu_devid irqs
authorJulien Thierry <julien.thierry@arm.com>
Fri, 13 Oct 2017 11:26:44 +0000 (12:26 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 24 Oct 2017 15:03:28 +0000 (16:03 +0100)
irq_is_percpu indicates whether an irq should only target a single cpu.
PERCPU_DEVID flag indicates that an irq can be configured differently on
each cpu it can target.

Provide a function to check whether an irq is PERCPU_DEVID.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
include/linux/irqdesc.h

index 3e90a094798d2955054db8f8bee381cb07dcfde9..93960cf36e2324dd8f955e910066bba1ef7b6e07 100644 (file)
@@ -244,6 +244,14 @@ static inline int irq_is_percpu(unsigned int irq)
        return desc->status_use_accessors & IRQ_PER_CPU;
 }
 
+static inline int irq_is_percpu_devid(unsigned int irq)
+{
+       struct irq_desc *desc;
+
+       desc = irq_to_desc(irq);
+       return desc->status_use_accessors & IRQ_PER_CPU_DEVID;
+}
+
 static inline void
 irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
 {