# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1222095316 -3600
# Node ID 37802a5c9f538daa09701af633231b104707f531
# Parent 5f3c40a4c21491b311b9837c0990ff833d4bf62b
acpi: fix processor handling in presence of external control
- avoid leaking stuff in acpi_processor_remove()
- remove a pointless change to native code in acpi_processor_hotplug()
(struct acpi_processor's id field is unsigned)
- don't set up processor_extcntl_ops when nothing controlled by Xen
(thus processor_cntl_external() will always return false, allowing
ACPI code to retain native behavior)
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
arch/i386/kernel/acpi/processor_extcntl_xen.c | 2 ++
drivers/acpi/pci_link.c | 2 +-
drivers/acpi/processor_core.c | 7 +------
3 files changed, 4 insertions(+), 7 deletions(-)
diff -r 5f3c40a4c214 -r 37802a5c9f53
arch/i386/kernel/acpi/processor_extcntl_xen.c
--- a/arch/i386/kernel/acpi/processor_extcntl_xen.c Thu Sep 18 10:44:15
2008 +0100
+++ b/arch/i386/kernel/acpi/processor_extcntl_xen.c Mon Sep 22 15:55:16
2008 +0100
@@ -233,6 +233,8 @@ void arch_acpi_processor_init_extcntl(co
{
unsigned int pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8;
+ if (!pmbits)
+ return;
if (pmbits & XEN_PROCESSOR_PM_CX)
xen_extcntl_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier;
if (pmbits & XEN_PROCESSOR_PM_PX)
diff -r 5f3c40a4c214 -r 37802a5c9f53 drivers/acpi/pci_link.c
--- a/drivers/acpi/pci_link.c Thu Sep 18 10:44:15 2008 +0100
+++ b/drivers/acpi/pci_link.c Mon Sep 22 15:55:16 2008 +0100
@@ -762,7 +762,7 @@ static int acpi_pci_link_add(struct acpi
end:
/* disable all links -- to be activated on use */
- acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL);
+ //acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL);
mutex_unlock(&acpi_link_lock);
if (result)
diff -r 5f3c40a4c214 -r 37802a5c9f53 drivers/acpi/processor_core.c
--- a/drivers/acpi/processor_core.c Thu Sep 18 10:44:15 2008 +0100
+++ b/drivers/acpi/processor_core.c Mon Sep 22 15:55:16 2008 +0100
@@ -664,7 +664,7 @@ static int acpi_processor_remove(struct
pr = (struct acpi_processor *)acpi_driver_data(device);
- if (pr->id >= NR_CPUS) {
+ if (!processor_cntl_external() && pr->id >= NR_CPUS) {
kfree(pr);
return 0;
}
@@ -816,12 +816,7 @@ acpi_processor_hotplug_notify(acpi_handl
return;
}
-#ifdef CONFIG_XEN
- if ((pr->id >= 0) && (pr->id < NR_CPUS)
- && (cpu_present(pr->id)))
-#else
if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
-#endif /* CONFIG_XEN */
kobject_uevent(&device->kobj, KOBJ_OFFLINE);
if (processor_cntl_external())
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|