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] linux: make Xen cpufreq handling also

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux: make Xen cpufreq handling also work without _PSD objects
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 Sep 2008 12:40:22 -0700
Delivery-date: Mon, 08 Sep 2008 12:41:00 -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 1220878933 -3600
# Node ID e86f9e05144afb5d122f264494881408fb225cdb
# Parent  7886619f623ef822f02d38af8a948792d4d90121
linux: make Xen cpufreq handling also work without _PSD objects

_PSD objects are optional according to the ACPI spec.

Also eliminate a pointless static variable.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/acpi/processor_extcntl_xen.c |   12 +++++-------
 drivers/acpi/processor_extcntl.c              |   17 +++++++++++++----
 2 files changed, 18 insertions(+), 11 deletions(-)

diff -r 7886619f623e -r e86f9e05144a 
arch/i386/kernel/acpi/processor_extcntl_xen.c
--- a/arch/i386/kernel/acpi/processor_extcntl_xen.c     Mon Sep 08 13:13:35 
2008 +0100
+++ b/arch/i386/kernel/acpi/processor_extcntl_xen.c     Mon Sep 08 14:02:13 
2008 +0100
@@ -31,8 +31,6 @@
 #include <linux/cpufreq.h>
 #include <acpi/processor.h>
 #include <asm/hypercall.h>
-
-static int xen_processor_pmbits;
 
 static int xen_cx_notifier(struct acpi_processor *pr, int action)
 {
@@ -215,13 +213,13 @@ static struct processor_extcntl_ops xen_
 
 void arch_acpi_processor_init_extcntl(const struct processor_extcntl_ops **ops)
 {
-       xen_processor_pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8;
-
-       if (xen_processor_pmbits & XEN_PROCESSOR_PM_CX)
+       unsigned int pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8;
+
+       if (pmbits & XEN_PROCESSOR_PM_CX)
                xen_extcntl_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier;
-       if (xen_processor_pmbits & XEN_PROCESSOR_PM_PX)
+       if (pmbits & XEN_PROCESSOR_PM_PX)
                xen_extcntl_ops.pm_ops[PM_TYPE_PERF] = xen_px_notifier;
-       if (xen_processor_pmbits & XEN_PROCESSOR_PM_TX)
+       if (pmbits & XEN_PROCESSOR_PM_TX)
                xen_extcntl_ops.pm_ops[PM_TYPE_THR] = xen_tx_notifier;
 
        *ops = &xen_extcntl_ops;
diff -r 7886619f623e -r e86f9e05144a drivers/acpi/processor_extcntl.c
--- a/drivers/acpi/processor_extcntl.c  Mon Sep 08 13:13:35 2008 +0100
+++ b/drivers/acpi/processor_extcntl.c  Mon Sep 08 14:02:13 2008 +0100
@@ -203,13 +203,22 @@ static int processor_extcntl_get_perform
         * processor objects to external logic. In this case, it's preferred
         * to use ACPI ID instead.
         */
-       pr->performance->domain_info.num_processors = 0;
+       pdomain = &pr->performance->domain_info;
+       pdomain->num_processors = 0;
        ret = acpi_processor_get_psd(pr);
-       if (ret < 0)
-               goto err_out;
+       if (ret < 0) {
+               /*
+                * _PSD is optional - assume no coordination if absent (or
+                * broken), matching native kernels' behavior.
+                */
+               pdomain->num_entries = ACPI_PSD_REV0_ENTRIES;
+               pdomain->revision = ACPI_PSD_REV0_REVISION;
+               pdomain->domain = pr->acpi_id;
+               pdomain->coord_type = DOMAIN_COORD_TYPE_SW_ALL;
+               pdomain->num_processors = 1;
+       }
 
        /* Some sanity check */
-       pdomain = &pr->performance->domain_info;
        if ((pdomain->revision != ACPI_PSD_REV0_REVISION) ||
            (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) ||
            ((pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ALL) &&

_______________________________________________
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] linux: make Xen cpufreq handling also work without _PSD objects, Xen patchbot-linux-2.6.18-xen <=