Skip to contentSkip to conversation

fix subarch breakage in intel_cacheinfo.c

PATCH New James Bottomley 1 participant 1 message Apr 2, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix subarch breakage in intel_cacheinfo.c

Not all x86 subarchitectures have support for hyperthreading, so every piece you add for it has to be predicated on checks for CONFIG_X86_HT.

The patch corrects this hyperthreading leakage problem in intel_cacheinfo.c

===== arch/i386/kernel/cpu/intel_cacheinfo.c 1.3 vs edited =====

arch/i386/kernel/cpu/intel_cacheinfo.c +2 -0
@@ -311,8 +311,10 @@
 
 	if (num_threads_sharing == 1)
 		cpu_set(cpu, this_leaf->shared_cpu_map);
+#ifdef CONFIG_X86_HT
 	else if (num_threads_sharing == smp_num_siblings)
 		this_leaf->shared_cpu_map = cpu_sibling_map[cpu];
+#endif
 	else
 		printk(KERN_INFO "Number of CPUs sharing cache didn't match "
 				"any known set of CPUs\n");