mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.5.61: x86_64 num_online_cpus() buglet?
@ 2003-02-17 17:51 Mikael Pettersson
  2003-02-18  6:31 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2003-02-17 17:51 UTC (permalink / raw)
  To: ak; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-18  6:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 17:51 2.5.61: x86_64 num_online_cpus() buglet? Mikael Pettersson
2003-02-18  6:31 ` Andi Kleen
2003-02-18  7:27   ` David S. Miller

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®