From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] linux/x86-64: adjustments to match i386 behavior Date: Thu, 30 Sep 2010 14:33:05 +0100 Message-ID: <4CA4ADB10200007800019C87@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part90BD7581.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. --=__Part90BD7581.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On i386 the corresponding code is inside X86_HT conditionals, and this config variable is unconditionally off for X86_XEN. Signed-off-by: Jan Beulich --- a/arch/x86_64/kernel/setup-xen.c +++ b/arch/x86_64/kernel/setup-xen.c @@ -1048,7 +1048,7 @@ static int nearby_node(int apicid) */ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) { -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && !defined(CONFIG_XEN) unsigned bits; #ifdef CONFIG_NUMA int cpu =3D smp_processor_id(); @@ -1162,7 +1162,7 @@ static void __init init_amd(struct cpuin =20 static void __cpuinit detect_ht(struct cpuinfo_x86 *c) { -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && !defined(CONFIG_XEN) u32 eax, ebx, ecx, edx; int index_msb, core_bits; =20 @@ -1347,7 +1347,7 @@ void __cpuinit early_identify_cpu(struct c->x86 =3D 4; } =20 -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && !defined(CONFIG_XEN) c->phys_proc_id =3D (cpuid_ebx(1) >> 24) & 0xff; #endif } @@ -1555,7 +1555,7 @@ static int show_cpuinfo(struct seq_file=20 if (c->x86_cache_size >=3D 0)=20 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); =09 -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && !defined(CONFIG_XEN) if (smp_num_siblings * c->x86_max_cores > 1) { int cpu =3D c - cpu_data; seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h @@ -54,7 +54,7 @@ extern int __node_distance(int, int); =20 #endif =20 -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && !defined(CONFIG_XEN) #define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id= ) #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id)= #define topology_core_siblings(cpu) (cpu_core_map[cpu]) --=__Part90BD7581.0__= Content-Type: text/plain; name="xen-x86_64-no-topology.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-x86_64-no-topology.patch" On i386 the corresponding code is inside X86_HT conditionals, and = this=0Aconfig variable is unconditionally off for X86_XEN.=0A=0ASigned-off-= by: Jan Beulich =0A=0A--- a/arch/x86_64/kernel/setup-x= en.c=0A+++ b/arch/x86_64/kernel/setup-xen.c=0A@@ -1048,7 +1048,7 @@ static = int nearby_node(int apicid)=0A */=0A static void __init amd_detect_cmp(str= uct cpuinfo_x86 *c)=0A {=0A-#ifdef CONFIG_SMP=0A+#if defined(CONFIG_SMP) = && !defined(CONFIG_XEN)=0A unsigned bits;=0A #ifdef CONFIG_NUMA=0A = int cpu =3D smp_processor_id();=0A@@ -1162,7 +1162,7 @@ static void __init = init_amd(struct cpuin=0A =0A static void __cpuinit detect_ht(struct = cpuinfo_x86 *c)=0A {=0A-#ifdef CONFIG_SMP=0A+#if defined(CONFIG_SMP) && = !defined(CONFIG_XEN)=0A u32 eax, ebx, ecx, edx;=0A int = index_msb, core_bits;=0A =0A@@ -1347,7 +1347,7 @@ void __cpuinit early_iden= tify_cpu(struct=0A c->x86 =3D 4;=0A }=0A =0A-#ifdef = CONFIG_SMP=0A+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)=0A = c->phys_proc_id =3D (cpuid_ebx(1) >> 24) & 0xff;=0A #endif=0A }=0A@@ = -1555,7 +1555,7 @@ static int show_cpuinfo(struct seq_file =0A if = (c->x86_cache_size >=3D 0) =0A seq_printf(m, "cache size\t: %d = KB\n", c->x86_cache_size);=0A =0A-#ifdef CONFIG_SMP=0A+#if defined(CONFIG= _SMP) && !defined(CONFIG_XEN)=0A if (smp_num_siblings * c->x86_max_c= ores > 1) {=0A int cpu =3D c - cpu_data;=0A seq_printf(= m, "physical id\t: %d\n", c->phys_proc_id);=0A--- a/include/asm-x86_64/topo= logy.h=0A+++ b/include/asm-x86_64/topology.h=0A@@ -54,7 +54,7 @@ extern = int __node_distance(int, int);=0A =0A #endif=0A =0A-#ifdef CONFIG_SMP=0A+#i= f defined(CONFIG_SMP) && !defined(CONFIG_XEN)=0A #define topology_physical_= package_id(cpu) (cpu_data[cpu].phys_proc_id)=0A #define topology_core_id(cp= u) (cpu_data[cpu].cpu_core_id)=0A #define topology_cor= e_siblings(cpu) (cpu_core_map[cpu])=0A --=__Part90BD7581.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 --=__Part90BD7581.0__=--