From: William Lee Irwin III Sorry about that, late night brain fog. This corrects the version of next_cpu() that had the problem to begin with and restores the just- fine version in cpumask_arith.h to its proper place (YTF didn't I changelog the next_cpu() change?): include/asm-generic/cpumask_arith.h | 2 +- include/asm-generic/cpumask_array.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN include/asm-generic/cpumask_arith.h~next_cpu-fix include/asm-generic/cpumask_arith.h --- 25/include/asm-generic/cpumask_arith.h~next_cpu-fix 2003-08-05 12:25:20.000000000 -0700 +++ 25-akpm/include/asm-generic/cpumask_arith.h 2003-08-05 12:25:20.000000000 -0700 @@ -42,6 +42,6 @@ #define first_cpu(map) __ffs(map) #define next_cpu(cpu, map) \ - __ffs((map) & ~(((cpumask_t)1 << ((cpu) + 1)) - 1)) + __ffs((map) & ~(((cpumask_t)1 << (cpu)) - 1)) #endif /* __ASM_GENERIC_CPUMASK_ARITH_H */ diff -puN include/asm-generic/cpumask_array.h~next_cpu-fix include/asm-generic/cpumask_array.h --- 25/include/asm-generic/cpumask_array.h~next_cpu-fix 2003-08-05 12:25:20.000000000 -0700 +++ 25-akpm/include/asm-generic/cpumask_array.h 2003-08-05 12:25:20.000000000 -0700 @@ -18,7 +18,7 @@ #define cpus_shift_right(d, s, n) bitmap_shift_right((d).mask, (s).mask, n, NR_CPUS) #define cpus_shift_left(d, s, n) bitmap_shift_left((d).mask, (s).mask, n, NR_CPUS) #define first_cpu(map) find_first_bit((map).mask, NR_CPUS) -#define next_cpu(cpu, map) find_next_bit((map).mask, NR_CPUS, cpu) +#define next_cpu(cpu, map) find_next_bit((map).mask, NR_CPUS, cpu + 1) /* only ever use this for things that are _never_ used on large boxen */ #define cpus_coerce(map) ((map).mask[0]) _