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] Add config check for cpu hotplug code

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] [PATCH] Add config check for cpu hotplug code
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 10 Dec 2009 12:14:59 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 09 Dec 2009 20:17:20 -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: Acp5T1ZMmj5tjqXrRoek7MsVcW3TsA==
Thread-topic: [PATCH] Add config check for cpu hotplug code
For acpi_parser branch.

Add CONFIG check to xen_get_apic_id() and xen_hotplug_notifier().

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

diff --git a/drivers/xen/acpi_processor.c b/drivers/xen/acpi_processor.c
index 6e6d465..d6b3bc8 100644
--- a/drivers/xen/acpi_processor.c
+++ b/drivers/xen/acpi_processor.c
@@ -94,6 +94,7 @@ int processor_cntl_xen_pmthr(void)
 }
 EXPORT_SYMBOL(processor_cntl_xen_pmthr);
 
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
 static int xen_get_apic_id(acpi_handle handle)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -129,6 +130,12 @@ static int xen_get_apic_id(acpi_handle handle)
 
        return physid;
 }
+#else
+static int xen_get_apic_id(acpi_handle handle)
+{
+       return -1;
+}
+#endif
 
 int processor_cntl_xen_notify(struct acpi_processor *pr, int event, int type)
 {
@@ -354,6 +361,7 @@ static int xen_tx_notifier(struct acpi_processor *pr, int 
action)
        return -EINVAL;
 }
 
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
 static int xen_hotplug_notifier(struct acpi_processor *pr, int event)
 {
        int ret = -EINVAL;
@@ -396,6 +404,12 @@ static int xen_hotplug_notifier(struct acpi_processor *pr, 
int event)
 
        return ret;
 }
+#else
+static int xen_hotplug_notifier(struct acpi_processor *pr, int event)
+{
+       return -ENOSYS;
+}
+#endif
 
 static int __init xen_acpi_processor_extcntl_init(void)
 {


Attachment: config_option.patch
Description: config_option.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>