xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH 09 of 10] arm: SMP CPU shutdown
Date: Tue, 28 Feb 2012 18:13:26 +0000	[thread overview]
Message-ID: <20120228181326.GA18897@ocelot.phlegethon.org> (raw)
In-Reply-To: <1330425518.31269.61.camel@zakaz.uk.xensource.com>

At 10:38 +0000 on 28 Feb (1330425518), Ian Campbell wrote:
> On Thu, 2012-02-23 at 17:40 +0000, Tim Deegan wrote:
> > # HG changeset patch
> > # User Tim Deegan <tim@xen.org>
> > # Date 1330018799 0
> > # Node ID a78bc9b8421492e0545c6d52c7a32b9de9737d61
> > # Parent  d35b52e5fde829dfbaf3da73e0716d004faded2f
> > arm: SMP CPU shutdown
> > 
> > For completeness, also implelent the CPU shutdown path.
> 
> Does something free the init_stack for a CPU as it goes down?

Er, no. :)  

> Alternatively the bring up path could reuse it if the CPU came back but
> we don't seem to do that either.

I'll make it so. 

> > Signed-off-by: TIm Deegan <tim@xen.org>
> 
> Typo here.

WHat TYpo? I ALways SIgn MY NAme THat WAy.

> [...]
> > +    /* It's now safe to remove this processor from the online map */
> > +    cpumask_clear_cpu(cpu, &cpu_online_map);
> > +
> > +    if ( cpu_disable_scheduler(cpu) )
> > +        BUG();
> > +    mb();
> > +
> > +    /* Return to caller; eventually the IPI mecahnism will unwind and the 
> 
>                                                mechanism

ta.

> > +     * scheduler will drop to the idle loop, which will call stop_cpu(). */
> > +}
> > +
> > +void stop_cpu(void)
> > +{
> > +    local_irq_disable();
> > +    cpu_is_dead = 1;
> 
> Do we lock this variable? What stops multiple CPUs coming down at once?

IIRC that's serialized at a higher level, and the x86 equivalent
similarly uses static variables for signalling.  Will double-check
before I re-send this series (probably next week).

Cheers,

Tim.

  reply	other threads:[~2012-02-28 18:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 17:40 [PATCH 00 of 10] arm: SMP boot Tim Deegan
2012-02-23 17:40 ` [PATCH 01 of 10] arm: strip xen binary Tim Deegan
2012-02-23 17:40 ` [PATCH 02 of 10] arm: implement udelay() Tim Deegan
2012-02-23 19:03   ` David Vrabel
2012-02-27 19:19     ` Tim Deegan
2012-02-23 17:40 ` [PATCH 03 of 10] arm: Move some GIC distributor init out of the per-CPU init function Tim Deegan
2012-02-27 17:32   ` Ian Campbell
2012-02-27 19:30     ` Tim Deegan
2012-02-28 10:24       ` Ian Campbell
2012-02-23 17:40 ` [PATCH 04 of 10] arm: Handle booting on SMP platforms Tim Deegan
2012-02-23 17:40 ` [PATCH 05 of 10] arm: More SMP bringup Tim Deegan
2012-02-23 19:16   ` Ian Campbell
2012-02-27 19:20     ` Tim Deegan
2012-02-23 17:40 ` [PATCH 06 of 10] arm: per-cpu areas Tim Deegan
2012-02-28 10:25   ` Ian Campbell
2012-02-23 17:40 ` [PATCH 07 of 10] arm: start plumbing in SMP bringup in C Tim Deegan
2012-02-28 10:27   ` Ian Campbell
2012-02-23 17:40 ` [PATCH 08 of 10] arm: Boot secondary CPUs into C Tim Deegan
2012-02-28 10:34   ` Ian Campbell
2012-02-23 17:40 ` [PATCH 09 of 10] arm: SMP CPU shutdown Tim Deegan
2012-02-28 10:38   ` Ian Campbell
2012-02-28 18:13     ` Tim Deegan [this message]
2012-02-23 17:40 ` [PATCH 10 of 10] arm: Shutdown and reboot Tim Deegan
2012-02-28 10:39   ` Ian Campbell
2012-02-28 10:18 ` [PATCH 00 of 10] arm: SMP boot Ian Campbell
2012-02-29 14:36 ` Ian Campbell
2012-02-29 22:22   ` Tim Deegan

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=20120228181326.GA18897@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).