[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 09/19] xen/arm: Update irq descriptor for LPIs support
From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> Introduce new fields in irq descriptors for LPI support. data field to hold irq related data and virq to hold virtual lpi number for the corresponding irq Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> --- xen/arch/arm/irq.c | 18 ++++++++++++++++++ xen/include/asm-arm/irq.h | 3 ++- xen/include/xen/irq.h | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index cb9c99b..d52ee0c 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -89,6 +89,7 @@ static int __cpuinit init_local_irq_data(void) init_one_irq_desc(desc); desc->irq = irq; desc->action = NULL; + desc->data = NULL; /* PPIs are included in local_irqs, we copy the IRQ type from * local_irqs_type when bringing up local IRQ for this CPU in @@ -104,6 +105,23 @@ static int __cpuinit init_local_irq_data(void) return 0; } +int irq_set_desc_data(unsigned int irq, void *d) +{ + unsigned long flags; + struct irq_desc *desc = irq_to_desc(irq); + + spin_lock_irqsave(&desc->lock, flags); + desc->data = d; + spin_unlock_irqrestore(&desc->lock, flags); + + return 0; +} + +void *irq_get_desc_data(struct irq_desc *d) +{ + return d->data; +} + void __init init_IRQ(void) { int irq; diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h index 435dfcd..de029e4 100644 --- a/xen/include/asm-arm/irq.h +++ b/xen/include/asm-arm/irq.h @@ -46,7 +46,8 @@ void arch_move_irqs(struct vcpu *v); /* Set IRQ type for an SPI */ int irq_set_spi_type(unsigned int spi, unsigned int type); - +int irq_set_desc_data(unsigned int irq, void *d); +void *irq_get_desc_data(struct irq_desc *d); int platform_get_irq(const struct dt_device_node *device, int index); void irq_set_affinity(struct irq_desc *desc, const cpumask_t *cpu_mask); diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 9e0155c..f12afac 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -91,6 +91,8 @@ typedef struct irq_desc { spinlock_t lock; struct arch_irq_desc arch; cpumask_var_t affinity; + void *data; /* IRQ specific data */ + int virq; /* Used to store vlpi */ /* irq ratelimit */ s_time_t rl_quantum_start; -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |