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

Re: [Xen-devel] [PATCH 09 of 10] arm: SMP CPU shutdown



On Thu, 2012-02-23 at 17:40 +0000, Tim Deegan wrote:
> # HG changeset patch
> # User Tim Deegan <tim@xxxxxxx>
> # 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?

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

> Signed-off-by: TIm Deegan <tim@xxxxxxx>

Typo here.

[...]
> +    /* 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

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

> +    /* Make sure the write happens before we sleep forever */
> +    dsb();
> +    isb();
> +    while ( 1 ) 
> +        asm volatile("wfi");
>  }
>  
>  /* Bring up a remote CPU */

Ian.


_______________________________________________
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®.