aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_core.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2007-10-19 14:35:03 -0400
committerThomas Gleixner <tglx@linutronix.de>2007-10-19 14:35:03 -0400
commit71b31233a215be27e2efbcc0e739cbebb0bde078 (patch)
tree3143e0964ab6a439dc5cc0aac24557828ba51c11 /drivers/acpi/processor_core.c
parentb6278470b7cdbf2bf6ba7345130d83924451a51a (diff)
x86: acpi use cpu_physical_id
This is from an earlier message from Christoph Lameter: processor_core.c currently tries to determine the apicid by special casing for IA64 and x86. The desired information is readily available via cpu_physical_id() on IA64, i386 and x86_64. Signed-off-by: Christoph Lameter <clameter@sgi.com> Additionally, boot_cpu_id needed to be exported to fix compile errors in dma code when !CONFIG_SMP. Signed-off-by: Mike Travis <travis@sgi.com> Cc: Andi Kleen <ak@suse.de> Cc: Christoph Lameter <clameter@sgi.com> Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/acpi/processor_core.c')
-rw-r--r--drivers/acpi/processor_core.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 9f11dc296cd..fd48110f084 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -421,12 +421,6 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
421 return 0; 421 return 0;
422} 422}
423 423
424#ifdef CONFIG_IA64
425#define arch_cpu_to_apicid ia64_cpu_to_sapicid
426#else
427#define arch_cpu_to_apicid x86_cpu_to_apicid
428#endif
429
430static int map_madt_entry(u32 acpi_id) 424static int map_madt_entry(u32 acpi_id)
431{ 425{
432 unsigned long madt_end, entry; 426 unsigned long madt_end, entry;
@@ -500,7 +494,7 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id)
500 return apic_id; 494 return apic_id;
501 495
502 for (i = 0; i < NR_CPUS; ++i) { 496 for (i = 0; i < NR_CPUS; ++i) {
503 if (arch_cpu_to_apicid[i] == apic_id) 497 if (cpu_physical_id(i) == apic_id)
504 return i; 498 return i;
505 } 499 }
506 return -1; 500 return -1;