Subject: [withdrawn] drivers-base-cpuc-fix-maxcpus-boot-option.patch removed
from -mm tree
To:
[email protected],[email protected],[email protected],[email protected]
From: [email protected]
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 <[email protected]>
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
[[email protected]: fix CONFIG_SMP=n build]
Signed-off-by: Youquan Song <[email protected]>
Cc: Greg KH <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
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 [email protected] are
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html