ACPI: Use cpu_physical_id() instead oif arch_cpu_to_apicid

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Len Brown <len.brown@...>
Cc: <linux-kernel@...>, <travis@...>, <ak@...>
Date: Friday, July 13, 2007 - 2:09 am

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>

---
 drivers/acpi/processor_core.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Index: linux-2.6.22-rc6-mm1/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/drivers/acpi/processor_core.c	2007-07-12 23:02:11.000000000 -0700
+++ linux-2.6.22-rc6-mm1/drivers/acpi/processor_core.c	2007-07-12 23:03:37.000000000 -0700
@@ -417,12 +417,6 @@ static int map_lsapic_id(struct acpi_sub
 	return 0;
 }
 
-#ifdef CONFIG_IA64
-#define arch_cpu_to_apicid 	ia64_cpu_to_sapicid
-#else
-#define arch_cpu_to_apicid 	x86_cpu_to_apicid
-#endif
-
 static int map_madt_entry(u32 acpi_id)
 {
 	unsigned long madt_end, entry;
@@ -496,7 +490,7 @@ static int get_cpu_id(acpi_handle handle
 		return apic_id;
 
 	for (i = 0; i < NR_CPUS; ++i) {
-		if (arch_cpu_to_apicid[i] == apic_id)
+		if (cpu_physical_id(i) == apic_id)
 			return i;
 	}
 	return -1;
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ACPI: Use cpu_physical_id() instead oif arch_cpu_to_apicid, Christoph Lameter, (Fri Jul 13, 2:09 am)