genirq: Provide IRQD_FORWARDED_TO_VCPU status flag
Provide a irq data flag to mark an irq forwarded to a VCPU along with the accessor functions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
This commit is contained in:
@ -186,6 +186,7 @@ struct irq_data {
|
|||||||
* IRQD_IRQ_MASKED - Masked state of the interrupt
|
* IRQD_IRQ_MASKED - Masked state of the interrupt
|
||||||
* IRQD_IRQ_INPROGRESS - In progress state of the interrupt
|
* IRQD_IRQ_INPROGRESS - In progress state of the interrupt
|
||||||
* IRQD_WAKEUP_ARMED - Wakeup mode armed
|
* IRQD_WAKEUP_ARMED - Wakeup mode armed
|
||||||
|
* IRQD_FORWARDED_TO_VCPU - The interrupt is forwarded to a VCPU
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
IRQD_TRIGGER_MASK = 0xf,
|
IRQD_TRIGGER_MASK = 0xf,
|
||||||
@ -200,6 +201,7 @@ enum {
|
|||||||
IRQD_IRQ_MASKED = (1 << 17),
|
IRQD_IRQ_MASKED = (1 << 17),
|
||||||
IRQD_IRQ_INPROGRESS = (1 << 18),
|
IRQD_IRQ_INPROGRESS = (1 << 18),
|
||||||
IRQD_WAKEUP_ARMED = (1 << 19),
|
IRQD_WAKEUP_ARMED = (1 << 19),
|
||||||
|
IRQD_FORWARDED_TO_VCPU = (1 << 20),
|
||||||
};
|
};
|
||||||
|
|
||||||
#define __irqd_to_state(d) ((d)->common->state_use_accessors)
|
#define __irqd_to_state(d) ((d)->common->state_use_accessors)
|
||||||
@ -278,6 +280,20 @@ static inline bool irqd_is_wakeup_armed(struct irq_data *d)
|
|||||||
return __irqd_to_state(d) & IRQD_WAKEUP_ARMED;
|
return __irqd_to_state(d) & IRQD_WAKEUP_ARMED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool irqd_is_forwarded_to_vcpu(struct irq_data *d)
|
||||||
|
{
|
||||||
|
return __irqd_to_state(d) & IRQD_FORWARDED_TO_VCPU;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void irqd_set_forwarded_to_vcpu(struct irq_data *d)
|
||||||
|
{
|
||||||
|
__irqd_to_state(d) |= IRQD_FORWARDED_TO_VCPU;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void irqd_clr_forwarded_to_vcpu(struct irq_data *d)
|
||||||
|
{
|
||||||
|
__irqd_to_state(d) &= ~IRQD_FORWARDED_TO_VCPU;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions for chained handlers which can be enabled/disabled by the
|
* Functions for chained handlers which can be enabled/disabled by the
|
||||||
|
Reference in New Issue
Block a user