From: Rusty Russell Date: Wed, 31 Dec 2008 23:42:14 +0000 (+1030) Subject: percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r X-Git-Tag: v2.6.29-rc1~521^2~11^2~29 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9e2f913df70b378379a358a44e7d286f7b765e8e;p=linux-2.6-omap-h63xx.git percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r Impact: CPU iterator bugfixes Percpu areas are only allocated for possible cpus. In general, you shouldn't access random cpu's percpu areas. Signed-off-by: Rusty Russell Signed-off-by: Mike Travis Acked-by: Ingo Molnar Acked-by: Hirokazu Takata --- diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 0f06b3722e9..2547d6c4a82 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -592,7 +592,7 @@ int setup_profiling_timer(unsigned int multiplier) * accounting. At that time they also adjust their APIC timers * accordingly. */ - for (i = 0; i < NR_CPUS; ++i) + for_each_possible_cpu(i) per_cpu(prof_multiplier, i) = multiplier; return 0;