The kernel treats core_id==0 as special, therefore we start the indexes there at "1". The kernel treats proc_id=-1 as special, therefore we start those indexes at "0".
My problem was not with the indexing, but rather with the meaning of proc_id. It's neither the physical processor ID, nor the virtual processor ID. It's just a one-to-one mapping of the core ID. As the virtual processor ID is the same as the kernel's CPU ID, I think that proc_id should hold the physical processor ID. If not, than this information should be kept in some other field of cpu_data.
Elad -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html