From: "Jan Beulich" Subject: [PATCH] initialize some more cpuinfo fields Date: Mon, 08 May 2006 15:10:08 +0200 Message-ID: <445F5F50.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part10350620.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 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part10350620.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Namely preventing systems to look like single-socket ones with many cores (because all CPUs show physical ID being zero). Signed-off-by: Jan Beulich --=__Part10350620.0__= Content-Type: text/plain; name="xenlinux-identify-all-cpus.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xenlinux-identify-all-cpus.patch" Index: head-2006-05-03/drivers/xen/core/smpboot.c =================================================================== --- head-2006-05-03.orig/drivers/xen/core/smpboot.c 2006-04-24 11:43:44.000000000 +0200 +++ head-2006-05-03/drivers/xen/core/smpboot.c 2006-05-08 14:08:25.000000000 +0200 @@ -148,9 +148,23 @@ static void xen_smp_intr_exit(unsigned i static void cpu_bringup(void) { + unsigned cpu; + struct cpuinfo_x86 *c; + cpu_init(); touch_softlockup_watchdog(); preempt_disable(); + + cpu = smp_processor_id(); + c = cpu_data + cpu; + *c = boot_cpu_data; + identify_cpu(c); + /* We fake a single-core, single-thread configuration, short of + knowing the real setup. c->booted_cores is always 1 (inherited + from boot_cpu_data). */ + phys_proc_id[cpu] = cpu; + print_cpu_info(c); + local_irq_enable(); cpu_idle(); } @@ -230,6 +244,7 @@ void __init smp_prepare_cpus(unsigned in struct Xgt_desc_struct *gdt_descr; #endif + boot_cpu_data.booted_cores = 1; cpu_data[0] = boot_cpu_data; cpu_2_logical_apicid[0] = 0; --=__Part10350620.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 --=__Part10350620.0__=--