From ef00b96251c2f34463896f277aaf9c14f27daacb Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 16 Dec 2010 12:16:34 +0200 Subject: [PATCH] --- yaml --- r: 223404 b: refs/heads/master c: 3e26f23091da06d02fa62da14c95f3688d27857c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/x86.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e4a7bf053bb9..56253a59c194 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 73c1160ce377d8fc6d84cb630ebf9658808bec49 +refs/heads/master: 3e26f23091da06d02fa62da14c95f3688d27857c diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index e3abd84750c7..b989e1f1e5d3 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -4564,9 +4564,11 @@ static void kvm_timer_init(void) #ifdef CONFIG_CPU_FREQ struct cpufreq_policy policy; memset(&policy, 0, sizeof(policy)); - cpufreq_get_policy(&policy, get_cpu()); + cpu = get_cpu(); + cpufreq_get_policy(&policy, cpu); if (policy.cpuinfo.max_freq) max_tsc_khz = policy.cpuinfo.max_freq; + put_cpu(); #endif cpufreq_register_notifier(&kvmclock_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);