From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [patch] generic-ipi: fix backtrace in smp_call_function_any()
Date: Thu, 07 Jan 2010 15:46:59 -0800 [thread overview]
Message-ID: <1262908019.2779.24.camel@sbs-t61.sc.intel.com> (raw)
On my westmere box, I see this backtrace with 2.6.33-rc kernels:
> 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
fix it by using the cpu_to_node() and using the node number instead
of the cpu for cpumask_of_node().
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
diff --git a/kernel/smp.c b/kernel/smp.c
index de735a6..f104084 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -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))
next reply other threads:[~2010-01-07 23:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 23:46 Suresh Siddha [this message]
2010-01-08 4:48 ` David John
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1262908019.2779.24.camel@sbs-t61.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome