diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-02-10 06:57:27 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-03-02 00:50:25 -0500 |
commit | 9ff0c61d08ac4defa5ad6c65935a67643b8f4ce3 (patch) | |
tree | d37475a6aa440c0e2a37af9700818ed7fa0a3c64 | |
parent | 31116f0b7e8965ff3c2fd09ab240b7746d5556b3 (diff) |
powerpc: Mask smp_processor_id() false positive
The rtas_event_scan() function uses smp_processor_id() to select a
starting point in cpu_online_mask, and does so under the protection
of get_online_cpus(). This might not select the current processor
in any case, so switch to raw_smp_processor_id().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/kernel/rtasd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 049dbecb5dbc..7980ec0e1e1a 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
@@ -412,7 +412,8 @@ static void rtas_event_scan(struct work_struct *w) | |||
412 | 412 | ||
413 | get_online_cpus(); | 413 | get_online_cpus(); |
414 | 414 | ||
415 | cpu = cpumask_next(smp_processor_id(), cpu_online_mask); | 415 | /* raw_ OK because just using CPU as starting point. */ |
416 | cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask); | ||
416 | if (cpu >= nr_cpu_ids) { | 417 | if (cpu >= nr_cpu_ids) { |
417 | cpu = cpumask_first(cpu_online_mask); | 418 | cpu = cpumask_first(cpu_online_mask); |
418 | 419 | ||