Subject: [withdrawn] drivers-base-cpuc-fix-maxcpus-boot-option.patch removed from -mm tree To: youquan.song@xxxxxxxxx,greg@xxxxxxxxx,stable@xxxxxxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 13 Jun 2013 11:16:05 -0700 The patch titled Subject: drivers/base/cpu.c: fix maxcpus boot option has been removed from the -mm tree. Its filename was drivers-base-cpuc-fix-maxcpus-boot-option.patch This patch was dropped because it was withdrawn ------------------------------------------------------ From: Youquan Song <youquan.song@xxxxxxxxx> Subject: drivers/base/cpu.c: fix maxcpus boot option The maxcpus boot option limits the maximum number of CPUs in the system, but this option is broken in recent kernels. Though we use maxcpus to limit CPUs number, the current kernel will register all of the present CPUs in sysfs. udev will enumerate all registered cpu in sysfs, and it will bring up the CPU if the CPU is offline. So the maxcpus option is broken. This patch will only register a CPU which is not over the limit of the maxcpus option in sysfs. So it will keep the maxcpus limitation during udev enumeration or other bringup of CPUs over the limitation by methods such as echo 1 > /sys/devices/system/cpu/online [akpm@xxxxxxxxxxxxxxxxxxxx: fix CONFIG_SMP=n build] Signed-off-by: Youquan Song <youquan.song@xxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/base/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN drivers/base/cpu.c~drivers-base-cpuc-fix-maxcpus-boot-option drivers/base/cpu.c --- a/drivers/base/cpu.c~drivers-base-cpuc-fix-maxcpus-boot-option +++ a/drivers/base/cpu.c @@ -272,6 +272,12 @@ int __cpuinit register_cpu(struct cpu *c { int error; +#ifdef CONFIG_SMP + /* return when cpu number greater than maximum number of CPUs */ + if (num >= setup_max_cpus) + return 0; +#endif + cpu->node_id = cpu_to_node(num); memset(&cpu->dev, 0x00, sizeof(struct device)); cpu->dev.id = num; _ Patches currently in -mm which might be from youquan.song@xxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html