irqdesc: Add function to identify percpu_devid irqs

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>
This commit is contained in:
Julien Thierry 2017-10-13 12:26:44 +01:00 committed by Will Deacon
parent 5bdecb7971
commit 08395c7f4d
1 changed files with 8 additions and 0 deletions

View 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)
{