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/
Home Products Support Community News


[Xen-devel] [PATCH] X86: cpufreq init cleanup

To: Keir Fraser <keir.xen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] X86: cpufreq init cleanup
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Tue, 31 May 2011 12:59:47 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Tue, 31 May 2011 14:23:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwfT5BY7mXdG81GTXqE2v31xxwIgQ==
Thread-topic: [PATCH] X86: cpufreq init cleanup
Resend it, mail server seems have some issue yesterday :(



X86: cpufreq init cleanup

c/s 20325 change AMD cpufreq init logic.
Before that, AMD cpu start cpufreq init logic only when all cpus ready.
c/s 20325 change it to per cpu add, however, leave code un-elegant.

This patch do a little cleanup work.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>

diff -r 15ad40a174dc xen/arch/x86/acpi/cpufreq/cpufreq.c
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c       Thu May 19 19:00:23 2011 +0800
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c       Mon May 30 20:30:11 2011 +0800
@@ -695,15 +695,11 @@ __initcall(cpufreq_driver_init);
 int cpufreq_cpu_init(unsigned int cpuid)
-    static int cpu_count=0;
     int ret;
-    cpu_count++; 
     /* Currently we only handle Intel and AMD processor */
-    if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
-        ret = cpufreq_add_cpu(cpuid);
-    else if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
+    if ( (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ) ||
+         (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) )
         ret = cpufreq_add_cpu(cpuid);
         ret = -EFAULT;

Attachment: cpufreq_fix.patch
Description: cpufreq_fix.patch

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>