[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] arm: remove VGIC_SOFTIRQ
# HG changeset patch # User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> # Date 1338542435 -3600 # Node ID 4406628d77edb1a7040ee9574debcdb013b2c003 # Parent ebf41e3d1ee3041a96d84e2a6f7576171179772b arm: remove VGIC_SOFTIRQ Instead of using a softirq to check whether we need to set the VI bit in the HCR (IRQ injection in the guest), always check the lr_mask on leave_hypervisor_tail. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/gic.c --- a/xen/arch/arm/gic.c Fri Jun 01 10:20:34 2012 +0100 +++ b/xen/arch/arm/gic.c Fri Jun 01 10:20:35 2012 +0100 @@ -433,7 +433,7 @@ out: return; } -void gic_inject_irq_start(void) +static void gic_inject_irq_start(void) { uint32_t hcr; hcr = READ_CP32(HCR); @@ -441,7 +441,7 @@ void gic_inject_irq_start(void) isb(); } -void gic_inject_irq_stop(void) +static void gic_inject_irq_stop(void) { uint32_t hcr; hcr = READ_CP32(HCR); @@ -451,6 +451,14 @@ void gic_inject_irq_stop(void) } } +void gic_inject(void) +{ + if (!gic.lr_mask) + gic_inject_irq_stop(); + else + gic_inject_irq_start(); +} + int gic_route_irq_to_guest(struct domain *d, unsigned int irq, const char * devname) { @@ -540,7 +548,6 @@ static void maintenance_interrupt(int ir GICC[GICC_DIR] = virq; } list_del_init(&p->inflight); - cpu_raise_softirq(current->processor, VGIC_SOFTIRQ); spin_unlock(¤t->arch.vgic.lock); i++; diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/gic.h --- a/xen/arch/arm/gic.h Fri Jun 01 10:20:34 2012 +0100 +++ b/xen/arch/arm/gic.h Fri Jun 01 10:20:35 2012 +0100 @@ -128,11 +128,11 @@ extern struct pending_irq *irq_to_pendin extern void gic_route_irqs(void); +extern void gic_inject(void); + extern void __cpuinit init_maintenance_interrupt(void); extern void gic_set_guest_irq(unsigned int irq, unsigned int state, unsigned int priority); -extern void gic_inject_irq_start(void); -extern void gic_inject_irq_stop(void); extern int gic_route_irq_to_guest(struct domain *d, unsigned int irq, const char * devname); diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/traps.c --- a/xen/arch/arm/traps.c Fri Jun 01 10:20:34 2012 +0100 +++ b/xen/arch/arm/traps.c Fri Jun 01 10:20:35 2012 +0100 @@ -608,8 +608,10 @@ asmlinkage void leave_hypervisor_tail(vo while (1) { local_irq_disable(); - if (!softirq_pending(smp_processor_id())) + if (!softirq_pending(smp_processor_id())) { + gic_inject(); return; + } local_irq_enable(); do_softirq(); } diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/vgic.c --- a/xen/arch/arm/vgic.c Fri Jun 01 10:20:34 2012 +0100 +++ b/xen/arch/arm/vgic.c Fri Jun 01 10:20:35 2012 +0100 @@ -577,23 +577,8 @@ void vgic_vcpu_inject_irq(struct vcpu *v list_add_tail(&n->inflight, &v->arch.vgic.inflight_irqs); spin_unlock(&v->arch.vgic.lock); /* we have a new higher priority irq, inject it into the guest */ - cpu_raise_softirq(v->processor, VGIC_SOFTIRQ); } -static void vgic_softirq(void) -{ - if (list_empty(¤t->arch.vgic.inflight_irqs)) - return; - - gic_inject_irq_start(); -} - -static int __init init_vgic_softirq(void) -{ - open_softirq(VGIC_SOFTIRQ, vgic_softirq); - return 0; -} -__initcall(init_vgic_softirq); /* * Local variables: * mode: C diff -r ebf41e3d1ee3 -r 4406628d77ed xen/include/asm-arm/softirq.h --- a/xen/include/asm-arm/softirq.h Fri Jun 01 10:20:34 2012 +0100 +++ b/xen/include/asm-arm/softirq.h Fri Jun 01 10:20:35 2012 +0100 @@ -1,8 +1,7 @@ #ifndef __ASM_SOFTIRQ_H__ #define __ASM_SOFTIRQ_H__ -#define VGIC_SOFTIRQ (NR_COMMON_SOFTIRQS + 0) -#define NR_ARCH_SOFTIRQS 1 +#define NR_ARCH_SOFTIRQS 0 #endif /* __ASM_SOFTIRQ_H__ */ /* _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |