Re: smp_processor_id()?

David S. Miller (
Sun, 6 Dec 1998 02:22:43 -0800

From: Paul Rusty Russell <>
Date: Sat, 05 Dec 1998 16:28:10 +1130

You mean that smp_processor_id() returns 0 and 4?

I assumed smp_processor_id() < smp_num_cpus: SMP hackers, is this

smp_processor_id() is the hardware cpu number, it can be anything.
Such numbers are not guarenteed to be contiguous/ordered/etc.

If so, I have to find a new upper bound for smp_processor_id() for
SMP, or rewrite much of ip_fw.c...

Why? Just do what the scheduler does, by using asking
cpu_number_map[smp_processor_id()], that returns the kind of number
you believed smp_processor_id() to be. (grep for "idle_task" in

David S. Miller

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at