WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] [PATCH][DOM0] Export apic_id for acpi_processor object
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 12 Nov 2009 23:39:38 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 12 Nov 2009 07:40:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpjrlgGVZ0WbQaTRLy10rhyt5j8Hg==
Thread-topic: [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
<Prev in Thread] Current Thread [Next in Thread>