lkml.org 
[lkml]   [2003]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.5.61: x86_64 num_online_cpus() buglet?
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.037 / U:2.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site