Skip to contentSkip to conversation

compiling 2.6.31, SMP with NR_CPUS == 1

PATCH GoatZilla 1 participant 1 message Sep 17, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

GoatZilla

author
#1 lore raw

I'm not sure if this is just me, or it's already been fixed, but in include/linux/cpumask.h, if nr_cpu_ids is defined to "1", doesn't that break init/main.c:368?

cpumask.h +3 -2
@@ -396,7 +396,9 @@
 
 #if NR_CPUS == 1
 
-#define nr_cpu_ids		1
+/*  See init/main.c:368  */
+extern int nr_cpu_ids;
+
 #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
 #define first_cpu(src)		({ (void)(src); 0; })
 #define next_cpu(n, src)	({ (void)(src); 1; })
@@ -406,7 +408,6 @@
 #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
 #else /* NR_CPUS > 1 */
 
-extern int nr_cpu_ids;
 #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
 int __first_cpu(const cpumask_t *srcp);
 int __next_cpu(int n, const cpumask_t *srcp);