From: Mikael Pettersson <mikpe@csd.uu.se>
To: ak@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: 2.5.61: x86_64 num_online_cpus() buglet?
Date: Mon, 17 Feb 2003 18:51:12 +0100 (MET) [thread overview]
Message-ID: <200302171751.SAA19069@kim.it.uu.se> (raw)
Andi,
Kernel 2.5.61's include/asm-x86_64/smp.h contains:
extern unsigned long cpu_online_map;
...
extern inline unsigned int num_online_cpus(void)
{
return hweight32(cpu_online_map);
}
and similarly for cpu_callout_map.
hweight32() truncates a 64-bit operand to 32-bits, so either
- the maps should be int rather than long, or
- x86_64 needs to define and use a new hweight64(), or
- CONFIG_NR_CPUS must not exceed 32 on x86_64.
Comments?
/Mikael
next reply other threads:[~2003-02-17 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-17 17:51 Mikael Pettersson [this message]
2003-02-18 6:31 ` Andi Kleen
2003-02-18 7:27 ` David S. Miller
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=200302171751.SAA19069@kim.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®