[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V2 1/2] xen/arm: gic_disable_cpu must be called with interrupts disabled



On Tue, 2013-04-16 at 14:38 +0100, Julien Grall wrote:
> gic_disable_cpu is only called with interrupt disabled.
> Use spin_lock instead of spin_lock_irq and check the function is
> called with interrupts disabled.

Is this patch still relevant after this change which is now in master?

commit b4aae03ce525e8e2364814d0fed8f982aefc4958
Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date:   Mon Apr 29 18:04:25 2013 +0100

    xen/arm: do not call __cpu_disable on machine_halt
    
    __cpu_disable shouldn't be called on machine_halt, in fact it cannot
    succeed: cpu_disable_scheduler won't be able to migrate away vcpus to
    others pcpus.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> 
> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> ---
>  xen/arch/arm/gic.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index aa179a9..0ef994e 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -419,10 +419,12 @@ void __cpuinit gic_init_secondary_cpu(void)
>  /* Shut down the per-CPU GIC interface */
>  void gic_disable_cpu(void)
>  {
> -    spin_lock_irq(&gic.lock);
> +    ASSERT(!local_irq_is_enabled());
> +
> +    spin_lock(&gic.lock);
>      gic_cpu_disable();
>      gic_hyp_disable();
> -    spin_unlock_irq(&gic.lock);
> +    spin_unlock(&gic.lock);
>  }
>  
>  void gic_route_ppis(void)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.