mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [withdrawn] drivers-base-cpuc-fix-maxcpus-boot-option.patch removed from -mm tree
@ 2013-06-13 18:16 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2013-06-13 18:16 UTC (permalink / raw)
  To: mm-commits, stable, greg, youquan.song

Subject: [withdrawn] drivers-base-cpuc-fix-maxcpus-boot-option.patch removed from -mm tree
To: youquan.song@intel.com,greg@kroah.com,stable@vger.kernel.org,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
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@intel.com>
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@linux-foundation.org: fix CONFIG_SMP=n build]
Signed-off-by: Youquan Song <youquan.song@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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@intel.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-13 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-13 18:16 [withdrawn] drivers-base-cpuc-fix-maxcpus-boot-option.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).