Re: [Linux-ia64] Proc num on an MP plateform

David Mosberger
2001-09-04T17:09:03Z

>>>>> On Tue, 04 Sep 2001 15:01:28 +0200, gerard <gerard@mylos.grenoble.hp.com> said:

Gerard> Hi I am working on a MP system and I need to know on which
Gerard> proc num I am running, is there a macro/function call to do
Gerard> this?(kernel mode).

Depends on what number you want. If you want the SAPIC id,
ia64_get_lid() is the way to go. If you just want a unique number,
you can use smp_processor_id(). If you want a number in the range
from 0..smp_num_cpus-1, you can use cpu_number_map(smp_processor_id()).

--david