Re: [PATCH 1/1] [RFC]sparc64: enable cpu hotplug feature

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

 



> This patch provides users with an option to
> disable/enable cpu at runtime by writing to
> /sys/devices/system/cpu/cpuX/online field.
> 
> Eg:
> $ echo [0/1] > /sys/devices/system/cpu/cpu2/online
> 
> Signed-off-by: Allen Pais <allen.pais@xxxxxxxxxx>
> Signed-off-by: Dave Kleikamp <dave.kleikamp@xxxxxxxxxx>
> ---
>  arch/sparc/kernel/smp_64.c |   48 +++++++++++++++++++++++--------------------
>  arch/sparc/kernel/sysfs.c  |    4 +++
>  2 files changed, 30 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
> index 19cd08d..5ea2f91 100644
> --- a/arch/sparc/kernel/smp_64.c
> +++ b/arch/sparc/kernel/smp_64.c
> @@ -1277,20 +1277,26 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
>  {
>  	int ret = smp_boot_one_cpu(cpu, tidle);
>  
> -	if (!ret) {
> -		cpumask_set_cpu(cpu, &smp_commenced_mask);
> -		while (!cpu_online(cpu))
> -			mb();
> -		if (!cpu_online(cpu)) {
> -			ret = -ENODEV;
> -		} else {
> -			/* On SUN4V, writes to %tick and %stick are
> -			 * not allowed.
> -			 */

Any comments on this patch??

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux