From: hawkes@sgi.com
To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
hawkes@sgi.com, Tony Luck <tony.luck@gmail.com>
Subject: [PATCH] fix bug in sn/ia64 for sparse CPU numbering
Date: Fri, 18 Nov 2005 19:30:34 +0000 [thread overview]
Message-ID: <20051118193034.21647.22047.sendpatchset@tomahawk.engr.sgi.com> (raw)
The kernel's use of the for_each_*cpu(i) macros has allowed for sparse CPU
numbering. When I hacked the kernel to test sparse cpu_present_map[] and
cpu_possible_map[] cpumasks, I discovered one remaining spot, in
sn_hwperf_ioctl() during sn initialization, that needs to be fixed.
This is a patch against 2.6.14.
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Dean Roe <roe@sgi.com>
Index: linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c
=================================--- linux.orig/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2005-11-09 16:51:25.000000000 -0800
+++ linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2005-11-10 09:45:30.000000000 -0800
@@ -743,13 +743,14 @@
if ((r = sn_hwperf_enum_objects(&nobj, &objs)) = 0) {
memset(p, 0, a.sz);
for (i = 0; i < nobj; i++) {
+ int cpuobj_index = 0;
if (!SN_HWPERF_IS_NODE(objs + i))
continue;
node = sn_hwperf_obj_to_cnode(objs + i);
for_each_online_cpu(j) {
if (node != cpu_to_node(j))
continue;
- cpuobj = (struct sn_hwperf_object_info *) p + j;
+ cpuobj = (struct sn_hwperf_object_info *) p + cpuobj_index++;
slice = 'a' + cpuid_to_slice(j);
cdata = cpu_data(j);
cpuobj->id = j;
reply other threads:[~2005-11-18 19:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051118193034.21647.22047.sendpatchset@tomahawk.engr.sgi.com \
--to=hawkes@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@gmail.com \
/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