Skip to contentSkip to conversation

mm: k8_northbridges[] build fix

PATCH New [email protected] 1 participant 1 message Feb 25, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: k8_northbridges[] build fix

k8_northbridges[] isn't a defined symbol unless arch/x86/kernel/k8.c is compiled, which is conditional on CONFIG_K8_NB. This patch resolves the link error by making the sysfs access to the k8 northbridge conditional on CONFIG_K8_NB in like fashion to the k8_northbridges[] array itself. The issue was encountered on a 32-bit build with the processor family specified as CONFIG_MCORE2=y.

The link error was introduced in
x86-conform-l3-cache-index-disable-to-linux-standards.patch

arch/x86/kernel/cpu/intel_cacheinfo.c +2 -2
Index: mmotm-2.6.29-rc6/arch/x86/kernel/cpu/intel_cacheinfo.c
===================================================================
@@ -613,7 +613,7 @@ static int __cpuinit detect_cache_attrib
 	return retval;
 }
 
-#ifdef CONFIG_SYSFS
+#if defined(CONFIG_SYSFS) && defined(CONFIG_K8_NB)
 
 #include <linux/kobject.h>
 #include <linux/sysfs.h>
@@ -986,4 +986,4 @@ static int __cpuinit cache_sysfs_init(vo
 
 device_initcall(cache_sysfs_init);
 
-#endif
+#endif /* defined(CONFIG_SYSFS) && defined(CONFIG_K8_NB) */