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] [xen-unstable] x86: fix powernow

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: fix powernow
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Sep 2008 13:10:09 -0700
Delivery-date: Tue, 23 Sep 2008 13:09:58 -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 1222095372 -3600
# Node ID 415c3da25b26296335a3c6cf0511957f48dfd601
# Parent  81483e49c74c314ae3ed098c1373dfc3f2d3f31e
x86: fix powernow

... by allocating the necessary cpufreq_policy structures.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/acpi/cpufreq/powernow.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff -r 81483e49c74c -r 415c3da25b26 xen/arch/x86/acpi/cpufreq/powernow.c
--- a/xen/arch/x86/acpi/cpufreq/powernow.c      Mon Sep 22 15:50:59 2008 +0100
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c      Mon Sep 22 15:56:12 2008 +0100
@@ -283,9 +283,27 @@ int powernow_cpufreq_init(void)
 
     /* setup cpufreq infrastructure */
     for_each_online_cpu(i) {
-        cpufreq_cpu_policy[i]->cpu = i;
-
-        ret = powernow_cpufreq_cpu_init(cpufreq_cpu_policy[i]);
+        struct cpufreq_policy *policy = cpufreq_cpu_policy[i];
+
+        if (!policy) {
+            unsigned int firstcpu;
+
+            firstcpu = first_cpu(processor_pminfo[i]->perf.shared_cpu_map);
+            if (i == firstcpu) {
+                policy = xmalloc(struct cpufreq_policy);
+                if (!policy) {
+                    ret = -ENOMEM;
+                    goto cpufreq_init_out;
+                }
+                memset(policy, 0, sizeof(struct cpufreq_policy));
+                policy->cpu = i;
+            } else
+                policy = cpufreq_cpu_policy[firstcpu];
+            cpu_set(i, policy->cpus);
+            cpufreq_cpu_policy[i] = policy;
+        }
+
+        ret = powernow_cpufreq_cpu_init(policy);
         if (ret)
             goto cpufreq_init_out;
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: fix powernow, Xen patchbot-unstable <=