Skip to contentSkip to conversation

linux/x86-64: adjustments to match i386 behavior

PATCH New Jan Beulich 1 participant 1 message Sep 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux/x86-64: adjustments to match i386 behavior

On i386 the corresponding code is inside X86_HT conditionals, and this config variable is unconditionally off for X86_XEN.

arch/x86_64/kernel/setup-xen.c +4 -4
@@ -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 = smp_processor_id();
@@ -1162,7 +1162,7 @@ static void __init init_amd(struct cpuin
 
 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;
 
@@ -1347,7 +1347,7 @@ void __cpuinit early_identify_cpu(struct
 		c->x86 = 4;
 	}
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
 	c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff;
 #endif
 }
@@ -1555,7 +1555,7 @@ static int show_cpuinfo(struct seq_file 
 	if (c->x86_cache_size >= 0) 
 		seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 	
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
 	if (smp_num_siblings * c->x86_max_cores > 1) {
 		int cpu = c - cpu_data;
 		seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
include/asm-x86_64/topology.h +1 -1
@@ -54,7 +54,7 @@ extern int __node_distance(int, int);
 
 #endif
 
-#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])

On i386 the corresponding code is inside X86_HT conditionals, and this config variable is unconditionally off for X86_XEN.

arch/x86_64/kernel/setup-xen.c +4 -4
@@ -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 = smp_processor_id();
@@ -1162,7 +1162,7 @@ static void __init init_amd(struct cpuin
 
 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;
 
@@ -1347,7 +1347,7 @@ void __cpuinit early_identify_cpu(struct
 		c->x86 = 4;
 	}
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
 	c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff;
 #endif
 }
@@ -1555,7 +1555,7 @@ static int show_cpuinfo(struct seq_file 
 	if (c->x86_cache_size >= 0) 
 		seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 	
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
 	if (smp_num_siblings * c->x86_max_cores > 1) {
 		int cpu = c - cpu_data;
 		seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
include/asm-x86_64/topology.h +1 -1
@@ -54,7 +54,7 @@ extern int __node_distance(int, int);
 
 #endif
 
-#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])

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel