[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 4/6] xen/arm: implement gic_irq_enable and gic_irq_disable
Rename gic_irq_startup to gic_irq_enable. Rename gic_irq_shutdown to gic_irq_disable. Implement gic_irq_startup and gic_irq_shutdown calling gic_irq_enable and gic_irq_disable. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Changes in v2: - no need to read the current GICD_ISENABLER before writing it. --- xen/arch/arm/gic.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 02f1984..b2caced 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -129,19 +129,15 @@ void gic_restore_state(struct vcpu *v) gic_restore_pending_irqs(v); } -static unsigned int gic_irq_startup(struct irq_desc *desc) +static void gic_irq_enable(struct irq_desc *desc) { - uint32_t enabler; int irq = desc->irq; /* Enable routing */ - enabler = GICD[GICD_ISENABLER + irq / 32]; - GICD[GICD_ISENABLER + irq / 32] = enabler | (1u << (irq % 32)); - - return 0; + GICD[GICD_ISENABLER + irq / 32] = (1u << (irq % 32)); } -static void gic_irq_shutdown(struct irq_desc *desc) +static void gic_irq_disable(struct irq_desc *desc) { int irq = desc->irq; @@ -149,14 +145,15 @@ static void gic_irq_shutdown(struct irq_desc *desc) GICD[GICD_ICENABLER + irq / 32] = (1u << (irq % 32)); } -static void gic_irq_enable(struct irq_desc *desc) +static unsigned int gic_irq_startup(struct irq_desc *desc) { - + gic_irq_enable(desc); + return 0; } -static void gic_irq_disable(struct irq_desc *desc) +static void gic_irq_shutdown(struct irq_desc *desc) { - + gic_irq_disable(desc); } static void gic_irq_ack(struct irq_desc *desc) -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |