Re: smp_processor_id()?

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Sun, 6 Dec 1998 20:17:03 +0100 (CET)


On Sat, 5 Dec 1998, Paul Rusty Russell wrote:

> You mean that smp_processor_id() returns 0 and 4?
>
> I assumed smp_processor_id() < smp_num_cpus: SMP hackers, is this
> false?
>
> If so, I have to find a new upper bound for smp_processor_id() for
> SMP, or rewrite much of ip_fw.c...

valid values are:

smp_num_cpus: 0,1...NR_CPUS
smp_processor_id(): 0,1,...smp_num_cpus [consecutive]

the thing returned in /proc/cpuinfo is the 'physical' (APIC) number of the
CPU, which does not have to be consecutive. (but you should not be worried
about physical numbering, it shows up basically nowhere)

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/