|
@@ -162,16 +162,23 @@ exit:
|
|
|
return apic_id;
|
|
|
}
|
|
|
|
|
|
-int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
|
|
|
+int acpi_get_apicid(acpi_handle handle, int type, u32 acpi_id)
|
|
|
{
|
|
|
-#ifdef CONFIG_SMP
|
|
|
- int i;
|
|
|
-#endif
|
|
|
- int apic_id = -1;
|
|
|
+ int apic_id;
|
|
|
|
|
|
apic_id = map_mat_entry(handle, type, acpi_id);
|
|
|
if (apic_id == -1)
|
|
|
apic_id = map_madt_entry(type, acpi_id);
|
|
|
+
|
|
|
+ return apic_id;
|
|
|
+}
|
|
|
+
|
|
|
+int acpi_map_cpuid(int apic_id, u32 acpi_id)
|
|
|
+{
|
|
|
+#ifdef CONFIG_SMP
|
|
|
+ int i;
|
|
|
+#endif
|
|
|
+
|
|
|
if (apic_id == -1) {
|
|
|
/*
|
|
|
* On UP processor, there is no _MAT or MADT table.
|
|
@@ -211,6 +218,15 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
|
|
|
#endif
|
|
|
return -1;
|
|
|
}
|
|
|
+
|
|
|
+int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
|
|
|
+{
|
|
|
+ int apic_id;
|
|
|
+
|
|
|
+ apic_id = acpi_get_apicid(handle, type, acpi_id);
|
|
|
+
|
|
|
+ return acpi_map_cpuid(apic_id, acpi_id);
|
|
|
+}
|
|
|
EXPORT_SYMBOL_GPL(acpi_get_cpuid);
|
|
|
|
|
|
static bool __init processor_physically_present(acpi_handle handle)
|