generic-ipi: fix backtrace in smp_call_function_any()
PATCH 1/1 generic-ipi: fix backtrace in smp_call_function_any()
On my westmere box, I see this backtrace with 2.6.33-rc kernels:
Quoted 11 lines
cpumask_of_node(3): node >nr_node_ids(1)
Pid: 1, comm: swapper Not tainted 2.6.33-rc3-00097-g2c1f189 #223Call 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
fix it by using the cpu_to_node() and using the node number instead of the cpu for cpumask_of_node().
---
kernel/smp.c +1 -1
@@ -347,7 +347,7 @@ int smp_call_function_any(const struct cpumask *mask, goto call;/* Try for same node. */ - nodemask =cpumask_of_node (cpu); + nodemask =cpumask_of_node (cpu_to_node (cpu));for (cpu =cpumask_first_and (nodemask, mask); cpu < nr_cpu_ids; cpu =cpumask_next_and (cpu, nodemask, mask)) {if (cpu_online (cpu))
Quoted 14 lines · Suresh Siddha
On my westmere box, I see this backtrace with 2.6.33-rc kernels:
Quoted 11 lines
cpumask_of_node(3): node >nr_node_ids(1)
Pid: 1, comm: swapper Not tainted 2.6.33-rc3-00097-g2c1f189 #223Call 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
Quoted 4 lines
fix it by using the
cpu_to_node()and using the node number instead of the cpu forcpumask_of_node().Signed-off-by Suresh Siddha <[email protected]>
Hi Suresh,
I have already sent a patch for this:
http://www.gossamer-threads.com/lists/linux/kernel/1173978?do=post_view_threaded
Can you ACK that instead?
Regards,
David.