 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |