[lhcs-devel] Re: [RFC] don't create cpu/online sysfs file

Nathan Lynch nathanl at austin.ibm.com
Tue Jun 8 00:07:38 EST 2004


Dave Hansen wrote:
> diff -urp linux-2.6.7-rc2-mm2-clean/drivers/base/cpu.c linux-2.6.7-rc2-mm2-cpuonline2/drivers/base/cpu.c
> --- linux-2.6.7-rc2-mm2-clean/drivers/base/cpu.c	Fri Jun  4 13:27:09 2004
> +++ linux-2.6.7-rc2-mm2-cpuonline2/drivers/base/cpu.c	Sun Jun  6 21:59:35 2004
> @@ -75,7 +75,7 @@ int __init register_cpu(struct cpu *cpu,
>  		error = sysfs_create_link(&root->sysdev.kobj,
>  					  &cpu->sysdev.kobj,
>  					  kobject_name(&cpu->sysdev.kobj));
> -	if (!error)
> +	if (!error && !cpu->can_control)

Should be:
+	if (!error && cpu->can_control)

Right?


> diff -urp linux-2.6.7-rc2-mm2-clean/include/linux/cpu.h linux-2.6.7-rc2-mm2-cpuonline2/include/linux/cpu.h
> --- linux-2.6.7-rc2-mm2-clean/include/linux/cpu.h	Fri Jun  4 13:27:11 2004
> +++ linux-2.6.7-rc2-mm2-cpuonline2/include/linux/cpu.h	Sun Jun  6 21:58:35 2004
> @@ -27,6 +27,7 @@
>
>  struct cpu {
>  	int node_id;		/* The node which contains the CPU */
> +	int can_control;	/* Should the sysfs control file be created? */

Minor nit -- could we change this comment to "Could this cpu ever be
hotpluggable?"  Or just name the field "hotpluggable"?  That would
better document the intent here, wouldn't it?


Nathan

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list