diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 20:02:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 20:02:58 -0500 |
commit | 72eb6a791459c87a0340318840bb3bd9252b627b (patch) | |
tree | 3bfb8ad99f9c7e511f37f72d57b56a2cea06d753 /arch/x86/kvm/x86.c | |
parent | 23d69b09b78c4876e134f104a3814c30747c53f1 (diff) | |
parent | 55ee4ef30241a62b700f79517e6d5ef2ddbefa67 (diff) |
Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (30 commits)
gameport: use this_cpu_read instead of lookup
x86: udelay: Use this_cpu_read to avoid address calculation
x86: Use this_cpu_inc_return for nmi counter
x86: Replace uses of current_cpu_data with this_cpu ops
x86: Use this_cpu_ops to optimize code
vmstat: User per cpu atomics to avoid interrupt disable / enable
irq_work: Use per cpu atomics instead of regular atomics
cpuops: Use cmpxchg for xchg to avoid lock semantics
x86: this_cpu_cmpxchg and this_cpu_xchg operations
percpu: Generic this_cpu_cmpxchg() and this_cpu_xchg support
percpu,x86: relocate this_cpu_add_return() and friends
connector: Use this_cpu operations
xen: Use this_cpu_inc_return
taskstats: Use this_cpu_ops
random: Use this_cpu_inc_return
fs: Use this_cpu_inc_return in buffer.c
highmem: Use this_cpu_xx_return() operations
vmstat: Use this_cpu_inc_return for vm statistics
x86: Support for this_cpu_add, sub, dec, inc_return
percpu: Generic support for this_cpu_add, sub, dec, inc_return
...
Fixed up conflicts: in arch/x86/kernel/{apic/nmi.c, apic/x2apic_uv_x.c, process.c}
as per Tejun.
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b989e1f1e5d3..46a368cb651e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -976,7 +976,7 @@ static inline u64 nsec_to_cycles(u64 nsec) | |||
976 | if (kvm_tsc_changes_freq()) | 976 | if (kvm_tsc_changes_freq()) |
977 | printk_once(KERN_WARNING | 977 | printk_once(KERN_WARNING |
978 | "kvm: unreliable cycle conversion on adjustable rate TSC\n"); | 978 | "kvm: unreliable cycle conversion on adjustable rate TSC\n"); |
979 | ret = nsec * __get_cpu_var(cpu_tsc_khz); | 979 | ret = nsec * __this_cpu_read(cpu_tsc_khz); |
980 | do_div(ret, USEC_PER_SEC); | 980 | do_div(ret, USEC_PER_SEC); |
981 | return ret; | 981 | return ret; |
982 | } | 982 | } |
@@ -1061,7 +1061,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) | |||
1061 | local_irq_save(flags); | 1061 | local_irq_save(flags); |
1062 | kvm_get_msr(v, MSR_IA32_TSC, &tsc_timestamp); | 1062 | kvm_get_msr(v, MSR_IA32_TSC, &tsc_timestamp); |
1063 | kernel_ns = get_kernel_ns(); | 1063 | kernel_ns = get_kernel_ns(); |
1064 | this_tsc_khz = __get_cpu_var(cpu_tsc_khz); | 1064 | this_tsc_khz = __this_cpu_read(cpu_tsc_khz); |
1065 | 1065 | ||
1066 | if (unlikely(this_tsc_khz == 0)) { | 1066 | if (unlikely(this_tsc_khz == 0)) { |
1067 | local_irq_restore(flags); | 1067 | local_irq_restore(flags); |
@@ -4427,7 +4427,7 @@ EXPORT_SYMBOL_GPL(kvm_fast_pio_out); | |||
4427 | 4427 | ||
4428 | static void tsc_bad(void *info) | 4428 | static void tsc_bad(void *info) |
4429 | { | 4429 | { |
4430 | __get_cpu_var(cpu_tsc_khz) = 0; | 4430 | __this_cpu_write(cpu_tsc_khz, 0); |
4431 | } | 4431 | } |
4432 | 4432 | ||
4433 | static void tsc_khz_changed(void *data) | 4433 | static void tsc_khz_changed(void *data) |
@@ -4441,7 +4441,7 @@ static void tsc_khz_changed(void *data) | |||
4441 | khz = cpufreq_quick_get(raw_smp_processor_id()); | 4441 | khz = cpufreq_quick_get(raw_smp_processor_id()); |
4442 | if (!khz) | 4442 | if (!khz) |
4443 | khz = tsc_khz; | 4443 | khz = tsc_khz; |
4444 | __get_cpu_var(cpu_tsc_khz) = khz; | 4444 | __this_cpu_write(cpu_tsc_khz, khz); |
4445 | } | 4445 | } |
4446 | 4446 | ||
4447 | static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | 4447 | static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, |