From: "Jan Beulich" Subject: [PATCH] linux: don't bring up CPUs that can never be used Date: Mon, 14 Aug 2006 15:01:34 +0200 Message-ID: <44E0904E.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part86A32F3E.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__Part86A32F3E.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Without this, "nosmp" or "max_cpus=" Linux command line options are being ignored. Signed-off-by: Jan Beulich --=__Part86A32F3E.0__= Content-Type: text/plain; name="xenlinux-honor-max_cpus.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xenlinux-honor-max_cpus.patch" Index: head-2006-08-08/drivers/xen/core/smpboot.c =================================================================== --- head-2006-08-08.orig/drivers/xen/core/smpboot.c 2006-08-11 15:33:05.000000000 +0200 +++ head-2006-08-08/drivers/xen/core/smpboot.c 2006-08-11 15:34:19.000000000 +0200 @@ -253,6 +253,8 @@ void __init smp_prepare_cpus(unsigned in for_each_cpu_mask (cpu, cpu_possible_map) { if (cpu == 0) continue; + if (num_present_cpus() >= max_cpus) + break; #ifdef __x86_64__ gdt_descr = &cpu_gdt_descr[cpu]; @@ -301,7 +303,7 @@ void __init smp_prepare_cpus(unsigned in init_xenbus_allowed_cpumask(); /* Currently, Xen gives no dynamic NUMA/HT info. */ - for (cpu = 1; cpu < NR_CPUS; cpu++) { + for_each_present_cpu(cpu) { cpu_sibling_map[cpu] = cpumask_of_cpu(cpu); cpu_core_map[cpu] = cpumask_of_cpu(cpu); } --=__Part86A32F3E.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part86A32F3E.0__=--