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

Andrew Morton akpm at osdl.org
Wed Jun 9 17:10:36 EST 2004


Ashok Raj <ashok.raj at intel.com> wrote:
>
> On Mon, Jun 07, 2004 at 09:41:49AM -0700, Dave Hansen wrote:
>  > On Mon, 2004-06-07 at 07:08, Ashok Raj wrote:plugging.
>  > > +		if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
>  > > +			cpu->no_control=1;
>  >
>  > That condition is also inverted.  Should read:
>  >
>  > if (systemcfg->platform != PLATFORM_PSERIES_LPAR)
>  > 	cpu->no_control = 1;
>
>  Good catch...I knew i mentioned untested :-)
>
>  fixed patch attached...
>
> ...
>  --- linux-2.6.7-rc2/arch/ppc64/kernel/sysfs.c~cpu_control_file	2004-06-06 13:12:06.467033408 -0700
>  +++ linux-2.6.7-rc2-root/arch/ppc64/kernel/sysfs.c	2004-06-07 10:12:45.999901454 -0700
>  @@ -325,6 +325,16 @@ static int __init topology_init(void)
>   #ifdef CONFIG_NUMA
>   		parent = &node_devices[cpu_to_node(cpu)];
>   #endif
>  +		/*
>  +		 * For now, we just see if the system supports making
>  +		 * the RTAS calls for CPU hotplug.  But, there may be a
>  +		 * more comprehensive way to do this for an individual
>  +		 * CPU.  For instance, the boot cpu might never be valid
>  +		 * for hotplugging.
>  +		 */
>  +		if (systemcfg->platform != PLATFORM_PSERIES_LPAR)
>  +			cpu->no_control=1;
>  +
>   		register_cpu(c, cpu, parent);
>
>   		register_cpu_pmc(&c->sysdev);
>

The ppc64 part doesn't compile - `cpu' is an integer.

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





More information about the Linuxppc64-dev mailing list