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] Cpufreq: simplify cpufreq_statistic_lock

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Cpufreq: simplify cpufreq_statistic_lock init
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Jan 2009 06:57:35 -0800
Delivery-date: Thu, 08 Jan 2009 07:01:44 -0800
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 1231154201 0
# Node ID 5a7caf864f4e31e17dc87a3bca2fc6c34c7b8839
# Parent  fd59c117994a3d4ad1e4cc51dc51e59e8d87e18c
Cpufreq: simplify cpufreq_statistic_lock init

Singed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
---
 xen/drivers/cpufreq/utility.c |   18 +-----------------
 1 files changed, 1 insertion(+), 17 deletions(-)

diff -r fd59c117994a -r 5a7caf864f4e xen/drivers/cpufreq/utility.c
--- a/xen/drivers/cpufreq/utility.c     Mon Jan 05 11:16:12 2009 +0000
+++ b/xen/drivers/cpufreq/utility.c     Mon Jan 05 11:16:41 2009 +0000
@@ -36,7 +36,7 @@ struct processor_pminfo *__read_mostly p
 struct processor_pminfo *__read_mostly processor_pminfo[NR_CPUS];
 struct cpufreq_policy   *__read_mostly cpufreq_cpu_policy[NR_CPUS];
 
-DEFINE_PER_CPU(spinlock_t, cpufreq_statistic_lock);
+DEFINE_PER_CPU(spinlock_t, cpufreq_statistic_lock) = SPIN_LOCK_UNLOCKED;
 
 /*********************************************************************
  *                    Px STATISTIC INFO                              *
@@ -197,22 +197,6 @@ void cpufreq_statistic_reset(unsigned in
 
     spin_unlock_irq(cpufreq_statistic_lock);
 }
-
-static int __init cpufreq_statistic_lock_init(void)
-{
-    unsigned int cpu;
-    spinlock_t *cpufreq_statistic_lock; 
-
-    for (cpu=0; cpu<NR_CPUS; cpu++) {
-        cpufreq_statistic_lock = 
-                &per_cpu(cpufreq_statistic_lock, cpu);
-
-        spin_lock_init(cpufreq_statistic_lock);
-    }
-
-    return 0;
-}
-__initcall(cpufreq_statistic_lock_init);
 
 
 /*********************************************************************

_______________________________________________
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] Cpufreq: simplify cpufreq_statistic_lock init, Xen patchbot-unstable <=