[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/5] xen/arm: Rename gic_irq_{startup, shutdown} to gic_irq_{mask, unmask}
Also implement enable/disable as mask/unmask irq. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> --- xen/arch/arm/gic.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index bf05716..b16ba8c 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -103,7 +103,7 @@ 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_unmask(struct irq_desc *desc) { uint32_t enabler; int irq = desc->irq; @@ -111,11 +111,9 @@ static unsigned int gic_irq_startup(struct irq_desc *desc) /* Enable routing */ enabler = GICD[GICD_ISENABLER + irq / 32]; GICD[GICD_ISENABLER + irq / 32] = enabler | (1u << (irq % 32)); - - return 0; } -static void gic_irq_shutdown(struct irq_desc *desc) +static void gic_irq_mask(struct irq_desc *desc) { uint32_t enabler; int irq = desc->irq; @@ -125,14 +123,11 @@ static void gic_irq_shutdown(struct irq_desc *desc) GICD[GICD_ICENABLER + irq / 32] = enabler | (1u << (irq % 32)); } -static void gic_irq_enable(struct irq_desc *desc) -{ - -} - -static void gic_irq_disable(struct irq_desc *desc) +static unsigned int gic_irq_startup(struct irq_desc *desc) { + gic_irq_unmask(desc); + return 0; } static void gic_irq_ack(struct irq_desc *desc) @@ -166,9 +161,9 @@ static void gic_irq_set_affinity(struct irq_desc *desc, const cpumask_t *mask) static hw_irq_controller gic_host_irq_type = { .typename = "gic", .startup = gic_irq_startup, - .shutdown = gic_irq_shutdown, - .enable = gic_irq_enable, - .disable = gic_irq_disable, + .shutdown = gic_irq_mask, + .enable = gic_irq_unmask, + .disable = gic_irq_mask, .ack = gic_irq_ack, .end = gic_host_irq_end, .set_affinity = gic_irq_set_affinity, @@ -176,9 +171,9 @@ static hw_irq_controller gic_host_irq_type = { static hw_irq_controller gic_guest_irq_type = { .typename = "gic", .startup = gic_irq_startup, - .shutdown = gic_irq_shutdown, - .enable = gic_irq_enable, - .disable = gic_irq_disable, + .shutdown = gic_irq_mask, + .enable = gic_irq_unmask, + .disable = gic_irq_mask, .ack = gic_irq_ack, .end = gic_guest_irq_end, .set_affinity = gic_irq_set_affinity, -- 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 |