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-changelog

[Xen-changelog] [linux-2.6.18-xen] acpi: fix processor handling in prese

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] acpi: fix processor handling in presence of external control
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Sep 2008 15:10:09 -0700
Delivery-date: Mon, 22 Sep 2008 15:11:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] acpi: fix processor handling in presence of external control, Xen patchbot-linux-2.6.18-xen <=