Skip to contentSkip to conversation

percpu: fix percpu accessors to potentially !cpu_possible() cpus: x86 voyager

PATCH In review Rusty Russell 1 participant 1 message Nov 21, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 percpu: fix percpu accessors to potentially !cpu_possible() cpus: x86 voyager

Impact: CPU iterator bugfixes

Percpu areas are only allocated for possible cpus. In general, you shouldn't access random cpu's percpu areas.

---
 arch/x86/mach-voyager/voyager_smp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mach-voyager/voyager_smp.c +1 -1
@@ -1223,7 +1223,7 @@ int setup_profiling_timer(unsigned int m
 	 * new values until the next timer interrupt in which they do process
 	 * accounting.
 	 */
-	for (i = 0; i < NR_CPUS; ++i)
+	for_each_possible_cpu(i)
 		per_cpu(prof_multiplier, i) = multiplier;
 
 	return 0;