Commit 7a6f81bf authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/tmp3
parents 0f7923d7 e29dbbbd
......@@ -57,7 +57,7 @@ unsigned long cpu_online_map = 0;
static struct smp_ops_t *smp_ops;
volatile unsigned int cpu_callin_map[NR_CPUS];
static volatile unsigned int cpu_callin_map[NR_CPUS];
extern unsigned char stab_array[];
......
......@@ -269,6 +269,7 @@ static __inline__ int ffs(int x)
* hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word
*/
#define hweight64(x) generic_hweight64(x)
#define hweight32(x) generic_hweight32(x)
#define hweight16(x) generic_hweight16(x)
#define hweight8(x) generic_hweight8(x)
......
......@@ -35,24 +35,23 @@ extern void smp_send_xmon_break(int cpu);
struct pt_regs;
extern void smp_message_recv(int, struct pt_regs *);
#define NO_PROC_ID 0xFF /* No processor magic marker */
#define cpu_online(cpu) test_bit((cpu), &cpu_online_map)
#define cpu_possible(cpu) paca[cpu].active
static inline int num_online_cpus(void)
static inline unsigned int num_online_cpus(void)
{
int i, nr = 0;
return hweight64(cpu_online_map);
}
for (i = 0; i < NR_CPUS; i++)
nr += test_bit(i, &cpu_online_map);
static inline int any_online_cpu(unsigned int mask)
{
if (mask & cpu_online_map)
return __ffs(mask & cpu_online_map);
return nr;
return -1;
}
extern volatile unsigned int cpu_callin_map[NR_CPUS];
#define smp_processor_id() (get_paca()->xPacaIndex)
/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment