Commit af2422c42c0ff42b8b93dbb3a5fe65250fb65c40
Committed by
Linus Torvalds
1 parent
cc8ef6eb21
Exists in
master
and in
4 other branches
smp_call_function_any(): pass the node value to cpumask_of_node()
The change in acpi_cpufreq to use smp_call_function_any causes a warning when it is called since the function erroneously passes the cpu id to cpumask_of_node rather than the node that the cpu is on. Fix this. cpumask_of_node(3): node > nr_node_ids(1) Pid: 1, comm: swapper Not tainted 2.6.33-rc3-00097-g2c1f189 #223 Call Trace: [<ffffffff81028bb3>] cpumask_of_node+0x23/0x58 [<ffffffff81061f51>] smp_call_function_any+0x65/0xfa [<ffffffff810160d1>] ? do_drv_read+0x0/0x2f [<ffffffff81015fba>] get_cur_val+0xb0/0x102 [<ffffffff81016080>] get_cur_freq_on_cpu+0x74/0xc5 [<ffffffff810168a7>] acpi_cpufreq_cpu_init+0x417/0x515 [<ffffffff81562ce9>] ? __down_write+0xb/0xd [<ffffffff8148055e>] cpufreq_add_dev+0x278/0x922 Signed-off-by: David John <davidjon@xenontk.org> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
kernel/smp.c
... | ... | @@ -347,7 +347,7 @@ |
347 | 347 | goto call; |
348 | 348 | |
349 | 349 | /* Try for same node. */ |
350 | - nodemask = cpumask_of_node(cpu); | |
350 | + nodemask = cpumask_of_node(cpu_to_node(cpu)); | |
351 | 351 | for (cpu = cpumask_first_and(nodemask, mask); cpu < nr_cpu_ids; |
352 | 352 | cpu = cpumask_next_and(cpu, nodemask, mask)) { |
353 | 353 | if (cpu_online(cpu)) |