Merge tag 'irqchip-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip updates for 4.15, take #4 from Marc Zyngier - A core irq fix for legacy cases where the irq trigger is not reported by firmware - A couple of GICv3/4 fixes (Kconfig, of-node refcount, error handling) - Trivial pr_err fixes
This commit is contained in:
@@ -211,6 +211,7 @@ struct irq_data {
|
||||
* IRQD_MANAGED_SHUTDOWN - Interrupt was shutdown due to empty affinity
|
||||
* mask. Applies only to affinity managed irqs.
|
||||
* IRQD_SINGLE_TARGET - IRQ allows only a single affinity target
|
||||
* IRQD_DEFAULT_TRIGGER_SET - Expected trigger already been set
|
||||
*/
|
||||
enum {
|
||||
IRQD_TRIGGER_MASK = 0xf,
|
||||
@@ -231,6 +232,7 @@ enum {
|
||||
IRQD_IRQ_STARTED = (1 << 22),
|
||||
IRQD_MANAGED_SHUTDOWN = (1 << 23),
|
||||
IRQD_SINGLE_TARGET = (1 << 24),
|
||||
IRQD_DEFAULT_TRIGGER_SET = (1 << 25),
|
||||
};
|
||||
|
||||
#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
|
||||
@@ -260,18 +262,25 @@ static inline void irqd_mark_affinity_was_set(struct irq_data *d)
|
||||
__irqd_to_state(d) |= IRQD_AFFINITY_SET;
|
||||
}
|
||||
|
||||
static inline bool irqd_trigger_type_was_set(struct irq_data *d)
|
||||
{
|
||||
return __irqd_to_state(d) & IRQD_DEFAULT_TRIGGER_SET;
|
||||
}
|
||||
|
||||
static inline u32 irqd_get_trigger_type(struct irq_data *d)
|
||||
{
|
||||
return __irqd_to_state(d) & IRQD_TRIGGER_MASK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Must only be called inside irq_chip.irq_set_type() functions.
|
||||
* Must only be called inside irq_chip.irq_set_type() functions or
|
||||
* from the DT/ACPI setup code.
|
||||
*/
|
||||
static inline void irqd_set_trigger_type(struct irq_data *d, u32 type)
|
||||
{
|
||||
__irqd_to_state(d) &= ~IRQD_TRIGGER_MASK;
|
||||
__irqd_to_state(d) |= type & IRQD_TRIGGER_MASK;
|
||||
__irqd_to_state(d) |= IRQD_DEFAULT_TRIGGER_SET;
|
||||
}
|
||||
|
||||
static inline bool irqd_is_level_type(struct irq_data *d)
|
||||
|
||||
Reference in New Issue
Block a user