Skip to contentSkip to conversation

> 256 CPU cpumask build fix - const confusion

PATCH New Paul Jackson 1 participant 1 message Nov 5, 2003 Bitmap API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 > 256 CPU cpumask build fix - const confusion

Please apply the following patch. It's needed to build NR_CPUS > 256.

Without this fix, you get compile errors:
include/linux/cpumask.h: In function `next_online_cpu':
include/linux/cpumask.h:56: structure has no member named `val'

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1357 -> 1.1358
# include/linux/cpumask.h 1.1 -> 1.2
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/04 [email protected] 1.1358
# Fix cpumask const confusion if NR_CPUS > 128 (i386) or > 256 (ia64). # --------------------------------------------
#

include/linux/cpumask.h +4 -4
diff -Nru a/include/linux/cpumask.h b/include/linux/cpumask.h
@@ -53,18 +53,18 @@
 static inline int next_online_cpu(int cpu, cpumask_t map)
 {
 	do
-		cpu = next_cpu_const(cpu, map);
+		cpu = next_cpu_const(cpu, mk_cpumask_const(map));
 	while (cpu < NR_CPUS && !cpu_online(cpu));
 	return cpu;
 }
 
 #define for_each_cpu(cpu, map)						\
-	for (cpu = first_cpu_const(map);				\
+	for (cpu = first_cpu_const(mk_cpumask_const(map));		\
 		cpu < NR_CPUS;						\
-		cpu = next_cpu_const(cpu,map))
+		cpu = next_cpu_const(cpu,mk_cpumask_const(map)))
 
 #define for_each_online_cpu(cpu, map)					\
-	for (cpu = first_cpu_const(map);				\
+	for (cpu = first_cpu_const(mk_cpumask_const(map));		\
 		cpu < NR_CPUS;						\
 		cpu = next_online_cpu(cpu,map))
 
Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373