All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH V2 1/2] xen/arm: gic_disable_cpu must be called with interrupts disabled
Date: Wed, 1 May 2013 13:25:58 +0100	[thread overview]
Message-ID: <518109D6.3070801@citrix.com> (raw)
In-Reply-To: <1367409334.3142.718.camel@zakaz.uk.xensource.com>

On 05/01/2013 12:55 PM, Ian Campbell wrote:

> 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?


Yes. gic_disable is only called by __cpu_disable, and the irq is disabled.

local_irq_disable();
gic_disable_cpu();

> 
> commit b4aae03ce525e8e2364814d0fed8f982aefc4958
> Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 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@eu.citrix.com>
>     Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
>>
>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>> ---
>>  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)
> 
> 

  reply	other threads:[~2013-05-01 12:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 13:38 [PATCH V2 0/2] xen/arm: implement smp_call_function Julien Grall
2013-04-16 13:38 ` [PATCH V2 1/2] xen/arm: gic_disable_cpu must be called with interrupts disabled Julien Grall
2013-04-16 14:16   ` Ian Campbell
2013-05-01 11:55   ` Ian Campbell
2013-05-01 12:25     ` Julien Grall [this message]
2013-05-10 14:22       ` Ian Campbell
2013-04-16 13:38 ` [PATCH V2 2/2] xen/arm: implement smp_call_function Julien Grall
2013-04-16 14:20   ` Ian Campbell
2013-05-03 20:27   ` Keir Fraser
2013-04-22 11:44 ` [PATCH V2 0/2] " Ian Campbell
2013-04-30 15:42   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=518109D6.3070801@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.