/* Initialize the logical CPU number to SAPICID mapping  */
void __init smp_build_cpu_map(void)
/* Initialize the logical CPU number to SAPICID mapping  */
void __init smp_build_cpu_map(void)
{
	int sapicid, cpu, i;
	int boot_cpu_id = hard_smp_processor_id();
	for (cpu = 0; cpu < NR_CPUS; cpu++) {
		ia64_cpu_to_sapicid[cpu] = -1;
	}
	ia64_cpu_to_sapicid[0] = boot_cpu_id;
	cpus_clear(cpu_present_map);
	set_cpu_present(0, true);
	set_cpu_possible(0, true);
	for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) {
		sapicid = smp_boot_data.cpu_phys_id[i];
		if (sapicid == boot_cpu_id)
			continue;
		set_cpu_present(cpu, true);
		set_cpu_possible(cpu, true);
		ia64_cpu_to_sapicid[cpu] = sapicid;
		cpu++;
	}
}