[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH][DOM0] Export apic_id for acpi_processor object



Change the acpi code to export apic_id for the acpi_processor object

From: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>


---

 drivers/acpi/processor_core.c |   16 ++++++++++++++++
 include/linux/acpi.h          |    1 +
 2 files changed, 17 insertions(+), 0 deletions(-)


diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 98010d5..a448ba6 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -411,6 +411,11 @@ static int acpi_processor_remove_fs(struct acpi_device 
*device)
 
 #ifndef CONFIG_SMP
 static int get_cpu_id(acpi_handle handle, int type, u32 acpi_id) { return -1; }
+int get_apic_id(acpi_handle handle, int type, u32 acpi_id)
+{
+       return -1;
+}
+EXPORT_SYMBOL_GPL(get_apic_id);
 #else
 
 static struct acpi_table_madt *madt;
@@ -561,6 +566,17 @@ static int get_cpu_id(acpi_handle handle, int type, u32 
acpi_id)
        }
        return -1;
 }
+
+int get_apic_id(acpi_handle handle, int type, u32 acpi_id)
+{
+       int apic_id = -1;
+
+       apic_id = map_mat_entry(handle, type, acpi_id);
+       if (apic_id == -1)
+               apic_id = map_madt_entry(type, acpi_id);
+       return apic_id;
+}
+EXPORT_SYMBOL_GPL(get_apic_id);
 #endif
 
 /* --------------------------------------------------------------------------
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 34321cf..e414fcc 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -85,6 +85,7 @@ int acpi_boot_init (void);
 int acpi_boot_table_init (void);
 int acpi_mps_check (void);
 int acpi_numa_init (void);
+int get_apic_id(acpi_handle handle, int type, u32 acpi_id);
 
 int acpi_table_init (void);
 int acpi_table_parse (char *id, acpi_table_handler handler);

Attachment: 02-export_apicid.patch
Description: 02-export_apicid.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.